WARNING These slides are not optimized for printing or exam preparation. These are for lecture delivery only. These slides are made for PowerPoint 2010.

Slides:



Advertisements
Similar presentations
Welcome to. Who am I? A better way to code Design Patterns ???  What are design patterns?  How many are there?  How do I use them?  When do I use.
Advertisements

18-1 Verifying Object Behavior and Collaboration Role playing – the act of simulating object behavior and collaboration by acting out an object’s behaviors.
Patterns Reusable solutions to common object-oriented programming problems When given a programming problem, re-use an existing solution. Gang of Four.
05/26/2004www.indyjug.net1 Indy Java User’s Group June Knowledge Services, Inc.
(c) 2009 University of California, Irvine – André van der Hoek1June 13, 2015 – 21:42:16 Informatics 122 Software Design II Lecture 8 André van der Hoek.
IEG3080 Tutorial 7 Prepared by Ryan.
Design Patterns CS is not simply about programming
Design Patterns. What are design patterns? A general reusable solution to a commonly occurring problem. A description or template for how to solve a problem.
Design Patterns academy.zariba.com 1. Lecture Content 1.What are Design Patterns? 2.Creational 3.Structural 4.Behavioral 5.Architectural 6.Design Patterns.
WARNING These slides are not optimized for printing or exam preparation. These are for lecture delivery only. These slides are made for PowerPoint 2010.
WARNING These slides are not optimized for printing or exam preparation. These are for lecture delivery only. These slides are made for PowerPoint 2010.
Software Waterfall Life Cycle Requirements Construction Design Testing Delivery and Installation Operations and Maintenance Concept Exploration Prototype.
05 - Patterns Intro.CSC4071 Design Patterns Designing good and reusable OO software is hard. –Mix of specific + general –Impossible to get it right the.
CSSE 374: 3½ Gang of Four Design Patterns These slides derived from Steve Chenoweth, Shawn Bohner, Curt Clifton, and others involved in delivering 374.
SOEN 6011 Software Engineering Processes Section SS Fall 2007 Dr Greg Butler
WARNING These slides are not optimized for printing or exam preparation. These are for lecture delivery only. These slides are made for PowerPoint 2010.
SOEN 343 Software Design Section H Fall 2006 Dr Greg Butler
Design Patterns CSCI 5801: Software Engineering. Design Patterns.
DESIGN PATTERNS CSC532 Adv. Topics in Software Engineering Shirin A. Lakhani.
18 April 2005CSci 210 Spring Design Patterns 1 CSci 210.
Software Design Patterns (1) Introduction. patterns do … & do not … Patterns do... provide common vocabulary provide “shorthand” for effectively communicating.
WARNING These slides are not optimized for printing or exam preparation. These are for lecture delivery only. These slides are made for PowerPoint 2010.
Object Oriented Software Engineering Chapter 16 and 17 review 2014/06/03.
CSE 403 Lecture 14 Design Patterns. Today’s educational objective Understand the basics of design patterns Be able to distinguish them from design approaches.
ECE450S – Software Engineering II
Design Patterns CSIS 3701: Advanced Object Oriented Programming.
Introduction to Design Patterns. Questions What is a design pattern? Who needs design patterns? How different are classes and objects in APL compared.
1 Design Patterns Object-Oriented Design. 2 Design Patterns 4Reuse of design knowledge and experience 4Common in many engineering disciplines 4Avoids.
Creational Patterns
What to know for the exam. Smalltalk will be used for questions, but there will not be questions about the grammar. Questions might ask – how particular.
Proxy.
Behavioral Patterns CSE301 University of Sunderland Harry R Erwin, PhD.
CS616: Software Engineering Spring 2009 Design Patterns Sami Taha.
© 2011 Autodesk Popular Design Patterns and How to Implement Them in.NET Gopinath Taget Senior Developer Consultant.
Design Patterns. 1 Paradigm4 Concepts 9 Principles23 Patterns.
Design Patterns Introduction
Design Patterns SE464 Derek Rayside images from NetObjectives.com & Wikipedia.
CS251 – Software Engineering Lectures 18: Intro to DP Slides by Rick Mercer, Christian Ratliff, Oscar Nierstrasz and others 1 و ابتغ فيما آتاك الله الدار.
WARNING These slides are not optimized for printing or exam preparation. These are for lecture delivery only. These slides are made for PowerPoint 2010.
Five Minute Design Patterns Doug Marttila Forest and the Trees May 30, 2009 Template Factory Singleton Iterator Adapter Façade Observer Command Strategy.
7 April 2004CSci 210 Spring Design Patterns 2 CSci 210.
WARNING These slides are not optimized for printing or exam preparation. These are for lecture delivery only. These slides are made for PowerPoint 2010.
WARNING These slides are not optimized for printing or exam preparation. These are for lecture delivery only. These slides are made for PowerPoint 2010.
Design Patterns CSCE 315 – Programming Studio Spring 2013.
WARNING These slides are not optimized for printing or exam preparation. These are for lecture delivery only. These slides are made for PowerPoint 2010.
WARNING These slides are not optimized for printing or exam preparation. These are for lecture delivery only. These slides are made for PowerPoint 2010.
WARNING These slides are not optimized for printing or exam preparation. These are for lecture delivery only. These slides are made for PowerPoint 2010.
WARNING These slides are not optimized for printing or exam preparation. These are for lecture delivery only. These slides are made for PowerPoint 2010/2013.
WARNING These slides are not optimized for printing or exam preparation. These are for lecture delivery only. These slides are made for PowerPoint 2010.
The Object-Oriented Thought Process Chapter 15
WARNING These slides are not optimized for printing or exam preparation. These are for lecture delivery only. These slides are made for PowerPoint 2010.
Chapter 10 Design Patterns.
樣式導向設計 (Pattern-Oriented Design) 課程簡介
Chapter 5:Design Patterns
MPCS – Advanced java Programming
Design Patterns Lecture part 2.
Introduction to Design Patterns
WARNING These slides are not optimized for printing or exam preparation. These are for lecture delivery only. These slides are made for PowerPoint 2010.
WARNING These slides are not optimized for printing or exam preparation. These are for lecture delivery only. These slides are made for PowerPoint 2010.
WARNING These slides are not optimized for printing or exam preparation. These are for lecture delivery only. These slides are made for PowerPoint 2010.
WARNING These slides are not optimized for printing or exam preparation. These are for lecture delivery only. These slides are made for PowerPoint 2010.
WARNING These slides are not optimized for printing or exam preparation. These are for lecture delivery only. These slides are made for PowerPoint 2010.
SOEN 343 Software Design Computer Science and Software Engineering Department Concordia University Fall 2005 Instructor: Patrice Chalin.
WARNING These slides are not optimized for printing or exam preparation. These are for lecture delivery only. These slides are made for PowerPoint 2010.
Software Engineering Lecture 7 - Design Patterns
Design Patterns in Game Design
Informatics 122 Software Design II
Design Patterns Part 2: Factory, Builder, & Memento
Informatics 122 Software Design II
CIS 644 Tues. Nov. 30, 1999 W15A … patterns.
Presentation transcript:

