SlideShare uma empresa Scribd logo
1 de 12
1
lahuman.jabsiri.co.kr
Design Pattern-4
Structural Design Pattern-1
Version 2015-03-04
–임광규 lahuman@daum.net
2
lahuman.jabsiri.co.kr
Agenda
Adapter Pattern
Composite Pattern
Proxy Pattern
Flyweight Pattern
Facade Pattern
Bridge Pattern
Decorator Pattern
3
lahuman.jabsiri.co.kr
Adapter Pattern-1
- What is Adapter Pattern? -
관련 없는 인터페이스를 함께 사용할수 있도록 지원
휴대폰 충전기 같이 가정용 전력 (220V) 를 휴대폰이 요구하는
전력 (2V) 으로 변환
220V 2VAdapter
4
lahuman.jabsiri.co.kr
Adapter Pattern-2
- How can make? -
Class Adapter
자바의 상속을 이용하여 인터페이스 구현
Object Adapter
객체를 내부 멤버 변수로 선언하고 인터페이스 구현
두 방식의 결과는 같음
소스 : https://github.com/lahuman/study4DesignPattern/tree/master/StructuralDesignPatterns/src/kr/pe/lahuman/adapter
5
lahuman.jabsiri.co.kr
Composite Pattern-1
- What is Composite Pattern? -
객체와 객체의 그룹을 구분없이 하나의 인터페이스로 구분 없
이 사용
Composite Pattern 은 대부분 다음의 객체로 구성
Base Component – Leaf 객체에 구성이 되는 인터페이스
Leaf – Base Component 를 상속받아 동작을 구현
Composite – base Component 의 그룹을 가지고 있으며 그룹을
관리와 명령 (operation) 을 실행
6
lahuman.jabsiri.co.kr
Composite Pattern-2
- How can make? -
이해를 돕기 위한 예제 :
원 , 라인 , 삼각형 등 의 선택된 객체에 모두 같은 색으로 채
우는 프로그램
소스 : https://github.com/lahuman/study4DesignPattern/tree/master/StructuralDesignPatterns/src/kr/pe/lahuman/composite
7
lahuman.jabsiri.co.kr
Proxy Pattern-1
- What is Proxy Pattern? -
실제 사용하려는 객체를 대신해서 역활을 해주는 패턴
사용 예
Virtual Proxy – 객체 생성에 많은 비용이 발생시 사용
Remote Proxy – 원격객체에 대한 로컬의 대리자 역활
Protection Proxy – 접근제어가 필요한 객체에 대한 접근을 통제
Smart Reference – 실제객체에 접근할때 부가적인 기능 수행
8
lahuman.jabsiri.co.kr
Proxy Pattern-2
- How can make? -
이해를 돕기 위한 예제 :
- 클라이언트에서 서버에 특정 명령을 실행하는 클래스
- 서버의 시스템 파일을 지우는 명령이 실행 될 경우 문제가 발생
- Proxy 클래스를 생성하고 허용된 사용자에게만 프로그램 허용
소스 : https://github.com/lahuman/study4DesignPattern/tree/master/StructuralDesignPatterns/src/kr/pe/lahuman/proxy
9
lahuman.jabsiri.co.kr
Flyweight Pattern-1
- What is Flyweight Pattern? -
효율적으로 세분화된 많은 수의 객체를 지원하기 위해 공유를
사용 하는 패턴
한번 생성된 객체는 두번 생성하지않고 풀 (POOL) 을 이용한 관
리
큰 객체를 몇개 생성할 경우
많은 메모리를 사용하는 객체를 생성하고 생성에 많은 시간이
소요될 경우
10
lahuman.jabsiri.co.kr
Flyweight Pattern-2
- How can make? -
이해를 돕기 위한 예제 :
- 공유 객체를 return 하는 flyweight factory 클래스 생성
- Shape 를 구현한 Line 과 Oval 객체가 있고 , Oval 은 색상에 대한
외부 요소를 가짐
소스 : https://github.com/lahuman/study4DesignPattern/tree/master/StructuralDesignPatterns/src/kr/pe/lahuman/flyweight
11
lahuman.jabsiri.co.kr
참고 URL
http://www.journaldev.com/1562/flyweight-pattern-in-java-example-tutorial
http://www.oodesign.com/flyweight-pattern.html
12
lahuman.jabsiri.co.kr
All text and image content in this document is licensed under the Creative Commons Attribution-Share Alike 3.0 License
(unless otherwise specified). "LibreOffice" and "The Document Foundation" are registered trademarks. Their respective logos
and icons are subject to international copyright laws. The use of these therefore is subject to the trademark policy.
감사합니다 .
이전 자료 : http://www.slideshare.net/lahuman1
블로그 : http://lahuman.jabsiri.co.kr
이문서는 LibreOffice 의 Templet 을 이용해 제작 되었습니다 .

Mais conteúdo relacionado

Mais procurados

