** Reuse Activities ** Selecting Design Patterns and Components (Part 1) Done by Safaa khalil Meqdad.

Slides:



Advertisements
Similar presentations
1 Structural Design Patterns - Neeraj Ray. 2 Structural Patterns - Overview n Adapter n Bridge n Composite n Decorator.
Advertisements

Chapter 8, Object Design: Design Patterns II Using UML, Patterns, and Java Object-Oriented Software Engineering.
The Bridge Pattern.. Intent Decouple an abstraction from its implementation so that the two can vary independently Also known as: Handle/Body.
Design Patterns A General reusable solution to a commonly occurring problem in software design. Creational: Deal with object creation mechanisms – Example:
SWE 4743 Strategy Patterns Richard Gesick. CSE Strategy Pattern the strategy pattern (also known as the policy pattern) is a software design.
1 CS 501 Spring 2005 CS 501: Software Engineering Lecture 17 Object Oriented Design 3.
CS CS 5150 Software Engineering Lecture 17 Object Oriented Design 3.
Chapter 8, Object Design Introduction to Design Patterns
1 CS 501 Spring 2008 CS 501: Software Engineering Lectures 17 & 18 Object Oriented Design 3 & 4.
Feb. 23, 2004CS WPI1 CS 509 Design of Software Systems Lecture #5 Monday, Feb. 23, 2004.
Chapter 8 Object Design Reuse and Patterns. Finding Objects The hardest problems in object-oriented system development are: –Identifying objects –Decomposing.
CS CS 5150 Software Engineering Lecture 16 Object Oriented Design 2.
GoF Sections 2.7 – 2.9 More Fun with Lexi. Lexi Document Editor Lexi tasks discussed:  Document structure  Formatting  Embellishing the user interface.
CS CS 5150 Software Engineering Lecture 16 Object Oriented Design 2.
Reuse Activities Selecting Design Patterns and Components
Chapter 22 Object-Oriented Design
1 CS 501 Spring 2007 CS 501: Software Engineering Lectures 17 & 18 Object Oriented Design 3 & 4.
PRESENTED BY SANGEETA MEHTA EECS810 UNIVERSITY OF KANSAS OCTOBER 2008 Design Patterns.
Creational Patterns Making Objects The Smart Way Brent Ramerth Abstract Factory, Builder.
Chapter 8, Object Design: Design Patterns II Using UML, Patterns, and Java Object-Oriented Software Engineering.
Design Patterns.
Chapter 1: Introduction to Design Patterns. SimUDuck Example.
Chapter 8, Object Design: Design Patterns II Using UML, Patterns, and Java Object-Oriented Software Engineering.
Case Studies on Design Patterns Design Refinements Examples.
CS 325: Software Engineering March 17, 2015 Applying Patterns (Part A) The Façade Pattern The Adapter Pattern Interfaces & Implementations The Strategy.
An Introduction to Design Patterns. Introduction Promote reuse. Use the experiences of software developers. A shared library/lingo used by developers.
Using UML, Patterns, and Java Object-Oriented Software Engineering Art for Chapter 8, Object Design: Reusing Pattern Solutions.
Design Patterns CSCI 5801: Software Engineering. Design Patterns.
Software Design Patterns (1) Introduction. patterns do … & do not … Patterns do... provide common vocabulary provide “shorthand” for effectively communicating.
CS 210 Adapter Pattern October 19 th, Adapters in real life Page 236 – Head First Design Patterns.
GoF: Document Editor Example Rebecca Miller-Webster.
Structural Design Patterns
Structural Pattern: Bridge When the abstract interface and the concrete implementation have been set up as parallel class hierarchies, it becomes difficult.
Design Pattern Dr. Zhen Jiang West Chester University url:
Design Patterns -- Omkar. Introduction  When do we use design patterns  Uses of design patterns  Classification of design patterns  Creational design.
آرمان حسين‌زاده آذر  Access to data varies depending on the source of the data.  Access to persistent storage, such as to a database, varies greatly.
Joe Boylan David Guzman Oscar Ontiveros Fabian Pizana Jose Segura Adrian Veliz.
FacadeDesign Pattern Provide a unified interface to a set of interfaces in a subsystem. Defines a high level interface that makes the subsystem easier.
Design Patterns ECE 417/617: Elements of Software Engineering Stan Birchfield Clemson University.
Using Software Design Patterns Bill Anderson. About me Fox developer since 1987 Fox developer since 1987 Program Director, Los Angeles Visual Foxpro Developers.
Design Patterns Introduction “Patterns are discovered, not invented” Richard Helm.
Pattern Bridge. Definition Bridge is the structural pattern that separates abstraction from the implementation so that both of them can be changed independently.
The Strategy Pattern (Behavioral) ©SoftMoore ConsultingSlide 1.
Example to motivate discussion We have two lists (of menu items) one implemented using ArrayList and another using Arrays. How does one work with these.
Watching the movie the hard way…. Page 256 – Head First Design Patterns.
CS 210 Proxy Pattern Nov 16 th, RMI – A quick review A simple, easy to understand tutorial is located here:
Chapter 8 Object Design Reuse and Patterns. More Patterns Abstract Factory: Provide manufacturer independence Builder: Hide a complex creation process.
CS 5150 Software Engineering Lecture 16 Program Design 3.
By Robert Smith Feb 23,  The normal method of dealing with an abstraction having several implementations is through inheritance.  However, this.
An object's behavior depends on its current state. Operations have large, multipart conditional statements that depend on the object's state.
STRATEGY PATTERN By Michelle Johnson. BACKGROUND Behavioral Pattern Allow you to define a family of algorithms, encapsulate each one, and make them interchangeable.
Design Patterns Creational Patterns. Abstract the instantiation process Help make the system independent of how its objects are created, composed and.
COP 3331 Object-Oriented Analysis and Design 1 Design Overview  Design Overview (Ch 6)  Review of RAD  System Design  System Design Concepts  System.
CLASSIFICATION OF DESIGN PATTERNS Hladchuk Maksym.
Facade Pattern Jim Fawcett CSE776 – Design Patterns Summer 2010
Design Patterns: MORE Examples
Chapter 8, Object Design: Design Patterns II
Chapter 10 Design Patterns.
Factory Patterns 1.
Facade Pattern Jim Fawcett CSE776 – Design Patterns Summer 2010
object oriented Principles of software design
Presented by Igor Ivković
Chapter 8, Object Design Introduction to Design Patterns
State Design Pattern 1.
Ms Munawar Khatoon IV Year I Sem Computer Science Engineering
BRIDGE PATTERN.
Structural Patterns: Adapter and Bridge
Adapter Design Pattern
Presented by Igor Ivković
Extending Interface Based Design
Presentation transcript:

** Reuse Activities ** Selecting Design Patterns and Components (Part 1) Done by Safaa khalil Meqdad

Outline Introduction Sources of Changes Design Patterns

.. Sources of Changes.. New vendor or new technology New implementation New views Errors

.. Design Patterns.. Bridge Design Pattern Adapter Design Pattern Strategy Design Pattern Abstract Factory Design Pattern

** Bridge Design Pattern ** decouple the interface from an implementation so that implementations can be substituted possibly at run time. From figure (1) the client just deal with Abstraction class and completely shielded from both abstraction implementor and concrete implementation. Bridge design pattern fills the gap between the interface and its implementation.

Arena LaegueStore LaegueStoreImplementator StubStore Implementor XMLStore Implementor JDBCStore Implementor Figure (1) Abstraction class

** Adapter Design Pattern ** The Adapter converts the interface of a legacy system into an interface expected by the user.. From figure ( 2 ) the Adapter class (MyStringComparator) provides the interface expected by the client,and delegates the request the client request to the Legacy class (MyString) and perform any necessary conversions. Adapter works with Legacy Class and all of its subclasses. Client and Legacy class can work together with out any modification on both sides.

Array Comparator compare ( ) MyStringComparator compare ( ) MyString graeterThan ( ) eqauls ( ) Figure (2) Adapter class Legacy class

** Strategy Design Pattern ** Decouple a policy-deciding class from a set of mechanisms so that different mechanisms can be changed transparently from the client. From figure (3).. the network access protocols implementations are encapsulated with a strategy pattern to decouple the policy from selecting a network interface New algorithms can be added.

Application LocationManager NetworkConnection send ( ) receive ( ) setNetworkInterface ( ) NetworkInterface open ( ) close ( ) send ( ) receive ( ) Ethernet Open ( ) close ( ) send ( ) receive ( ) WaveLAN Open ( ) close ( ) send ( ) receive ( ) UMTS Open ( ) close ( ) send ( ) receive ( ) Figure (3) Strategy class Policy

** Abstract Factory Design Pattern ** The Abstract Factory shield the client from different platforms that provide different implementations for the same set of concepts.. Client deals with interface provided by the AbstractFactory figure (4). Client can change platforms easier. Adding new product is difficult since new realization for each factory must be created.

Blind LuxmateBulb EIBBulb LuxmateBulbEIBBulb LightBulb HouseFartory createBulb ( ) craeteBlind ( ) EIBFactory createBulb ( ) craeteBlind ( ) LuxmateFactory createBulb ( ) craeteBlind ( ) TheftApplication Figure (4) AbstractFactor y class

Summary Design PatternPhrase Bridge Design Pattern “Must Support future protocols” Adapter Design Pattern “Must deal with existing systems or reuse Legacy systems” AbstractFactory Design Pattern “Platform independency”.. “Manufacturers independency” Strategy Design Pattern “Must allow different algorithms to be interchanged at runtime”