บริษัท สยามํานาญกิจ จํากัด และเพ่ือนพ้องน้องพ่ี
Code Quality ?
Design Pattern
@somkiat
บริษัท สยามํานาญกิจ จํากัด และเพ่ือนพ้องน้องพ่ี
Pattern Language 1977
บริษัท สยามํานาญกิจ จํากัด และเพ่ือนพ้องน้องพ่ี
บริษัท สยามํานาญกิจ จํากัด และเพ่ือนพ้องน้องพ่ี
Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice
Christopher Alexander (Architect) “A Pattern Language”
บริษัท สยามํานาญกิจ จํากัด และเพ่ือนพ้องน้องพ่ี
Design Pattern 1994
บริษัท สยามํานาญกิจ จํากัด และเพ่ือนพ้องน้องพ่ี
บริษัท สยามํานาญกิจ จํากัด และเพ่ือนพ้องน้องพ่ี
Design Pattern 1994
Program to an interface, not implementation
Object composition over class inheritance
บริษัท สยามํานาญกิจ จํากัด และเพ่ือนพ้องน้องพ่ี
SOLID 2000
บริษัท สยามํานาญกิจ จํากัด และเพ่ือนพ้องน้องพ่ี
SOLID
Single Responsibility Principle
Open/Close Principle
Liskov Substitution Principle
Interface Segregation Principle
Dependency Inversion Principle
บริษัท สยามํานาญกิจ จํากัด และเพ่ือนพ้องน้องพ่ี
บริษัท สยามํานาญกิจ จํากัด และเพ่ือนพ้องน้องพ่ี
Functional Interface 2014
บริษัท สยามํานาญกิจ จํากัด และเพ่ือนพ้องน้องพ่ี
บริษัท สยามํานาญกิจ จํากัด และเพ่ือนพ้องน้องพ่ี
GoF patterns
Structural
Behavioral
Creational
บริษัท สยามํานาญกิจ จํากัด และเพ่ือนพ้องน้องพ่ี
Structural patterns
Adapter Bridge Decorator
Composite Proxy Flyweight
บริษัท สยามํานาญกิจ จํากัด และเพ่ือนพ้องน้องพ่ี
Structural patterns
Adapter Bridge Decorator
Composite Proxy Flyweight
Object composition over class inheritance
บริษัท สยามํานาญกิจ จํากัด และเพ่ือนพ้องน้องพ่ี
Behavioral patterns
Command Observer State
Iteration Visitor
บริษัท สยามํานาญกิจ จํากัด และเพ่ือนพ้องน้องพ่ี
Creational patterns
Static Factory Singleton
Abstract Factory Builder
Monad
บริษัท สยามํานาญกิจ จํากัด และเพ่ือนพ้องน้องพ่ี