GoF design pattern summary

1.First of all

We have summarized the GoF design patterns (23 types).

2. List of design patterns

2-1. Creational patterns

Design pattern Overview
Abstract Factory Make a product by combining related parts
Builder Assemble complex instances
Factory Method Leave instance creation to subclasses
Prototype Copy and create an instance
Singleton Only one instance

2-2. Structural pattern

Design pattern Overview
Adapter Cover with one skin and reuse
Bridge Separate feature hierarchy and implementation hierarchy
Composite Identification of container and contents
Decorator Identification of the decorative frame and the contents
Facade Simple window
Flyweight Share the same thing to eliminate waste
Proxy Make it when you need it

2-3. Behavioral patterns

Design pattern Overview
Chain of Responsibility Responsibility
Command Make an instruction a class
Interpreter Express grammar rules in classes
Iterator Count one by one
Mediator Only one counselor
Memento Save state
Observer Notify the change of state
State Express the state as a class
Strategy Switch algorithms in a sneak peek
Template Method Leave the specific processing to the subclass
Visitor Work while walking across the structure
  1. GitHub

4. Reference

This article and sample program were created based on the following books.

-** Introduction to design patterns learned in Java language **

It was very easy to understand and I learned a lot. Thank you. The detailed explanations of the design patterns and sample programs are written, so please take a look at the books as well.

Recommended Posts

GoF design pattern summary
Java design pattern summary
Design pattern ~ Builder ~
Design pattern ~ Visitor ~
Java design pattern
Design pattern ~ Proxy ~
Design pattern ~ State ~
Design pattern ~ Strategy ~
Design pattern ~ Singleton ~
Design pattern ~ Composite ~
Design pattern (2): Builder
Design pattern (1): AbstractFactory
Design pattern ~ Command ~
Design pattern ~ Iterator ~
Design pattern ~ Facade ~
Design pattern ~ Bridge ~
Design pattern ~ Mediator ~
Design pattern ~ Decorator ~
Design pattern ~ Interpreter ~
Design pattern ~ Observer ~
Design pattern ~ Prototype ~
Design pattern ~ Memento ~
Design pattern ~ Adapter ~
Design pattern ~ Flyweight ~
C ++ design pattern (TemplateMethod pattern)
Design pattern ~ Abstract Factory ~
Design pattern ~ Template Method ~
Study GoF design patterns
Design pattern ~ Chain of Responsibility ~
[Design pattern] Java core library
[Java] Summary of design patterns
Ruby design pattern template method pattern memo
Summary
C # chewed design pattern: Template Method
Application example of design pattern (No. 1)
Java beginner design pattern (Factory Method pattern)
[Design pattern] Common logic with Template Method