[D2 CAMPUS] tech meet up(Back-end) - 교내 웹서비스 개발 일지 (박은찬님)
[D2 CAMPUS] tech meet up(Back-end) - 교내 웹서비스 개발 일지 (박은찬님)[D2 CAMPUS] tech meet up(Back-end) - 교내 웹서비스 개발 일지 (박은찬님)
[D2 CAMPUS] tech meet up(Back-end) - 교내 웹서비스 개발 일지 (박은찬님)NAVER D2
 
[125]react로개발자2명이플랫폼4개를서비스하는이야기 심상민
[125]react로개발자2명이플랫폼4개를서비스하는이야기 심상민[125]react로개발자2명이플랫폼4개를서비스하는이야기 심상민
[125]react로개발자2명이플랫폼4개를서비스하는이야기 심상민NAVER D2
 
GraphQL in Action - REST와 이별할 때 생각해야 하는 것들
GraphQL in Action - REST와 이별할 때 생각해야 하는 것들GraphQL in Action - REST와 이별할 때 생각해야 하는 것들
GraphQL in Action - REST와 이별할 때 생각해야 하는 것들Kivol
 
Vingle tech talk #1
Vingle tech talk #1Vingle tech talk #1
Vingle tech talk #1Tylor Shin
 
티켓몬스터를 위한 PHP 개발 방법
티켓몬스터를 위한 PHP 개발 방법티켓몬스터를 위한 PHP 개발 방법
티켓몬스터를 위한 PHP 개발 방법Young D
 
한글 형태소 분석기 활용하기
한글 형태소 분석기 활용하기한글 형태소 분석기 활용하기
한글 형태소 분석기 활용하기흥래 김
 
예제를 통해 쉽게_살펴보는_뷰제이에스
예제를 통해 쉽게_살펴보는_뷰제이에스예제를 통해 쉽게_살펴보는_뷰제이에스
예제를 통해 쉽게_살펴보는_뷰제이에스Dexter Jung
 
200819 NAVER TECH CONCERT 08_성능을 고민하는 슬기로운 개발자 생활
200819 NAVER TECH CONCERT 08_성능을 고민하는 슬기로운 개발자 생활200819 NAVER TECH CONCERT 08_성능을 고민하는 슬기로운 개발자 생활
200819 NAVER TECH CONCERT 08_성능을 고민하는 슬기로운 개발자 생활NAVER Engineering
 
[부스트캠프 Tech Talk]손정현_PUB/SUB를 적용한 Todo앱 만들기(순한맛)
[부스트캠프 Tech Talk]손정현_PUB/SUB를 적용한 Todo앱 만들기(순한맛)[부스트캠프 Tech Talk]손정현_PUB/SUB를 적용한 Todo앱 만들기(순한맛)
[부스트캠프 Tech Talk]손정현_PUB/SUB를 적용한 Todo앱 만들기(순한맛)CONNECT FOUNDATION
 
[114]angularvs react 김훈민손찬욱
[114]angularvs react 김훈민손찬욱[114]angularvs react 김훈민손찬욱
[114]angularvs react 김훈민손찬욱NAVER D2
 
[123] electron 김성훈
[123] electron 김성훈[123] electron 김성훈
[123] electron 김성훈NAVER D2
 
제 5회 D2 CAMPUS SEMINAR - Swift로 만든 serverframework 개발기
제 5회 D2 CAMPUS SEMINAR - Swift로 만든 serverframework 개발기제 5회 D2 CAMPUS SEMINAR - Swift로 만든 serverframework 개발기
제 5회 D2 CAMPUS SEMINAR - Swift로 만든 serverframework 개발기NAVER D2
 
Electron mainprocess
Electron mainprocessElectron mainprocess
Electron mainprocessDaehwan Lee
 
커뮤니티와 함께한 예비개발자 성장기- 조성수님
커뮤니티와 함께한 예비개발자 성장기- 조성수님커뮤니티와 함께한 예비개발자 성장기- 조성수님
커뮤니티와 함께한 예비개발자 성장기- 조성수님NAVER D2
 
PHP로 웹개발을 해보자
PHP로 웹개발을 해보자PHP로 웹개발을 해보자
PHP로 웹개발을 해보자Young Min Shin
 
[D2 campus]착 하면 척! chak 서비스 개발기
[D2 campus]착 하면 척! chak 서비스 개발기[D2 campus]착 하면 척! chak 서비스 개발기
[D2 campus]착 하면 척! chak 서비스 개발기NAVER D2
 
Kgc2014 삼한제국기 포스트모템 김찬웅
Kgc2014 삼한제국기 포스트모템 김찬웅Kgc2014 삼한제국기 포스트모템 김찬웅
Kgc2014 삼한제국기 포스트모템 김찬웅Chanwoong Kim
 
