Design Pattern이란?

0ne·2024년 6월 15일

DesignPattern

목록 보기
3/5

정의

"A proven solution to a commmon problem in a specified context"

분류

Creational

  • Abstract Factory
  • Builder
  • Factory Method
  • Prototype
  • Singleton

Structural

  • Adapter
  • Bridge
  • Composite
  • Decorator
  • Façade
  • Flyweight
  • Proxy

Behavioral

  • Chain of Responsibility
  • Command
  • Interpreter
  • Iterator
  • Mediator
  • Memento
  • Observer
  • State
  • Strategy
  • Template Method
  • Visitor

Law

  1. 서로 상호작용을 하는 객체 사이에서는 가능하면 느슨하게 결합하는 디자인을 사용해야 한다.
  • observer pattern에서 잘 드러남
  1. 클래스는 확장에 대해서는 열려 있어야 하지만 코드 변경에 대해서는 닫혀 있어야 한다. 이를 Open-Closed Principle (OCP)라 한다.
  • decorator pattern에서 잘 드러남
profile
@Hanyang univ(seoul). CSE

0개의 댓글