WARNING These slides are not optimized for printing or exam preparation. These are for lecture delivery only. These slides are made for PowerPoint 2010. They may not show up well on other PowerPoint versions. You can download PowerPoint 2010 viewer from here. These slides contain a lot of animations. For optimal results, watch in slideshow mode.

Explain this design in less than 10 words, without diagrams or code Command cmd = createCommand(commandString); cmd.execute(); history.add(cmd); … cmd.undo(); {abstract} Command execute() {abstract} undo() {abstract} Edit execute() undo() Delete Add History add(Command) *

Design (a) TV Brand ModelName Price SerialNo

Design (a) :TV Brand: Sharp ModelName: Aquos Price: 1000 SerialNo: 452-5 Design (a) TV Brand ModelName Price SerialNo :TV Brand: Sony ModelName: Bravia Price: 1200 SerialNo: 452-1 :TV Brand: Panasonic ModelName: Viera Price: 1300 SerialNo: 452-3

Design (a) :TV Brand: Sharp ModelName: Aquos Price: 1000 SerialNo: 452-5 :TV Brand: Sharp ModelName: Aquos Price: 1000 SerialNo: 452-7 Design (a) TV Brand ModelName Price SerialNo :TV Brand: Sony ModelName: Bravia Price: 1200 SerialNo: 452-1 :TV Brand: Sony ModelName: Bravia Price: 1200 SerialNo: 452-9 :TV Brand: Sony ModelName: Bravia Price: 1200 SerialNo: 452-4 :TV Brand: Panasonic ModelName: Viera Price: 1300 SerialNo: 452-3 :TV Brand: Panasonic ModelName: Viera Price: 1300 SerialNo: 452-2 :TV Brand: Panasonic ModelName: Viera Price: 1300 SerialNo: 452-6