[부스트캠퍼세미나]육진혁_(대충 도커 쓰자는 이야기)
[부스트캠퍼세미나]육진혁_(대충 도커 쓰자는 이야기)[부스트캠퍼세미나]육진혁_(대충 도커 쓰자는 이야기)
[부스트캠퍼세미나]육진혁_(대충 도커 쓰자는 이야기)CONNECT FOUNDATION
 
리액트 적용기
리액트 적용기리액트 적용기
리액트 적용기Hun Yong Song
 
개발 방식을 바꾸는 15가지 기술
개발 방식을 바꾸는 15가지 기술개발 방식을 바꾸는 15가지 기술
개발 방식을 바꾸는 15가지 기술중선 곽
 

Mais procurados (20)

[D2 CAMPUS] tech meet up(Back-end) - 교내 웹서비스 개발 일지 (박은찬님)
[D2 CAMPUS] tech meet up(Back-end) - 교내 웹서비스 개발 일지 (박은찬님)[D2 CAMPUS] tech meet up(Back-end) - 교내 웹서비스 개발 일지 (박은찬님)
[D2 CAMPUS] tech meet up(Back-end) - 교내 웹서비스 개발 일지 (박은찬님)
 
[125]react로개발자2명이플랫폼4개를서비스하는이야기 심상민
[125]react로개발자2명이플랫폼4개를서비스하는이야기 심상민[125]react로개발자2명이플랫폼4개를서비스하는이야기 심상민
[125]react로개발자2명이플랫폼4개를서비스하는이야기 심상민
 
GraphQL in Action - REST와 이별할 때 생각해야 하는 것들
GraphQL in Action - REST와 이별할 때 생각해야 하는 것들GraphQL in Action - REST와 이별할 때 생각해야 하는 것들
GraphQL in Action - REST와 이별할 때 생각해야 하는 것들
 
Vingle tech talk #1
Vingle tech talk #1Vingle tech talk #1
Vingle tech talk #1
 
티켓몬스터를 위한 PHP 개발 방법
티켓몬스터를 위한 PHP 개발 방법티켓몬스터를 위한 PHP 개발 방법
티켓몬스터를 위한 PHP 개발 방법
 
한글 형태소 분석기 활용하기
한글 형태소 분석기 활용하기한글 형태소 분석기 활용하기
한글 형태소 분석기 활용하기
 
예제를 통해 쉽게_살펴보는_뷰제이에스
예제를 통해 쉽게_살펴보는_뷰제이에스예제를 통해 쉽게_살펴보는_뷰제이에스
예제를 통해 쉽게_살펴보는_뷰제이에스
 
200819 NAVER TECH CONCERT 08_성능을 고민하는 슬기로운 개발자 생활
200819 NAVER TECH CONCERT 08_성능을 고민하는 슬기로운 개발자 생활200819 NAVER TECH CONCERT 08_성능을 고민하는 슬기로운 개발자 생활
200819 NAVER TECH CONCERT 08_성능을 고민하는 슬기로운 개발자 생활
 
[부스트캠프 Tech Talk]손정현_PUB/SUB를 적용한 Todo앱 만들기(순한맛)
[부스트캠프 Tech Talk]손정현_PUB/SUB를 적용한 Todo앱 만들기(순한맛)[부스트캠프 Tech Talk]손정현_PUB/SUB를 적용한 Todo앱 만들기(순한맛)
[부스트캠프 Tech Talk]손정현_PUB/SUB를 적용한 Todo앱 만들기(순한맛)
 
[114]angularvs react 김훈민손찬욱
[114]angularvs react 김훈민손찬욱[114]angularvs react 김훈민손찬욱
[114]angularvs react 김훈민손찬욱
 
[123] electron 김성훈
[123] electron 김성훈[123] electron 김성훈
[123] electron 김성훈
 
제 5회 D2 CAMPUS SEMINAR - Swift로 만든 serverframework 개발기
제 5회 D2 CAMPUS SEMINAR - Swift로 만든 serverframework 개발기제 5회 D2 CAMPUS SEMINAR - Swift로 만든 serverframework 개발기
제 5회 D2 CAMPUS SEMINAR - Swift로 만든 serverframework 개발기
 
Electron mainprocess
Electron mainprocessElectron mainprocess
Electron mainprocess
 
커뮤니티와 함께한 예비개발자 성장기- 조성수님
커뮤니티와 함께한 예비개발자 성장기- 조성수님커뮤니티와 함께한 예비개발자 성장기- 조성수님
커뮤니티와 함께한 예비개발자 성장기- 조성수님
 
PHP로 웹개발을 해보자
PHP로 웹개발을 해보자PHP로 웹개발을 해보자
PHP로 웹개발을 해보자
 
[D2 campus]착 하면 척! chak 서비스 개발기
[D2 campus]착 하면 척! chak 서비스 개발기[D2 campus]착 하면 척! chak 서비스 개발기
[D2 campus]착 하면 척! chak 서비스 개발기
 
