1 / 12

CS616: Software Engineering Spring 2009

Learn about design patterns in software engineering, including their classification and a detailed case study on the Observer pattern. Discover the motivation, applicability, structure, and known uses of this behavioral pattern.

achristie
Download Presentation

CS616: Software Engineering Spring 2009

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  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/

More Related