1 / 13

Design Patterns

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 that can be used in many different situations. . For example…. Gang of Four. Words to live by.

lexi
Download Presentation

Design Patterns

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. Design Patterns

  2. What are design patterns? A general reusable solution to a commonly occurring problem. A description or template for how to solve a problem that can be used in many different situations.

  3. For example…

  4. Gang of Four

  5. Words to live by Program to an interface, not an implementation. Favor object composition over class inheritance. Interfaces: good Inheritance: bad

  6. Types of design patterns • Creational • Instantiation of objects • Structural • Class and object composition • Behavioral • Communication between objects

  7. Creational patterns • Abstract Factory • Builder • Factory Method • Prototype • Singleton

  8. Creational patterns • Abstract Factory • Builder • Factory Method • Prototype • Singleton

  9. Structural patterns • Adapter • Bridge • Composite • Decorator • Façade • Flyweight • Proxy

  10. Structural patterns • Adapter • Bridge • Composite • Decorator • Façade • Flyweight • Proxy

  11. Chain of responsibility Command Interpreter Iterator Mediator Memento Observer State Strategy Template method Visitor Behavioral patterns

  12. Chain of responsibility Command Interpreter Iterator Mediator Memento Observer State Strategy Template method Visitor Behavioral patterns

  13. And this affects me how? • What are design patterns used for? • What are the three categories of GoF design patterns? • Patterns you should be able to describe • Singleton • Composite • Façade • Chain-of-responsibility • Observer

More Related