Design (b) :AquosTV SerialNo: 452-5 AquosTV Brand: Sharp ModelName: Aquos Price: 1000 Design (b) :AquosTV SerialNo: 452-7 TV Brand ModelName Price SerialNo :BraviaTV SerialNo: 452-1 BraviaTV Brand: Sony ModelName: Bravia Price: 1200 :BraviaTV SerialNo: 452-9 :BraviaTV SerialNo: 452-4 VieraTV Brand: Panasonic ModelName: Viera Price: 1300 :VieraTV SerialNo: 452-3 :VieraTV SerialNo: 452-2 :VieraTV SerialNo: 452-6

Design (b) TV Brand ModelName Price SerialNo

Design (c) TVModel Brand ModelName Price TVStockItem SerialNo

Design (c) :TVStockItem :TVModel SerialNo: 452-5 Brand: Sharp ModelName: Aquos Price: 1000 Design (c) :TVStockItem SerialNo: 452-7 TVModel Brand ModelName Price :TVStockItem SerialNo: 452-1 :TVModel Brand: Sony ModelName: Bravia Price: 1200 :TVStockItem SerialNo: 452-9 :TVStockItem SerialNo: 452-4 TVStockItem SerialNo :TVModel Brand: Panasonic ModelName: Viera Price: 1300 :TVStockItem SerialNo: 452-3 :TVStockItem SerialNo: 452-2 :TVStockItem SerialNo: 452-6

Design (c) :TVStockItem :TVModel SerialNo: 452-5 Brand: Sharp ModelName: Aquos Price: 1000 Design (c) :TVStockItem SerialNo: 452-7 TVModel Brand ModelName Price :TVStockItem SerialNo: 452-1 :TVModel Brand: Sony ModelName: Bravia Price: 1200 :TVStockItem SerialNo: 452-9 :TVStockItem SerialNo: 452-4 TVStockItem SerialNo :TVModel Brand: Panasonic ModelName: Viera Price: 1300 :TVStockItem SerialNo: 452-3 :TVStockItem SerialNo: 452-2 :TVStockItem SerialNo: 452-6

Design (c) :TVStockItem :TVModel SerialNo: 452-5 Brand: Sharp ModelName: Aquos Price: 1000 Design (c) :TVStockItem SerialNo: 452-7 TVModel Brand ModelName Price :TVStockItem SerialNo: 452-1 :TVModel Brand: Sony ModelName: Bravia Price: 1200 :TVStockItem SerialNo: 452-9 :TVStockItem SerialNo: 452-4 TVStockItem SerialNo :TVModel Brand: Panasonic ModelName: Viera Price: 1300 :TVStockItem SerialNo: 452-3 :TVStockItem SerialNo: 452-2 :TVStockItem SerialNo: 452-6

Book copies in a library TV drama episodes Video copies in a rental shop

Book copies in a library TV drama episodes Video copies in a rental shop

    Book copies in a library TV drama episodes Video copies in a rental shop   

Recurring tasks in a schedule  Book copies in a library TV drama episodes Video copies in a rental shop    Recurring tasks in a schedule

Using patterns to solve recurring problems Déjà vu: Using patterns to solve recurring problems CS2103/T, Lecture 9, Part 2, [Oct 14, 2016]

Using patterns to solve recurring problems Déjà vu: Using patterns to solve recurring problems

Using patterns to solve recurring problems experience Déjà vu: Using patterns to solve recurring problems

experience … is what you get when you didn’t get what you wanted.

experience … is valuable.

Learning from experience … is too costly.

experience Learning from Note to self: never volunteer to be the headstand guy

Learning from experience Patterns

Context: Multiple stock items of same TV model Problem: Some data (but not all) shared among stock items of the same model. Solution: Represent TV model and TV stock item as different classes.

Context: Multiple stock items of same TV model Problem: Some data (but not all) shared among stock items of the same model. Solution: Represent TV model and TV stock item as different classes. Stock items Book copies in a library TV drama episodes …

Context: Multiple stock items of same TV model Problem: Some data (but not all) shared among stock items of the same model. Solution: Represent TV model and TV stock item as different classes.

Context: Multiple occurrences of some abstraction Problem: Some data (but not all) shared among occurrences of the same abstraction. Solution: Represent abstraction and occurrences as different classes.

<<Abstraction>> <<Occurrence>> Context: Multiple occurrences of some abstraction Problem: Some data (but not all) shared among occurrences of the same abstraction. Solution: Represent abstraction and occurrences as different classes. * <<Abstraction>> <<Occurrence>>

