CSC 480 Software Engineering Lab 5 – Abstract Factory Pattern Oct 30, 2002.

Slides:



Advertisements
Similar presentations
Creational Patterns, Abstract Factory, Builder Billy Bennett June 11, 2009.
Advertisements

More Interfaces, Dynamic Binding, and Polymorphism Kirk Scott.
Plab – Tirgul 12 Design Patterns
 Consists of Creational patterns  Each generator pattern has a Client, Product, and Generator.  The Generator needs at least one operation that creates.
UML – Class Diagrams.
CHAPTER 3 COLLECTIONS Abstract Data Types. 2 A data type consists of a set of values or elements, called its domain, and a set of operators acting on.
Prototype Pattern Creational Pattern Specify the kinds of objects to create using a prototypical instance, and create new objects by copy this prototype.
Design Pattern Course Builder Pattern 1 Mahdieh Monzavi AmirKabir University of Technology, Department of Computer Engineering & Information Technology.
Creational Patterns: The Abstract Factory CSE 335 Spring 2008 E. Kraemer.
GoF Sections 2.7 – 2.9 More Fun with Lexi. Lexi Document Editor Lexi tasks discussed:  Document structure  Formatting  Embellishing the user interface.
Chapter 22 Object-Oriented Design
Linzhang Wang Dept. of Computer Sci&Tech, Nanjing University The Abstract Factory Pattern.
Pattern Abstract Factory
Creational Patterns Making Objects The Smart Way Brent Ramerth Abstract Factory, Builder.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. The Factory Method Design Pattern (1) –A creational design.
Design Patterns.
1 The Architectural Design of FRUIT: A Family of Retargetable User Interface Tools Yi Liu, H. Conrad Cunningham and Hui Xiong Computer & Information Science.
Case Studies on Design Patterns Design Refinements Examples.
Creational Patterns (1) CS350, SE310, Fall, 2010.
Prof. Hertz (as told by xkcd.com)‏. Computer Science 313 – Advanced Programming Topics.
Abstract Factory Design Pattern making abstract things.
Tech Talk Go4 Factory Patterns Presented By: Matt Wilson.
Creational Patterns CSE301 University of Sunderland Harry R Erwin, PhD.
Swing and MVCS CompSci 230 Software Construction.
L11-12: Design Patterns Definition Iterator (L4: Inheritance)‏ Factory (L4: Inheritance)‏ Strategy (L5: Multiple Inheritance)‏ Composite (L6: Implementation.
GoF: Document Editor Example Rebecca Miller-Webster.
Design Patterns CS 124 Reference: Gamma et al (“Gang-of-4”), Design Patterns.
Computer Science [3] Java Programming II - Laboratory Course Lab 4: Common GUI Event Types and Listener Interfaces Layout Mangers Faculty of Engineering.
Define an interface for creating an object, but let subclasses decide which class to instantiate Factory Method Pattern.
Abstract Factory and Factory Method CS 124 Reference: Gamma et al (“Gang-of-4”), Design Patterns.
CDP-1 9. Creational Pattern. CDP-2 Creational Patterns Abstracts instantiation process Makes system independent of how its objects are –created –composed.
Factory Method Explained. Intent  Define an interface for creating an object, but let subclasses decide which class to instantiate.  Factory Method.
Define an interface for creating an object, but let subclasses decide which class to instantiate.
CSC 313 – Advanced Programming Topics. What Is the Factory Method?  Creation details hidden by AbstractCreator  Does effective job of limiting concrete.
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 Pattern. Definition: A design pattern is a general reusable solution to a commonly occurring problem within a given context in software design.
ANU COMP2110 Software Design in 2004 Lecture 17Slide 1 COMP2110 in 2004 Software Design Lecture 17: Software design patterns (4) 1The Abstract Factory.
CS212: Object Oriented Analysis and Design Lecture 38: Design Pattern-II.
The Strategy Pattern (Behavioral) ©SoftMoore ConsultingSlide 1.
Reference – Object Oriented Software Development Using Java - Jia COP 3331 Object Oriented Analysis and Design Chapter 10 – Patterns Jean Muhammad.
 Creational design patterns abstract the instantiation process.  make a system independent of how its objects are created, composed, and represented.
Overview of Creational Patterns ©SoftMoore ConsultingSlide 1.
The Abstract Factory Pattern (Creational) ©SoftMoore ConsultingSlide 1.
S.Ducasse Stéphane Ducasse 1 Abstract Factory.
Design Patterns Creational Patterns. Abstract the instantiation process Help make the system independent of how its objects are created, composed and.
Abstract Factory Pattern Jiaxin Wang CSPP Winter 2010.
Abstract Factory pattern Intent Provide an interface for creating families of related or dependent objects without specifying their concrete classes.
May 6, 1998CS102-02Lecture 6-2 Cross-Platform Programming CS Lecture 6-2 Making everyone happy.
Command Pattern. Intent encapsulate a request as an object  can parameterize clients with different requests, queue or log requests, support undoable.
Design Patterns: MORE Examples
Strategy: A Behavioral Design Pattern
Abstract Factory Pattern
Strategy Design Pattern
Factory Patterns 1.
Software Design and Architecture
More Interfaces, Dynamic Binding, and Polymorphism
Abstract Factory Pattern
Anatomy of a Class & Method
Intent (Thanks to Jim Fawcett for the slides)
Design Patterns - A few examples
Software Engineering Lecture 7 - Design Patterns
Abstract Factory Pattern
Design Patterns A Case Study: Designing a Document Editor
Informatics 122 Software Design II
Building Graphical User Interface with Swing a short introduction
Behavioral Design Pattern
Ms Munawar Khatoon IV Year I Sem Computer Science Engineering
Creational Patterns.
Informatics 122 Software Design II
Presentation transcript:

CSC 480 Software Engineering Lab 5 – Abstract Factory Pattern Oct 30, 2002

CSC /30/2002 The Abstract Factory Pattern Intent – provide an interface for creating families of related or depended objects without specifying their concrete classes AKA Kit Like other creational patterns, this pattern can help to avoid hard-coding the way in which objects need to be created

CSC /30/2002 Design Pattern Space

CSC /30/2002 Structure – an illustration

CSC /30/2002 Application – pluggable look-and-feel Support multiple look-and-feel user interfaces, such as Windows, Motif, Macintosh  Specify the selected look-and-feel in client programs  The corresponding GUI factory will be returned to generate graphical components in the requested laf In Java, this is accomplished at the system level UIManager.setLookAndFeel(plafName);

CSC /30/2002 Look-and-Feel Alternatives Windows Motif Metal (swing’s default)

CSC /30/2002 Application in This Lab A GardenMaker Factory  Garden varieties: annual, perennial, vegetable  Common concerns What are good center plants? What are good border plants? What do well in partial shade?  Plants With a name Other properties can be added

CSC /30/2002 Major Classes

CSC /30/2002 Sample Results

CSC /30/2002 Consequences Benefits  It isolates concrete classes at the client level A factory encapsulates the responsibility and the process of creating product objects. Clients are isolated from implementation classes  It makes exchanging product families easy – the concrete factory is used once  It promotes consistency among products Liabilities  supporting new kinds of products is difficult