Design Patterns(16)
-
Design Pattern, Interpreter
Class Behavioral Pattern Interpreter Pattern ----------------- INDEX ----------------- Interpreter Pattern ? BNF Abstract Syntax Tree Structure Sample Code: Java 관련 패턴 ---------------------------------------------- Given a language, define a represention for its grammar along with an interpreter that uses the representation to interpret sentences in the language. - GoF Design Patterns 인터프리터 패턴은 ..
2022.02.21 -
Design Pattern, Chain of Responsibility
Object Behavioral Pattern Chain of Responsibility Pattern ----------------- INDEX ----------------- Chain of Responsibility Pattern ? Structure Sample Code: Java 특징 관련 패턴 ---------------------------------------------- Avoid coupling the sender of a request to its receiver by giving more than one object a chance to handle the request. Chain the receiving objects and pass the request along the cha..
2022.02.19 -
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