<<Abstraction>> <<Occurrence>> Context: Multiple occurrences of some abstraction Problem: Same data (but not all) shared among occurrences of the same abstraction. Solution: Represent abstraction and occurrences as different classes. * <<Abstraction>> <<Occurrence>>

<<Abstraction>> <<Occurrence>> TVModel BookTitle Lesson * * * TVStockItem BookCopy LessonDelivery * <<Abstraction>> <<Occurrence>>

<<Abstraction>> <<Occurrence>> TVModel BookTitle Lesson * * * TVStockItem BookCopy LessonDelivery * <<Abstraction>> <<Occurrence>>

Name: Abstraction Occurrence Pattern Context: Multiple occurrences of some abstraction Problem: Same data (but not all) shared among occurrences of the same abstraction. Solution: Represent abstraction and occurrences as different classes. * <<Abstraction>> <<Occurrence>>

Name: Abstraction Occurrence Pattern Context: Multiple occurrences of some abstraction Problem: Same data (but not all) shared among occurrences of the same abstraction. Solution: Represent abstraction and occurrences as different classes. [An elegant solution to a recurring problem] Pattern * <<Abstraction>> <<Occurrence>>

Name: Abstraction Occurrence Pattern Context: Multiple occurrences of some abstraction Problem: Same data (but not all) shared among occurrences of the same abstraction. Solution: Represent abstraction and occurrences as different classes. [An elegant solution to a recurring problem] Pattern * <<Abstraction>> <<Occurrence>>

Name: Abstraction Occurrence Pattern Context: Multiple occurrences of some abstraction Problem: Same data (but not all) shared among occurrences of the same abstraction. Solution: Represent abstraction and occurrences as different classes. <<Abstraction>> <<Occurrence>> *

Name: Abstraction Occurrence Pattern … for that, I used the Name: Abstraction Occurrence Pattern Show off ! Context: Multiple occurrences of some abstraction Problem: Same data (but not all) shared among occurrences of the same abstraction. Solution: Represent abstraction and occurrences as different classes. <<Abstraction>> <<Occurrence>> * * <<Abstraction>> <<Occurrence>>

Patterns = a high-level vocabulary

Context: Multiple occurrences of some abstraction Problem: Same data (but not all) shared among occurrences of the same abstraction.

[A stupid solution to a recurring problem] Anti-Pattern Context: Multiple occurrences of some abstraction Problem: Same data (but not all) shared among occurrences of the same abstraction. Solution: Represent abstraction and occurrences as different classes.

[A stupid solution to a recurring problem] Anti-Pattern Context: Multiple occurrences of some abstraction Problem: Same data (but not all) shared among occurrences of the same abstraction. Solution: Represent abstraction and occurrences as different classes.

1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6 1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6.Observer

1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6 1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6.Observer

Context: one-and-only-one object, shared among others 1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6.Observer Context: one-and-only-one object, shared among others

Context: one-and-only-one object, shared among others 1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6.Observer Context: one-and-only-one object, shared among others Problem: how to avoid multiple objects?

1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6 1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6.Observer Solution: Logic - Logic( ) + getInstance( ) : Logic

1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6 1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6.Observer Solution: Logic - theOne : Logic - Logic( ) + getInstance( ) : Logic

1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6 1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6.Observer Solution: public static Logic getInstance(){ if (theOne == null) theOne = new Logic(); return theOne; } Logic - theOne : Logic - Logic( ) + getInstance( ) : Logic //somewhere else in the system… Logic logic = Logic.getInstance(); //instead of … Logic logic = new Logic();

Why not make all members static instead? OO ↓ Testability ↓ 1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6.Observer Why not make all members static instead? OO ↓ Testability ↓ UI Logic LogicStub

1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6 1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6.Observer

1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6 1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6.Observer Logic - theOne : Logic - Logic( ) + getInstance( ) : Logic public static Logic getInstance(){ if (theOne == null) theOne = new Logic(); return theOne; } //somewhere else in the system… Logic logic = Logic.getInstance(); //instead of … Logic logic = new Logic();

77577 OR tinyurl.com/answerpost 1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6.Observer How many classes in your project can benefit from the Singleton pattern? a. None b. Only 1 c. Only 2 d. Only 3 e. 4 or more single {a|b|c|d|e} e.g. single c 77577 77577 OR tinyurl.com/answerpost

