Presentation is loading. Please wait.

Presentation is loading. Please wait.

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.

Similar presentations


Presentation on theme: "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."— 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 Behavioral patterns Chain of responsibility Command Interpreter Iterator Mediator Memento Observer State Strategy Template method Visitor

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

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


Download ppt "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."

Similar presentations


Ads by Google