소프트웨어 디자인 패턴

위키백과, 우리 모두의 백과사전.

소프트웨어 디자인 패턴(software design pattern)은 소프트웨어 공학소프트웨어 디자인에서 특정 문맥에서 공통적으로 발생하는 문제에 대해 재사용 가능한 해결책이다. 소스나 기계 코드로 바로 전환될수 있는 완성된 디자인은 아니며, 다른 상황에 맞게 사용될 수 있는 문제들을 해결하는데에 쓰이는 서술이나 템플릿이다. 디자인 패턴은 프로그래머가 어플리케이션이나 시스템을 디자인할 때 공통된 문제들을 해결하는데에 쓰이는 형식화 된 가장 좋은 관행이다.

역사[편집]

건축적 개념으로서의 패턴은 크리스토퍼 알렉산더(1977/79)가 창안하였다. 1987년, 켄트 벡워드 커닝햄은 프로그래밍, 구체적으로는 패턴 언어에 패턴을 적용하는 개념에 관한 실험을 시작했으며 그 해 OOPSLA 콘퍼런스에서 자신들의 결과를 제시하였다.[1][2] 그 뒤 여러 해에 걸쳐 벡과 커닝햄 등은 이 작업을 계속 진행하였다.

디자인 패턴은 이른바 사인방(Gang of Four)이 쓴 Design Patterns: Elements of Reusable Object-Oriented Software라는 책이 1994년 출판된 이후 인기를 끌었다.

분류 및 목록[편집]

디자인 패턴은 원래 여러 분류로 그룹화되었다: 생성 패턴, 구조 패턴, 행동 패턴.

생성 패턴[편집]

이름 디자인 패턴》에서 코드 컴플리트》에서[3] 기타
추상 팩토리 빈칸
빌더 아니요 빈칸
의존성 주입 아니요 아니요 빈칸
팩토리 메서드 빈칸
지연된 초기화 아니요 아니요 PoEAA[4]
멀티턴 아니요 아니요 빈칸
객체 풀 아니요 아니요 빈칸
프로토타입 아니요 빈칸
자원의 획득은 초기화이다(Resource Acquisition Is Initialization, RAII) 아니요 아니요 빈칸
싱글턴 빈칸

구조 패턴[편집]

이름 디자인 패턴》에서 코드 컴플리트》에서[3] 기타
어댑터, 래퍼(Wrapper), 변환기(Translator) 빈칸
브리지 빈칸
컴포지트 빈칸
데코레이터 빈칸
확장 객체(Extension object) 아니요 아니요 Agile Software Development, Principles, Patterns, and Practices[5]
퍼사드 빈칸
플라이웨이트 아니요 빈칸
프론트 컨트롤러 아니요 아니요

J2EE Patterns[6] PoEAA[7]

마커 아니요 아니요 이펙티브 자바[8]
모듈 아니요 아니요 빈칸
프록시 아니요 빈칸
트윈[9] 아니요 아니요 빈칸

행동 패턴[편집]

이름 디자인 패턴》에서 코드 컴플리트》에서[3] 기타
블랙보드 아니요 아니요 빈칸
책임 연쇄 아니요 빈칸
커맨드 아니요 빈칸
인터프리터 아니요 빈칸
반복자 빈칸
중재자 아니요 빈칸
메멘토 아니요 빈칸
널 객체 아니요 아니요 빈칸
옵서버 또는 발행-구독 모델 빈칸
서번트 아니요 아니요 빈칸
사양(Specification pattern) 아니요 아니요 빈칸
상태 아니요 빈칸
전략 빈칸
템플릿 메소드 빈칸
비지터 아니요 빈칸

동시성 패턴[편집]

이름 POSA2》에서[10] 기타
액티브 오브젝트 빈칸
Balking 아니요 빈칸
바인딩 속성 아니요 빈칸
컴퓨트 커널 아니요 빈칸
더블 체크 라킹(Double checked locking) 빈칸
이벤트 기반 비동기 아니요 빈칸
가디드 서스펜션(Guarded suspension) 아니요 빈칸
조인 아니요 빈칸
아니요 PoEAA[4]
메시징 디자인 패턴 (MDP) 아니요 빈칸
모니터 객체 빈칸
반응자 빈칸
읽기-쓰기 락 아니요 빈칸
스케줄러 아니요 빈칸
스레드 풀 아니요 빈칸
스레드 특화 스토리지 빈칸

같이 보기[편집]

각주[편집]

  1. Smith, Reid (October 1987). 《Panel on design methodology》. OOPSLA '87 Addendum to the Proceedings. doi:10.1145/62138.62151. , "Ward cautioned against requiring too much programming at, what he termed, 'the high level of wizards.' He pointed out that a written 'pattern language' can significantly improve the selection and application of abstractions. He proposed a 'radical shift in the burden of design and implementation' basing the new methodology on an adaptation of Christopher Alexander's work in pattern languages and that programming-oriented pattern languages developed at Tektronix has significantly aided their software development efforts."
  2. Beck, Kent; Cunningham, Ward (September 1987). 《Using Pattern Languages for Object-Oriented Program》. OOPSLA '87 workshop on Specification and Design for Object-Oriented Programming. 2006년 5월 26일에 확인함. 
  3. McConnell, Steve (June 2004). 〈Design in Construction〉. 《Code Complete》 2판. en:Microsoft Press. 104쪽. ISBN 978-0-7356-1967-8. Table 5.1 Popular Design Patterns 
  4. Fowler, Martin (2002). 《Patterns of Enterprise Application Architecture》. en:Addison-Wesley. ISBN 978-0-321-12742-6. 
  5. C. Martin, Robert (2002). 〈28. Extension object〉. 《Agile Software Development, Principles, Patterns, and Practices》. 408쪽. ISBN 978-0135974445. 
  6. Alur, Deepak; Crupi, John; Malks, Dan (2003). 《Core J2EE Patterns: Best Practices and Design Strategies》. en:Prentice Hall. 166쪽. ISBN 978-0-13-142246-9. 
  7. Fowler, Martin (2002). 《Patterns of Enterprise Application Architecture》. en:Addison-Wesley. 344쪽. ISBN 978-0-321-12742-6. 
  8. Bloch, Joshua (2008). 〈Item 37: Use marker interfaces to define types〉. 《Effective Java (Second edition)》. Addison-Wesley. 179쪽. ISBN 978-0-321-35668-0. 
  9. “Twin – A Design Pattern for Modeling Multiple Inheritance” (PDF). 
  10. Schmidt, Douglas C.; Stal, Michael; Rohnert, Hans; Buschmann, Frank (2000). 《Pattern-Oriented Software Architecture, Volume 2: Patterns for Concurrent and Networked Objects》. John Wiley & Sons. ISBN 978-0-471-60695-6.