Kgc2014 삼한제국기 포스트모템 김찬웅
Kgc2014 삼한제국기 포스트모템 김찬웅Kgc2014 삼한제국기 포스트모템 김찬웅
Kgc2014 삼한제국기 포스트모템 김찬웅
 
[부스트캠퍼세미나]육진혁_(대충 도커 쓰자는 이야기)
[부스트캠퍼세미나]육진혁_(대충 도커 쓰자는 이야기)[부스트캠퍼세미나]육진혁_(대충 도커 쓰자는 이야기)
[부스트캠퍼세미나]육진혁_(대충 도커 쓰자는 이야기)
 
리액트 적용기
리액트 적용기리액트 적용기
리액트 적용기
 
개발 방식을 바꾸는 15가지 기술
개발 방식을 바꾸는 15가지 기술개발 방식을 바꾸는 15가지 기술
개발 방식을 바꾸는 15가지 기술
 

Destaque

Learn design pattern-1
Learn design pattern-1Learn design pattern-1
Learn design pattern-1Daniel Lim
 
예제로 보는 Pattern 연상법
예제로 보는 Pattern 연상법예제로 보는 Pattern 연상법
예제로 보는 Pattern 연상법hyun soomyung
 
Proxy pattern
Proxy patternProxy pattern
Proxy patternscor7910
 
Scalable system design patterns
Scalable system design patternsScalable system design patterns
Scalable system design patternsSteve Min
 
Adapter pattern 한진수
Adapter pattern 한진수Adapter pattern 한진수
Adapter pattern 한진수진수 한
 
데브루키 스터디 발표
데브루키 스터디 발표데브루키 스터디 발표
데브루키 스터디 발표dagri82
 
Oop design principle
Oop design principleOop design principle
Oop design principleRyan Park
 
게임 개발에 자주 사용되는 디자인 패턴
게임 개발에 자주 사용되는 디자인 패턴게임 개발에 자주 사용되는 디자인 패턴
게임 개발에 자주 사용되는 디자인 패턴예림 임
 
블랙보드 개발 중인 기능
블랙보드 개발 중인 기능블랙보드 개발 중인 기능
블랙보드 개발 중인 기능미나 최
 
Team10:TenTen for blackboard
Team10:TenTen for blackboardTeam10:TenTen for blackboard
Team10:TenTen for blackboardJong-hoon Baek
 
Publish Subscriber messaging pattern
Publish Subscriber messaging patternPublish Subscriber messaging pattern
Publish Subscriber messaging patternShirish Bari
 
Design pattern study 6 command pattern
Design pattern study 6 command patternDesign pattern study 6 command pattern
Design pattern study 6 command patterndragor0123
 
Design patterns 스터디 - Singleton 패턴
Design patterns 스터디 - Singleton 패턴Design patterns 스터디 - Singleton 패턴
Design patterns 스터디 - Singleton 패턴Hyunho-Cho
 
Observer pattern dragor
Observer pattern dragorObserver pattern dragor
Observer pattern dragordragor0123
 
Decorator pattern
Decorator patternDecorator pattern
Decorator patternkidoki
 
Design patterns 스터디 -Decorator 패턴
Design patterns 스터디 -Decorator 패턴Design patterns 스터디 -Decorator 패턴
Design patterns 스터디 -Decorator 패턴Hyunho-Cho
 

Destaque (20)

Learn design pattern-1
Learn design pattern-1Learn design pattern-1
Learn design pattern-1
 
예제로 보는 Pattern 연상법
예제로 보는 Pattern 연상법예제로 보는 Pattern 연상법
예제로 보는 Pattern 연상법
 
Proxy pattern
Proxy patternProxy pattern
Proxy pattern
 
Scalable system design patterns
Scalable system design patternsScalable system design patterns
Scalable system design patterns
 
Adapter pattern 한진수
Adapter pattern 한진수Adapter pattern 한진수
Adapter pattern 한진수
 
데브루키 스터디 발표
데브루키 스터디 발표데브루키 스터디 발표
데브루키 스터디 발표
 
Oop design principle
Oop design principleOop design principle
Oop design principle
 
게임 개발에 자주 사용되는 디자인 패턴
게임 개발에 자주 사용되는 디자인 패턴게임 개발에 자주 사용되는 디자인 패턴
게임 개발에 자주 사용되는 디자인 패턴
 
PLoP 09 review
PLoP 09 reviewPLoP 09 review
PLoP 09 review
 
Adapter Pattern
Adapter PatternAdapter Pattern
Adapter Pattern
 
Bridge
BridgeBridge
Bridge
 
블랙보드 개발 중인 기능
블랙보드 개발 중인 기능블랙보드 개발 중인 기능
블랙보드 개발 중인 기능
 
Pattern and EA
Pattern and EAPattern and EA
Pattern and EA
 
Team10:TenTen for blackboard
Team10:TenTen for blackboardTeam10:TenTen for blackboard
Team10:TenTen for blackboard
 
Publish Subscriber messaging pattern
Publish Subscriber messaging patternPublish Subscriber messaging pattern
Publish Subscriber messaging pattern
 
