-
[Design Pattern] IntroductionLearn/Architecture 2022. 8. 17. 23:33
# Category of GoF Patterns
- Creational: 생성에 관련된 작업을 클라이언트가 직접 갖는게 아니라 다른 객체 주는 것 (new없이도 객체 생성 가능)
- Structural: 이미 있는 클래스, 객체를 조합해서 더 복잡하게 만들거나 Structure을 나눠야 하는 경우
- Behavioral: 어떤 클래스가 어떤 책임을 가질 것인가 또는 어떻게 커뮤니케이션 할 것인가를 표현한 패턴
# Key Features of Design Pattern
- Pattern name: 패턴 이름 (커뮤니케이션에서 중요)
- Intent: 목적
- Problem: 어떤 문제를 해결하려 하는가
- Solution: 문제를 어떤 식으로 해결하는지 서술
- Participants and collaborators: 패턴에 참여하는 클래스나 객체
- Consequences: 장점과 단점
- Implementation: 예시 (본질이 아니라 하나의 예시임에 주의)
- Generic structure: 구조를 설명하기 위한 Standard Diagram
# Levels of Pattern
- Architectural pattern: 시스템 전체 구조가 대상인 패턴 (ex. MVC 패턴)
- Design pattern: 전체 시스템이 아닌 subsystem이나 component 레벨이 대상인 패턴 (ex. Observer 패턴)
- Coding pattern: 특정 언어에 대한 패턴 (ex. Counter Pointer 패턴)
# QUIZ
정답 3번. 반대로 됨. 아키텍쳐 패턴을 시스템 전체 구조를 위해 사용하고 설계 패턴은 컴포넌트 내부 설계에 사용한다.
정답 4번. State Pattern은 Behavioral Pattern
'Learn > Architecture' 카테고리의 다른 글
[Design Pattern] Observer Pattern (0) 2022.08.27 [Design Pattern] Strategy Pattern (0) 2022.08.26 [Design Pattern] GRASP Principle (0) 2022.08.24 [Design Pattern] SOLID Principle (0) 2022.08.21 [Design Pattern] Object Oriented Paradigm (0) 2022.08.20