ETC/Design Patterns(24)
-
Design Pattern, Singleton
Object Creational Pattern Singleton Pattern ----------------- INDEX ----------------- Singleton Pattern ? Structure Sample Code: Java Race Condition 관련 패턴 ---------------------------------------------- Ensure a class only has one instance, and provide a global point of access to it. - GoF Design Patterns 싱글턴 패턴은 클래스 당 인스턴스를 하나만 존재하게 하고, 전역적인 접근 지점을 제공합니다. 프린터를 통해 문서를 출력한다고 해봅시다. 서로 다른 문서를 출력할 때마..
2022.01.26 -
Design Pattern, Mediator
Object Behavioral Pattern Mediator Pattern ----------------- INDEX ----------------- Mediator Pattern ? Structure Case Study Sample Code: Java 관련 패턴 ---------------------------------------------- Define an object that encapsulates how a set of objects interact. Mediator promotes loose coupling by keeping objects from referring to each other explicitly, and it lets you vary their interaction inde..
2022.01.24 -
Design Pattern, Adapter
Object, Class Structural Pattern Adapter Pattern ----------------- INDEX ----------------- Adapter Pattern ? Structure Sample Code: Java 관련 패턴 ---------------------------------------------- Convert the interface of a class into another interface clients expect. Adapter lets classes work together that couldn't otherwise because of incompatible interfaces. - GoF Design Patterns 어댑터 패턴은 클래스의 인터페이스를..
2022.01.23 -
Design Pattern, Observer
Object Behavioral Pattern Observer Pattern ----------------- INDEX ----------------- Observer Pattern ? hollywood principle Structure Sample Code: Java 관련 패턴 ---------------------------------------------- Define a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically. - GoF Design Patterns 옵저버 패턴은 개체 간의 일대다 종속성을 정의..
2022.01.21 -
Design Pattern, Proxy
Structural Object Pattern Proxy Pattern ----------------- INDEX ----------------- Proxy Pattern ? Structure Sample Code: Java Applicability 원격 프록시 Remote Proxy 가상 프록시 Virtual Proxy 보호 프록시 Protection Proxy 스마트 참조자 프록시 Smart Reference Proxy 관련 패턴 ---------------------------------------------- Provide a surrogate or placeholder for another object to control access to it. - GoF Design Patterns 프록시 패..
2022.01.12 -
Design Pattern, Abstract Factory
Creational Object Pattern Abstract Factory Pattern ----------------- INDEX ----------------- Abstract Factory Pattern ? Abstraciton pros and cons Structure Sample Code: Java 관련 패턴 ---------------------------------------------- Provide an interface for creating families of related or dependent objects without specifying their concrete classes. - GoF Design Patterns 추상 팩토리 패턴은 추상화된 클래스에 의존하여 서로 연관..
2022.01.05