Design pattern study 6 command pattern
Design pattern study 6 command patternDesign pattern study 6 command pattern
Design pattern study 6 command pattern
 
Design patterns 스터디 - Singleton 패턴
Design patterns 스터디 - Singleton 패턴Design patterns 스터디 - Singleton 패턴
Design patterns 스터디 - Singleton 패턴
 
Observer pattern dragor
Observer pattern dragorObserver pattern dragor
Observer pattern dragor
 
Decorator pattern
Decorator patternDecorator pattern
Decorator pattern
 
Design patterns 스터디 -Decorator 패턴
Design patterns 스터디 -Decorator 패턴Design patterns 스터디 -Decorator 패턴
Design patterns 스터디 -Decorator 패턴
 

Semelhante a Design pattern 4

XECon2015 :: [2-1] 정광섭 - 처음 시작하는 laravel
XECon2015 :: [2-1] 정광섭 - 처음 시작하는 laravelXECon2015 :: [2-1] 정광섭 - 처음 시작하는 laravel
XECon2015 :: [2-1] 정광섭 - 처음 시작하는 laravelXpressEngine
 
처음 시작하는 라라벨
처음 시작하는 라라벨처음 시작하는 라라벨
처음 시작하는 라라벨KwangSeob Jeong
 
LucideWorks Banana 소개
LucideWorks Banana 소개 LucideWorks Banana 소개
LucideWorks Banana 소개 SuHyun Jeon
 
파이썬 플라스크 이해하기
파이썬 플라스크 이해하기 파이썬 플라스크 이해하기
파이썬 플라스크 이해하기 Yong Joon Moon
 
서버 아키텍처 이해를 위한 프로세스와 쓰레드
서버 아키텍처 이해를 위한 프로세스와 쓰레드서버 아키텍처 이해를 위한 프로세스와 쓰레드
서버 아키텍처 이해를 위한 프로세스와 쓰레드KwangSeob Jeong
 
Let'Swift 2023 Swift Macro, 어디다 쓰죠?
Let'Swift 2023 Swift Macro, 어디다 쓰죠?Let'Swift 2023 Swift Macro, 어디다 쓰죠?
Let'Swift 2023 Swift Macro, 어디다 쓰죠?williciousk
 
[1A4]자바스크립트 라이브러리 개발 운영 경험기
[1A4]자바스크립트 라이브러리 개발 운영 경험기[1A4]자바스크립트 라이브러리 개발 운영 경험기
[1A4]자바스크립트 라이브러리 개발 운영 경험기NAVER D2
 
How_to_choose_the_right_framework
How_to_choose_the_right_frameworkHow_to_choose_the_right_framework
How_to_choose_the_right_frameworkJT Jintae Jung
 
Spring Boot + React + Gradle in VSCode
Spring Boot + React + Gradle in VSCodeSpring Boot + React + Gradle in VSCode
Spring Boot + React + Gradle in VSCodedpTablo
 
도구를 활용한 더 나은 웹 개발: Yeoman
도구를 활용한 더 나은 웹 개발: Yeoman도구를 활용한 더 나은 웹 개발: Yeoman
도구를 활용한 더 나은 웹 개발: YeomanJae Sung Park
 
메이븐 기본 이해
메이븐 기본 이해메이븐 기본 이해
메이븐 기본 이해중선 곽
 
테스터도 알아야 할 웹 개발(테스트 교육 3장 1절 부분발췌)
테스터도 알아야 할 웹 개발(테스트 교육 3장 1절 부분발췌)테스터도 알아야 할 웹 개발(테스트 교육 3장 1절 부분발췌)
테스터도 알아야 할 웹 개발(테스트 교육 3장 1절 부분발췌)SangIn Choung
 
레일스를 이용한 애자일 웹 개발 가이드
레일스를 이용한 애자일 웹 개발 가이드레일스를 이용한 애자일 웹 개발 가이드
레일스를 이용한 애자일 웹 개발 가이드Sukjoon Kim
 
스프링 스터디 1장
스프링 스터디 1장스프링 스터디 1장
스프링 스터디 1장Seongchan Kang
 
디자인패턴
디자인패턴디자인패턴
디자인패턴진화 손
 
[커빙 아키텍쳐] 커빙은 어떻게 소셜 컨텐츠를 모아올까요?
[커빙 아키텍쳐] 커빙은 어떻게 소셜 컨텐츠를 모아올까요?[커빙 아키텍쳐] 커빙은 어떻게 소셜 컨텐츠를 모아올까요?
[커빙 아키텍쳐] 커빙은 어떻게 소셜 컨텐츠를 모아올까요?주식회사 내일비
 
