Upload
yoonjong-choi
View
83
Download
4
Embed Size (px)
Citation preview
Content
• Proxy
• Summery (Structural pattern)
• Behavioral pattern
• Chain of responsibility
• Command
Motive & Available
• 객체생성에비용이많이드는경우
• 문서편집기의이미지등
• 객체에대한정교한접근자제공
1. 원격지프록시
2. 가상프록시
3. 보호용프록시
4. 스마트참조자
Effect
• 실제객체에대한추가적인간접화방법제공
• 원격프록시 : 저장위치은닉
• 가상프록시 : 생성시점최적화
• 보호프록시 : 엄격한접근
• Copy-On-Write 기법
• 원본을수정해야하는경우에만복사작업진행
• 원본에대한 reference count를관리
Implement
• *, -> 연산자오버로딩
• ex) Image ImagePtr
• 프록시가실제객체를알필요는없음
• 가상프록시의경우실제객체에접근할때에만실제객체필요
• 실제객체의식별자부여
Adapter vs Bridge
• Adapter는인터페이스불일치해소가목적
• Bridge는구현을분리하고인터페이스를통일하는것이목적
• 개발시점차이
• 설계이전 : Bridge
• 설계이후 : Adapter
• Facade?
• 인터페이스를일치시키는것이아님새로운인터페이스작성
Composite, Decorator, Proxy
• Composite, Decorator는재귀적합성사용, 서로다른목적
• Decorator : 상속없이기능추가
• Composite : 객체집합에대한일괄제어
• 상호보완작용
• Composite Leaf : Decorator
• Decorator ConcreteComponent : Component
• Proxy? Decorator?• 객체에대한동일한인터페이스제공• Proxy는참조자관리
Behavioral pattern
• 행동클래스패턴
• Template method
• Interpreter
• 행동객체패턴
• Chain of responsibility
• Command
• Iterator
• Observer• State• Strategy• Visitor• Mediator• Memento
Implement
• 후속처리자연결고리구현
• 새롭게연결고리구현 / 덧붙이기
• 추가연결정보구현
• 후속처리자연결
• 처리요청의표현부정의
• 요청내용의클래스화
• 요청에대한식별자정의