Download presentation
Presentation is loading. Please wait.
Published byBridget Leonard Modified over 9 years ago
1
CS616: Software Engineering Spring 2009 Design Patterns Sami Taha
2
Content Introduction Classification of patterns –List of patterns GoF Patterns Template Case Study: Observer pattern
3
Introduction Design reuse Design Patterns motivation
4
Classification of patterns Creational patterns the process of object creation –Singleton Single instance –Factory Method –Building –Prototype
5
Structural patterns deal with the composition of classes or objects Façade –Unified interface Proxy –Protection –Synchronization – Count references –Cache Bridge Composite
6
Behavioral patterns The ways classes or objects interact and distribute responsibility Observer Visitor State Command Strategy Chain of Responsibility Interpreter Integrator Mediator Memento Template Method
7
GoF Patterns Template Pattern Name and classification Intent –What the pattern does Motivation –Scenario where the pattern would be useful Applicability –Situations to apply the design pattern Structure –Graphical representation Participants –Classes/object participating and responsibilities
8
GoF Patterns Template cont. Collaborations –How the participants collaborates Consequences –Pros and consequences Implementation –Pitfalls, hints, or techniques should you be aware of Sample Code and Usage –Code fragment Known uses –Examples in real systems
9
Case Study Observer Pattern – Pattern classification Behavioral pattern – Motivation – Applicability When a change to one object requires changing others When an object should be able to notify other objects
10
Case Study cont.. –Structure
11
Case Study cont.. –Known uses The observer pattern is implemented in many programming libraries specially GUI toolkits Examples Java Swing Boost.Signals QT Signal/Slot Library.Net remoting The standard PHP library
12
References Wikipedia http://www.cs.mum.edu/
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.