[커빙 아키텍쳐] 커빙은 어떻게 소셜 컨텐츠를 모아올까요?
[커빙 아키텍쳐] 커빙은 어떻게 소셜 컨텐츠를 모아올까요?[커빙 아키텍쳐] 커빙은 어떻게 소셜 컨텐츠를 모아올까요?
[커빙 아키텍쳐] 커빙은 어떻게 소셜 컨텐츠를 모아올까요?Sang-ho Choi
 

Semelhante a Design pattern 4 (20)

XECon2015 :: [2-1] 정광섭 - 처음 시작하는 laravel
XECon2015 :: [2-1] 정광섭 - 처음 시작하는 laravelXECon2015 :: [2-1] 정광섭 - 처음 시작하는 laravel
XECon2015 :: [2-1] 정광섭 - 처음 시작하는 laravel
 
처음 시작하는 라라벨
처음 시작하는 라라벨처음 시작하는 라라벨
처음 시작하는 라라벨
 
LucideWorks Banana 소개
LucideWorks Banana 소개 LucideWorks Banana 소개
LucideWorks Banana 소개
 
Electron forge
Electron forgeElectron forge
Electron forge
 
파이썬 플라스크 이해하기
파이썬 플라스크 이해하기 파이썬 플라스크 이해하기
파이썬 플라스크 이해하기
 
서버 아키텍처 이해를 위한 프로세스와 쓰레드
서버 아키텍처 이해를 위한 프로세스와 쓰레드서버 아키텍처 이해를 위한 프로세스와 쓰레드
서버 아키텍처 이해를 위한 프로세스와 쓰레드
 
Let'Swift 2023 Swift Macro, 어디다 쓰죠?
Let'Swift 2023 Swift Macro, 어디다 쓰죠?Let'Swift 2023 Swift Macro, 어디다 쓰죠?
Let'Swift 2023 Swift Macro, 어디다 쓰죠?
 
[1A4]자바스크립트 라이브러리 개발 운영 경험기
[1A4]자바스크립트 라이브러리 개발 운영 경험기[1A4]자바스크립트 라이브러리 개발 운영 경험기
[1A4]자바스크립트 라이브러리 개발 운영 경험기
 
deview2014
deview2014deview2014
deview2014
 
How_to_choose_the_right_framework
How_to_choose_the_right_frameworkHow_to_choose_the_right_framework
How_to_choose_the_right_framework
 
Design patterns
Design patternsDesign patterns
Design patterns
 
Spring Boot + React + Gradle in VSCode
Spring Boot + React + Gradle in VSCodeSpring Boot + React + Gradle in VSCode
Spring Boot + React + Gradle in VSCode
 
도구를 활용한 더 나은 웹 개발: Yeoman
도구를 활용한 더 나은 웹 개발: Yeoman도구를 활용한 더 나은 웹 개발: Yeoman
도구를 활용한 더 나은 웹 개발: Yeoman
 
메이븐 기본 이해
메이븐 기본 이해메이븐 기본 이해
메이븐 기본 이해
 
테스터도 알아야 할 웹 개발(테스트 교육 3장 1절 부분발췌)
테스터도 알아야 할 웹 개발(테스트 교육 3장 1절 부분발췌)테스터도 알아야 할 웹 개발(테스트 교육 3장 1절 부분발췌)
테스터도 알아야 할 웹 개발(테스트 교육 3장 1절 부분발췌)
 
레일스를 이용한 애자일 웹 개발 가이드
레일스를 이용한 애자일 웹 개발 가이드레일스를 이용한 애자일 웹 개발 가이드
레일스를 이용한 애자일 웹 개발 가이드
 
스프링 스터디 1장
스프링 스터디 1장스프링 스터디 1장
스프링 스터디 1장
 
디자인패턴
디자인패턴디자인패턴
디자인패턴
 
[커빙 아키텍쳐] 커빙은 어떻게 소셜 컨텐츠를 모아올까요?
[커빙 아키텍쳐] 커빙은 어떻게 소셜 컨텐츠를 모아올까요?[커빙 아키텍쳐] 커빙은 어떻게 소셜 컨텐츠를 모아올까요?
[커빙 아키텍쳐] 커빙은 어떻게 소셜 컨텐츠를 모아올까요?
 
[커빙 아키텍쳐] 커빙은 어떻게 소셜 컨텐츠를 모아올까요?
[커빙 아키텍쳐] 커빙은 어떻게 소셜 컨텐츠를 모아올까요?[커빙 아키텍쳐] 커빙은 어떻게 소셜 컨텐츠를 모아올까요?
[커빙 아키텍쳐] 커빙은 어떻게 소셜 컨텐츠를 모아올까요?
 

Mais de Daniel Lim

내가 생각하는 개발자란?
내가 생각하는 개발자란?내가 생각하는 개발자란?
내가 생각하는 개발자란?Daniel Lim
 
개발자를 넘어 기술 리더로 가는 길을 읽고
개발자를 넘어 기술 리더로 가는 길을 읽고개발자를 넘어 기술 리더로 가는 길을 읽고
개발자를 넘어 기술 리더로 가는 길을 읽고Daniel Lim
 
