ETC/Design Patterns(24)
-
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, Bridge
Object Structural Pattern Bridge Pattern ----------------- INDEX ----------------- Bridge Pattern ? Abstraction Structure Sample Code: Java 특징 관련 패턴 ---------------------------------------------- Decouple an abstraction from its implementation so that the two can vary independently. - GoF Design Patterns 브리지 패턴은 밀접한 클래스 집합을 독립적으로 변형가능 하도록 구현부에서 추상층을 분리하는 패턴입니다. 브리지 패턴은 객체의 확장성을 향상하기 위한 패턴으로, 객체에..
2022.02.20 -
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