본문 바로가기

ComputerScience/DesignPattern

[DesignPattern] 18개 디자인 패턴 총 정리, 요약

 

Abstract Factory: Family Creator

  • Makes groups of related items.
  • 관련된 항목들의 그룹을 만듭니다.

Builder: Lego Master

  • Builds objects step by step, keeping creation and appearance separate.
  • 단계적으로 객체를 생성하며, 생성과 외관을 분리합니다.

Prototype: Clone Maker

  • Creates copies of fully prepared examples.
  • 완전히 준비된 예제의 복사본을 생성합니다.

Singleton: One and Only

  • A special class with just one instance.
  • 하나의 인스턴스만 가지는 특별한 클래스입니다.

Adapter: Universal Plug

  • Connects things with different interfaces.
  • 서로 다른 인터페이스를 가진 것들을 연결합니다.

Bridge: Function Connector 

  • Links how an object works to what it does.
  • 객체가 작동하는 방식을 해당 객체가 수행하는 작업과 연결합니다.

Composite: Tree Builder

  • Forms tree-like structures of simple and complex parts.
  • 간단하고 복잡한 부분들의 트리 모양 구조를 형성합니다.

Decorator: Customizer

  • Adds features to objects without changing their core.
  • 핵심을 변경하지 않고 객체에 기능을 추가합니다.

Facade: One-Stop-Shop

  • Represents a whole system with a single, simplified interface.
  • 단일하고 간소화된 인터페이스로 전체 시스템을 나타냅니다.

Flyweight: Space Saver

  • Shares small, reusable items efficiently.
  • 작고 재사용 가능한 항목을 효율적으로 공유합니다.

Proxy: Stand-In Actor

  • Represents another object, controlling access or actions.
  • 다른 객체를 대표하며, 액세스 또는 작업을 제어합니다.

Chain of Responsibility: Request Relay

  • Passes a request through a chain of objects until handled.
  • 요청을 여러 객체 체인을 통해 전달하고 처리될 때까지 전달합니다.

Command: Task Wrapper

  • Turns a request into an object, ready for action.
  • 요청을 객체로 변환하여 실행 가능한 상태로 만듭니다.

Iterator: Collection Explorer

  • Accesses elements in a collection one by one.
  • 컬렉션의 요소에 하나씩 액세스합니다.

Mediator: Communication Hub

  • Simplifies interactions between different classes.
  • 서로 다른 클래스 간의 상호 작용을 단순화합니다.

Memento: Time Capsule

  • Captures and restores an object's state.
  • 객체의 상태를 캡처하고 복원합니다.

Observer: News Broadcaster

  • Notifies classes about changes in other objects.
  • 다른 객체의 변경 사항을 클래스에 알립니다.

Visitor: Skillful Guest

  • Adds new operations to a class without altering it.
  • 클래스에 새로운 작업을 추가하되 그 클래스를 변경하지 않습니다.

참고 자료 

https://github.com/ByteByteGoHq/system-design-101?tab=readme-ov-file#18-key-design-patterns-every-developer-should-know

 

GitHub - ByteByteGoHq/system-design-101: Explain complex systems using visuals and simple terms. Help you prepare for system des

Explain complex systems using visuals and simple terms. Help you prepare for system design interviews. - GitHub - ByteByteGoHq/system-design-101: Explain complex systems using visuals and simple te...

github.com