스크럼 101
스크럼 101스크럼 101
스크럼 101Daniel Lim
 
nodejs_101.pdf
nodejs_101.pdfnodejs_101.pdf
nodejs_101.pdfDaniel Lim
 
피드백 시스템
피드백 시스템피드백 시스템
피드백 시스템Daniel Lim
 
12.context api
12.context api12.context api
12.context apiDaniel Lim
 
11.react router dom
11.react router dom11.react router dom
11.react router domDaniel Lim
 
9.component style
9.component style9.component style
9.component styleDaniel Lim
 
7.component life cycle
7.component life cycle7.component life cycle
7.component life cycleDaniel Lim
 
6.component repeat
6.component repeat6.component repeat
6.component repeatDaniel Lim
 
4.event handling
4.event handling4.event handling
4.event handlingDaniel Lim
 
3.component 101
3.component 1013.component 101
3.component 101Daniel Lim
 
Swagger? OAS? with NodeJS
Swagger? OAS? with NodeJSSwagger? OAS? with NodeJS
Swagger? OAS? with NodeJSDaniel Lim
 

Mais de Daniel Lim (20)

내가 생각하는 개발자란?
내가 생각하는 개발자란?내가 생각하는 개발자란?
내가 생각하는 개발자란?
 
개발자를 넘어 기술 리더로 가는 길을 읽고
개발자를 넘어 기술 리더로 가는 길을 읽고개발자를 넘어 기술 리더로 가는 길을 읽고
개발자를 넘어 기술 리더로 가는 길을 읽고
 
스크럼 101
스크럼 101스크럼 101
스크럼 101
 
nodejs_101.pdf
nodejs_101.pdfnodejs_101.pdf
nodejs_101.pdf
 
For You
For YouFor You
For You
 
Nest js 101
Nest js 101Nest js 101
Nest js 101
 
피드백 시스템
피드백 시스템피드백 시스템
피드백 시스템
 
13.code split
13.code split13.code split
13.code split
 
12.context api
12.context api12.context api
12.context api
 
11.react router dom
11.react router dom11.react router dom
11.react router dom
 
9.component style
9.component style9.component style
9.component style
 
7.component life cycle
7.component life cycle7.component life cycle
7.component life cycle
 
8.hooks
8.hooks8.hooks
8.hooks
 
6.component repeat
6.component repeat6.component repeat
6.component repeat
 
4.event handling
4.event handling4.event handling
4.event handling
 
5.ref 101
5.ref 1015.ref 101
5.ref 101
 
3.component 101
3.component 1013.component 101
3.component 101
 
2.jsx 101
2.jsx 1012.jsx 101
2.jsx 101
 
1.react 101
1.react 1011.react 101
1.react 101
 
Swagger? OAS? with NodeJS
Swagger? OAS? with NodeJSSwagger? OAS? with NodeJS
Swagger? OAS? with NodeJS
 

Último

Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)Wonjun Hwang
 
A future that integrates LLMs and LAMs (Symposium)
A future that integrates LLMs and LAMs (Symposium)A future that integrates LLMs and LAMs (Symposium)
A future that integrates LLMs and LAMs (Symposium)Tae Young Lee
 
MOODv2 : Masked Image Modeling for Out-of-Distribution Detection
MOODv2 : Masked Image Modeling for Out-of-Distribution DetectionMOODv2 : Masked Image Modeling for Out-of-Distribution Detection
MOODv2 : Masked Image Modeling for Out-of-Distribution DetectionKim Daeun
 
Merge (Kitworks Team Study 이성수 발표자료 240426)
Merge (Kitworks Team Study 이성수 발표자료 240426)Merge (Kitworks Team Study 이성수 발표자료 240426)
Merge (Kitworks Team Study 이성수 발표자료 240426)Wonjun Hwang
 
캐드앤그래픽스 2024년 5월호 목차
캐드앤그래픽스 2024년 5월호 목차캐드앤그래픽스 2024년 5월호 목차
캐드앤그래픽스 2024년 5월호 목차캐드앤그래픽스
 
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...Kim Daeun
 

Último (6)

Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)
 
A future that integrates LLMs and LAMs (Symposium)
A future that integrates LLMs and LAMs (Symposium)A future that integrates LLMs and LAMs (Symposium)
A future that integrates LLMs and LAMs (Symposium)
 
MOODv2 : Masked Image Modeling for Out-of-Distribution Detection
MOODv2 : Masked Image Modeling for Out-of-Distribution DetectionMOODv2 : Masked Image Modeling for Out-of-Distribution Detection
MOODv2 : Masked Image Modeling for Out-of-Distribution Detection
 
Merge (Kitworks Team Study 이성수 발표자료 240426)
Merge (Kitworks Team Study 이성수 발표자료 240426)Merge (Kitworks Team Study 이성수 발표자료 240426)
Merge (Kitworks Team Study 이성수 발표자료 240426)
 