1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6 1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6.Observer

1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6 1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6.Observer Logic TextUI ATD

1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6 1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6.Observer Logic TextUI MSLogic ATD

<<Façade>> 1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6.Observer <<Client1>> <<Façade>> <<Client2>>

1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6 1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6.Observer Edit Sort Delete

1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6 1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6.Observer

1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6 1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6.Observer

1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6 1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6.Observer UI elements Create/ edit/ delete/read Data objects

1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6 1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6.Observer UI elements VIEW Create/ edit/ delete/read CONTROLLER MODEL Data objects

1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6 1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6.Observer UI elements VIEW Create/ edit/ delete/read CONTROLLER MODEL Data objects

1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6 1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6.Observer

1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6 1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6.Observer Paparazzi Celebrity

1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6 1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6.Observer Paparazzi Celebrity

1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6 1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6.Observer Paparazzi Celebrity

1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6 1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6.Observer Paparazzi Celebrity

1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6 1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6.Observer Paparazzi = Observers AddUI ListUI SummaryUI Celebrity = Observable Data

<<Interface>> 1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6.Observer = Observers AddUI ListUI SummaryUI update( ) update( ) = Observable Data <<Interface>> Observer * +addView(Observer) -notifyUIs( ) update( ) :Data :Observer :Observer :Observer

<<Interface>> 1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6.Observer ListUI SummaryUI update( ) update( ) Data <<Interface>> Observer * +addView(Observer) -notifyUIs( ) update( )

<<Interface>> 1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6.Observer ListUI SummaryUI update( ) update( ) Data <<Interface>> Observer * +addView(Observer) -notifyUIs( ) update( )

<<Interface>> 1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6.Observer ListUI SummaryUI update( ) update( ) Data <<Interface>> Observer * +addView(Observer) -notifyUIs( ) update( )

1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6 1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6.Observer <<Observer1>> <<Observer2>> update( ) update( ) <<Observable>> <<Interface>> Observer * +add(Observer) -notifyObservers( ) update( )

observer {yes|no} e.g. observer yes 1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6.Observer Is the Observer pattern used in your project? <<Observer1>> <<Observer2>> update( ) update( ) <<Observable>> <<Interface>> Observer Can be used to reduce by directional dependencies. * +add(Observer) -notifyObservers( ) update( ) observer {yes|no} e.g. observer yes 77577 OR tinyurl.com/answerpost

1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6 1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6.Observer

Where? → Learning → Applying

Where? → Learning → Applying

Where? → Learning → Applying

Which way do I face? Window or the TV? Darn… Where? → Learning → Applying Which way do I face? Window or the TV? Darn…

Where? → Learning → Applying

Where? → Learning → Applying Christopher Alexander

Abstraction occurrence Analysis patterns Singleton  Design patterns Where? → Learning → Applying Abstraction occurrence Analysis patterns Singleton  Design patterns MVC  Architectural patterns …. Testing patterns …. Project management patterns

Abstraction occurrence Analysis patterns Singleton  Design patterns Where? → Learning → Applying Abstraction occurrence Analysis patterns Singleton  Design patterns MVC  Architectural patterns …. Testing patterns …. Project management patterns

Where? → Learning → Applying

Where? → Learning → Applying

GoF patterns Where? → Learning → Applying Creational: Behavioral : Abstract Factory Builder Factory Method Prototype Singleton Behavioral : Chain of Responsibility Command Interpreter Template Method Iterator Memento State Visitor Mediator Observer Strategy Structural: Adapter Bridge Composite Decorator Façade Flyweight Proxy GoF patterns

Where? → Learning → Applying

Where? → Learning → Applying Pattern So many patterns, so little time…

Where? → Learning → Applying Pattern So many patterns, so little time…

Where? → Learning → Applying Pattern So many patterns, so little time…

Can apply Singleton in your project? Where? → Learning → Applying Can apply Singleton in your project?

Where? → Learning → Applying

Part 1 - Déjà vu: Using patterns to solve recurring problems.

1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6 1. Abstraction occurrence 2. Singleton 3. Façade 4. Command 5. MVC 6.Observer 7. …… Identify patterns in sample code Use more patterns if it helps Should be able to relate each pattern to the project

77577 OR tinyurl.com/answerpost What are the negative consequence of applying the façade pattern? a. Extra code. b. Slower performance. c. Both of the above. d. No negative consequences. negative {a|b|c|d} e.g. negative c 77577 OR tinyurl.com/answerpost