ETC/Design Patterns(24)
-
Design Pattern, State
Object Behavioral Pattern State Pattern ----------------- INDEX ----------------- State Pattern ? Strategy vs State Structure Sample Code: Java Known Uses Pros & Cons 관련 패턴 ---------------------------------------------- Allow an object to alter its behavior when its internal state changes. The object will appear to change its class. - GoF Design Patterns 상태 패턴은 내부 상태가 변경될 때 해당 객체의 행동을 변경시키는 패턴입니..
2022.02.16 -
Design Pattern, Visitor
Object Behavioral Pattern Visitor Pattern ----------------- INDEX ----------------- Visitor Pattern ? Pros & Cons Structure Sequence Diagram Sample Code: Java Consequences Multiple Element Accumulating state Breaking encapsulation OCP 관련 패턴 ---------------------------------------------- Represent an operation to be performed on the elements of an object structure. Visitor lets you define a new o..
2022.02.13 -
Design Pattern, Iterator
Object Behavioral Pattern Iterator Pattern ----------------- INDEX ----------------- Iterator Pattern ? Structure Sample Code: Java java.util.Iterator 관련 패턴 ---------------------------------------------- Provide a way to access the elements of an aggregate object sequentially without exposing its underlying representation. - GoF Design Patterns 반복자 패턴은 내부 구조를 노출하지 않고 집한체를 통해 원소 객체에 순차적으로 접근할 수 있..
2022.02.10 -
Design Pattern, Command
Object Behavioral Pattern Command Pattern ----------------- INDEX ----------------- Command Pattern ? Structure Sample Code: Java Applicability 관련 패턴 ---------------------------------------------- Encapsulate a request as an object, thereby letting you parameterize clients with different requests, queue or log requests, and support undoable operations. - GoF Design Patterns 커맨드 패턴은 요청을 객체의 형태로 캡..
2022.02.06 -
Design Pattern, Decorator
Object Structural Pattern Decorator Pattern ----------------- INDEX ----------------- Decorator Pattern ? Structure Sample Code: Java 관련 패턴 ---------------------------------------------- Attach additional responsibilities to an object dynamically. Decorators provide a flexible alternative to subclassing for extending functionality. - GoF Design Patterns 장식자 패턴은 주어진 상황 및 용도에 따라 어떤 객체에 책임을 덧붙이는 패턴..
2022.02.03 -
Design Pattern, Composite
Object Structural Pattern Composite Pattern ----------------- INDEX ----------------- Composite Pattern ? Recursive Structure Sample Code: Java Pros & Cons 관련 패턴 ---------------------------------------------- Compose objects into tree structures to represent part-whole hierarchies. Composite lets clients treat individual objects and compositions of objects uniformly. - GoF Design Patterns 복합체 패턴..
2022.02.01