50 likes | 225 Views
Patterns. Reusable solutions to common object-oriented programming problems When given a programming problem, re-use an existing solution. Gang of Four 1995 23 Patterns. Simple Elegant Solutions. Design patterns capture solutions that have developed and evolved over time
E N D
Patterns • Reusable solutions to common object-oriented programming problems • When given a programming problem, re-use an existing solution. Gang of Four 1995 23 Patterns
Simple Elegant Solutions • Design patterns capture solutions that have developed and evolved over time • They aren't the designs people tend to generate initially. • They reflect untold redesign and recoding as developers have struggled for greater reuse and flexibility in their software.
General Categories • Creational patterns • Create objects for your rather than using new • Factory Method, Abstract Factory, Builder, Prototype, Singleton • Structural patterns • Compose groups of objects into larger structures • Adapter, Bridge, Composite, Decorator, Façade, Flyweight, Proxy • Behavioral patterns • Define the communication between objects • Chain of responsibility, Observer, Strategy, Command, Interpreter, Iterator
Nonfunctional Requirements may suggest a design pattern • “manufacturer independent”, “device independent”, “must support a family of products” • Abstract Factory Pattern • “must interface with an existing object” • Adapter Pattern • “must deal with the interface to several systems, some of them to be developed in the future” • Bridge Pattern
Design Patterns Quick Reference • www.mcdonaldland.info/2007/11/28/40/