캐드앤그래픽스 2024년 5월호 목차
캐드앤그래픽스 2024년 5월호 목차캐드앤그래픽스 2024년 5월호 목차
캐드앤그래픽스 2024년 5월호 목차
 
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
 

Design pattern 4

  • 1. 1 lahuman.jabsiri.co.kr Design Pattern-4 Structural Design Pattern-1 Version 2015-03-04 –임광규 lahuman@daum.net
  • 2. 2 lahuman.jabsiri.co.kr Agenda Adapter Pattern Composite Pattern Proxy Pattern Flyweight Pattern Facade Pattern Bridge Pattern Decorator Pattern
  • 3. 3 lahuman.jabsiri.co.kr Adapter Pattern-1 - What is Adapter Pattern? - 관련 없는 인터페이스를 함께 사용할수 있도록 지원 휴대폰 충전기 같이 가정용 전력 (220V) 를 휴대폰이 요구하는 전력 (2V) 으로 변환 220V 2VAdapter
  • 4. 4 lahuman.jabsiri.co.kr Adapter Pattern-2 - How can make? - Class Adapter 자바의 상속을 이용하여 인터페이스 구현 Object Adapter 객체를 내부 멤버 변수로 선언하고 인터페이스 구현 두 방식의 결과는 같음 소스 : https://github.com/lahuman/study4DesignPattern/tree/master/StructuralDesignPatterns/src/kr/pe/lahuman/adapter
  • 5. 5 lahuman.jabsiri.co.kr Composite Pattern-1 - What is Composite Pattern? - 객체와 객체의 그룹을 구분없이 하나의 인터페이스로 구분 없 이 사용 Composite Pattern 은 대부분 다음의 객체로 구성 Base Component – Leaf 객체에 구성이 되는 인터페이스 Leaf – Base Component 를 상속받아 동작을 구현 Composite – base Component 의 그룹을 가지고 있으며 그룹을 관리와 명령 (operation) 을 실행
  • 6. 6 lahuman.jabsiri.co.kr Composite Pattern-2 - How can make? - 이해를 돕기 위한 예제 : 원 , 라인 , 삼각형 등 의 선택된 객체에 모두 같은 색으로 채 우는 프로그램 소스 : https://github.com/lahuman/study4DesignPattern/tree/master/StructuralDesignPatterns/src/kr/pe/lahuman/composite
  • 7. 7 lahuman.jabsiri.co.kr Proxy Pattern-1 - What is Proxy Pattern? - 실제 사용하려는 객체를 대신해서 역활을 해주는 패턴 사용 예 Virtual Proxy – 객체 생성에 많은 비용이 발생시 사용 Remote Proxy – 원격객체에 대한 로컬의 대리자 역활 Protection Proxy – 접근제어가 필요한 객체에 대한 접근을 통제 Smart Reference – 실제객체에 접근할때 부가적인 기능 수행
  • 8. 8 lahuman.jabsiri.co.kr Proxy Pattern-2 - How can make? - 이해를 돕기 위한 예제 : - 클라이언트에서 서버에 특정 명령을 실행하는 클래스 - 서버의 시스템 파일을 지우는 명령이 실행 될 경우 문제가 발생 - Proxy 클래스를 생성하고 허용된 사용자에게만 프로그램 허용 소스 : https://github.com/lahuman/study4DesignPattern/tree/master/StructuralDesignPatterns/src/kr/pe/lahuman/proxy
  • 9. 9 lahuman.jabsiri.co.kr Flyweight Pattern-1 - What is Flyweight Pattern? - 효율적으로 세분화된 많은 수의 객체를 지원하기 위해 공유를 사용 하는 패턴 한번 생성된 객체는 두번 생성하지않고 풀 (POOL) 을 이용한 관 리 큰 객체를 몇개 생성할 경우 많은 메모리를 사용하는 객체를 생성하고 생성에 많은 시간이 소요될 경우
  • 10. 10 lahuman.jabsiri.co.kr Flyweight Pattern-2 - How can make? - 이해를 돕기 위한 예제 : - 공유 객체를 return 하는 flyweight factory 클래스 생성 - Shape 를 구현한 Line 과 Oval 객체가 있고 , Oval 은 색상에 대한 외부 요소를 가짐 소스 : https://github.com/lahuman/study4DesignPattern/tree/master/StructuralDesignPatterns/src/kr/pe/lahuman/flyweight
  • 12. 12 lahuman.jabsiri.co.kr All text and image content in this document is licensed under the Creative Commons Attribution-Share Alike 3.0 License (unless otherwise specified). "LibreOffice" and "The Document Foundation" are registered trademarks. Their respective logos and icons are subject to international copyright laws. The use of these therefore is subject to the trademark policy. 감사합니다 . 이전 자료 : http://www.slideshare.net/lahuman1 블로그 : http://lahuman.jabsiri.co.kr 이문서는 LibreOffice 의 Templet 을 이용해 제작 되었습니다 .