ETC(78)
-
Design Pattern, Flyweight
Object Structural Pattern Flyweight Pattern ----------------- INDEX ----------------- Flyweight Pattern ? Structure Sample Code: Java 관련 패턴 ---------------------------------------------- Use sharing to support large numbers of fine-grained objects efficiently. - GoF Design Patterns 플라이웨이트 패턴은 객체를 공유함해서 아주 많은 분리된 객체를 효과적으로 관리하는 패턴입니다. 액션 게임을 제작한다고 해봅시다. 상대와 겨루고 필살기를 사용하면서 우승을 차지하는 게임입니다. 아주 많은 불꽃..
2022.02.18 -
Design Pattern, Prototype
Object Creational Pattern Prototype Pattern ----------------- INDEX ----------------- Prototype Pattern ? Structure Sample Code: Java java.lang.Cloneable 관련 패턴 ---------------------------------------------- Specify the kinds of objects to create using a prototypical instance, and create new objects by copying this prototype. - GoF Design Patterns 프로토타입 패턴은 원본 인스턴스로 생성할 객체의 유형을 결정하고, 원본을 복제하여 새 객..
2022.02.17 -
Design Pattern, Memento
Object Behavioral Pattern Memento Pattern ----------------- INDEX ----------------- Memento Pattern ? Structure Sample Code: Java Nested Class 관련 패턴 ---------------------------------------------- Without violating encapsulation, capture and externalize an object's internal state so that the object can be restored to this state later. - GoF Design Patterns 메멘토 패턴은 객체의 상태를 저장하여 이전 상태로 복구하는 패턴입니다. ..
2022.02.17 -
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