SlideShare ist ein Scribd-Unternehmen logo
1 von 15
Design Pattern(1)
시작하기 전에 알아야 할 것들
임광규
목차
• What is Design Pattern?
• OOP 4대 기본 원칙
• SRP(Single Responsibility)
• OCP(Open Close)
• LSP(Liskov Substitution)
• ISP(Interface Segregation)
• DIP(Dependency Inversion)
What is Design Pattern?
• 많은 개발자들에 의해 입증된 방법
• 두 가지 주요 사용 이유
1. 개발자와 설계자의 공통 언어
2. 좋은 사례 모음
• OO(Object Orientated) 의 기본 원칙을
기본으로 함
• " 내가 그의 이름을 불러 주기 전에는 그
는 다만 하나의 몸짓에 지나지 않았다."
- 김춘수님의 꽃
OOP 4대 기본 원칙
• Abstraction(추상화)
– 데이터나 프로세스 등을 의미기 비슷한 개념이나 표
현으로 정의해 나가는 과정이며, 동시에 개발 객체의
구현에 대한 상세함은 감추는 것
• Encapsulation(캡술화)
– 정보의 영역의 한정
– 내부 구현이 변경되더라도 외부에 영향을 최소화
• Inheritance(상속)
– 기능의 재활용 또는 기능의 확장
– 단 구현 상속은 필요할 때만 쓸 것
• Polymorphism(다형성)
– 구현체 변경의 유연함을 제공
SRP(Single Responsibility)
-단일 책임 원칙-
• 하나의 클래스는 하나의 역할만 담당하도
록 설계 한다.
SRP(Single Responsibility)
-예제-
PROCESS :
전달된 Email의 값에 문제가 없으면,
회원 정보를 DB에 등록 하고 가입 완료 내용을 EMAIL로 발송
PROBLEM:
회원 등록과 EMAIL 관련 역할이 하나의 CLASS에 포함 되어 있다.
SOLUTION:
회원과 EMAIL 기능을 가진 CLASS를 각각 분리하여 각 CLASS마다 하나의 역할을 담당 하게 한다.
OCP(Open Close)
-개방 폐쇄의 원칙-
• 확장에 대해 열려 있어야 하고, 변형에 대
해서는 닫혀있어야 한다.
• 표준안을 만드는 것
OCP(Open Close)
-예제-
PROCESS :
도형의 넓이를 구하는 METHOD를 구현한다.
PROBLEM:
초기 Rectangle 만 있을 경우는 문제가
안되었지만, 도형이 추가 될 경우
AreaCalcuator의 area 에서 해당
CLASS에 대한 처리를 진행 하여야 한다.
SOLUTION:
Shape 이라는 인터페이스를 각 도형에서
상속 받아 각 도형들이 넓이를 계산 하도록
변경 하였다.
Shape는 이후 method 추가나 변경은
안되지만, 확장(구현 클래스)에는 열려 있다.
LSP(Liskov Substitution)
-리스코프의 대체 원칙-
• 하위타입(sub type)은 그것의 기반 타입
(base type)에 대해 대체 가능해야 한다.
LSP(Liskov Substitution)
-예제-
PROCESS :
전체 도형의 넓이를 구하는 넓이 계산기
Rectangle 을 상속 받은 Square가 추가
되었을 경우
CalculatorArea 에서 Square를
받아서 처리 할 수 있다
ISP(Interface Segregation)
-인터페이스 분리의 원칙-
• 클라이언트가 꼭 필요하지 않은 인터페이
스 때문에 클라이언트가 영향을 받아서는
안된다.
• 하나의 일반적인 인터페이스 보다는 구체
적인 여러 개의 인터페이스가 낫다
ISP(Interface Segregation)
-예제-
PROCESS :
Stream 이라는 쓰고 읽는 기능을 가진 Interface
PROBLEM:
읽는 기능만 필요할 경우에도, 쓰는 기능 METHOD를 구현 해야 한다
반대의 경우도 마찬가지로 필요하지 않은 METHOD를 구현 해야 한다.
SOLUTION:
쓰는 기능과 읽는 기능의 Interface로 분리 하고,
해당 기능을 상속 받은 각각의 고유한 역할을 가진
CLASS를 구현한다.
DIP(Dependency Inversion)
-의존 역전의 원칙-
• 구현 클래스의 필요에 의해 추상 클래스를
변경 하는 것
PROCESS :
Worker라는 Class를 실행하는 Manager 가 있다.
추가적으로 SuperWorker가 생성 되었다
PROBLEM:
Worker 를 사용하는 Manager Class에서 관리 할 수 없다.
SOLUTION:
IWorker라는 인터페이스를 추가 하고 Worker와
SuperWorker는 그 인터페이스를 구현한다.
Manager에서 IWorker를 사용 하여 구조적인 문제를
해결
DIP(Dependency Inversion)
-예제-
참고 URL
• http://www.zdnet.co.kr/news/news_view.asp?artice_id=00000039134727&t
ype=det
• http://www.zdnet.co.kr/news/news_view.asp?artice_id=00000039135552&t
ype=det
• http://www.zdnet.co.kr/news/news_view.asp?artice_id=00000039139151&t
ype=det
• http://dmh11.tistory.com/32
• http://codebetter.com/raymondlewallen/2005/07/19/4-major-principles-
of-object-oriented-programming/
• http://seodh007.tistory.com/5
• http://www.nextree.co.kr/p6960/
• http://javacan.tistory.com/entry/OO-Basic-1-Object
• http://www.vogella.com/tutorials/DesignPatterns/article.html
• http://www.codeproject.com/Articles/703634/SOLID-architecture-
principles-using-simple-Csharp
• http://blog.gauffin.org/2012/05/solid-principles-with-real-world-examples/

Weitere ähnliche Inhalte

Andere mochten auch

개발 생산성 향상 기법 V1.2
개발 생산성 향상 기법 V1.2개발 생산성 향상 기법 V1.2
개발 생산성 향상 기법 V1.2Daniel Lim
 
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
 
Nodejs, PhantomJS, casperJs, YSlow, expressjs
Nodejs, PhantomJS, casperJs, YSlow, expressjsNodejs, PhantomJS, casperJs, YSlow, expressjs
Nodejs, PhantomJS, casperJs, YSlow, expressjs기동 이
 
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
 
Api design for c++ pattern
Api design for c++ patternApi design for c++ pattern
Api design for c++ patternjinho park
 
Design patterns 스터디 -strategy패턴
Design patterns 스터디 -strategy패턴Design patterns 스터디 -strategy패턴
Design patterns 스터디 -strategy패턴Hyunho-Cho
 
Arquitetura da plataforma com o Biztalk Server
Arquitetura da plataforma com o Biztalk ServerArquitetura da plataforma com o Biztalk Server
Arquitetura da plataforma com o Biztalk ServerMarkus Christen
 
Leadweb Nodejs
Leadweb NodejsLeadweb Nodejs
Leadweb Nodejs근호 최
 
Design pattern study 4 factory pattern _ by dragor0123
Design pattern study 4 factory pattern _ by dragor0123Design pattern study 4 factory pattern _ by dragor0123
Design pattern study 4 factory pattern _ by dragor0123dragor0123
 
Publisher subscriber pattern
Publisher subscriber patternPublisher subscriber pattern
Publisher subscriber patternDaeMyung Kang
 
Studyforprogrammer
StudyforprogrammerStudyforprogrammer
Studyforprogrammerguest0a0b14
 
Abstract factory pattern
Abstract factory patternAbstract factory pattern
Abstract factory patternminjin00
 
HolubOnPatterns/chapter3_2
HolubOnPatterns/chapter3_2HolubOnPatterns/chapter3_2
HolubOnPatterns/chapter3_2Vong Sik Kong
 

Andere mochten auch (20)

개발 생산성 향상 기법 V1.2
개발 생산성 향상 기법 V1.2개발 생산성 향상 기법 V1.2
개발 생산성 향상 기법 V1.2
 
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
 
Nodejs, PhantomJS, casperJs, YSlow, expressjs
Nodejs, PhantomJS, casperJs, YSlow, expressjsNodejs, PhantomJS, casperJs, YSlow, expressjs
Nodejs, PhantomJS, casperJs, YSlow, expressjs
 
Design patterns 스터디 - Singleton 패턴
Design patterns 스터디 - Singleton 패턴Design patterns 스터디 - Singleton 패턴
Design patterns 스터디 - Singleton 패턴
 
Observer pattern dragor
Observer pattern dragorObserver pattern dragor
Observer pattern dragor
 
Api design for c++ pattern
Api design for c++ patternApi design for c++ pattern
Api design for c++ pattern
 
Design patterns 스터디 -strategy패턴
Design patterns 스터디 -strategy패턴Design patterns 스터디 -strategy패턴
Design patterns 스터디 -strategy패턴
 
Arquitetura da plataforma com o Biztalk Server
Arquitetura da plataforma com o Biztalk ServerArquitetura da plataforma com o Biztalk Server
Arquitetura da plataforma com o Biztalk Server
 
Leadweb Nodejs
Leadweb NodejsLeadweb Nodejs
Leadweb Nodejs
 
Design pattern study 4 factory pattern _ by dragor0123
Design pattern study 4 factory pattern _ by dragor0123Design pattern study 4 factory pattern _ by dragor0123
Design pattern study 4 factory pattern _ by dragor0123
 
Publisher subscriber pattern
Publisher subscriber patternPublisher subscriber pattern
Publisher subscriber pattern
 
Studyforprogrammer
StudyforprogrammerStudyforprogrammer
Studyforprogrammer
 
Abstract factory pattern
Abstract factory patternAbstract factory pattern
Abstract factory pattern
 
misspattern
misspatternmisspattern
misspattern
 
HolubOnPatterns/chapter3_2
HolubOnPatterns/chapter3_2HolubOnPatterns/chapter3_2
HolubOnPatterns/chapter3_2
 
Solid
SolidSolid
Solid
 

Ähnlich wie Learn design pattern-1

Oop design principle
Oop design principleOop design principle
Oop design principleRyan Park
 
Oop design principle SOLID
Oop design principle SOLIDOop design principle SOLID
Oop design principle SOLIDRyan Park
 
[Dev rookie]designpattern
[Dev rookie]designpattern[Dev rookie]designpattern
[Dev rookie]designpattern대영 노
 
Mongodb and spatial
Mongodb and spatialMongodb and spatial
Mongodb and spatialJiyoon Kim
 
3팀_객체지향 프로그래밍.pptx
3팀_객체지향 프로그래밍.pptx3팀_객체지향 프로그래밍.pptx
3팀_객체지향 프로그래밍.pptxssuser642b19
 
OOP - Object Oriendted Programing
OOP - Object Oriendted ProgramingOOP - Object Oriendted Programing
OOP - Object Oriendted ProgramingChangHyeon Bae
 
Reactive programming vs reactive systems
Reactive programming vs reactive systemsReactive programming vs reactive systems
Reactive programming vs reactive systemsJinhyuck Kim
 
효율적 클러스터 활용을 위한 job scheduler
효율적 클러스터 활용을 위한 job scheduler효율적 클러스터 활용을 위한 job scheduler
효율적 클러스터 활용을 위한 job scheduler오윤 권
 
Responding to change
Responding to changeResponding to change
Responding to change기룡 남
 
(11th korea data_tech_seminar)using_mongo_db_4.0_and_nosql_inbum_kim(skc&c)
(11th korea data_tech_seminar)using_mongo_db_4.0_and_nosql_inbum_kim(skc&c)(11th korea data_tech_seminar)using_mongo_db_4.0_and_nosql_inbum_kim(skc&c)
(11th korea data_tech_seminar)using_mongo_db_4.0_and_nosql_inbum_kim(skc&c)InBum Kim
 
R2서버정진욱
R2서버정진욱R2서버정진욱
R2서버정진욱jungjinwouk
 
멸종하는 공룡이 되지 않으려면
멸종하는 공룡이 되지 않으려면멸종하는 공룡이 되지 않으려면
멸종하는 공룡이 되지 않으려면Byeongsu Kang
 
10장 클래스
10장 클래스10장 클래스
10장 클래스kidoki
 
NoSQL 간단한 소개
NoSQL 간단한 소개NoSQL 간단한 소개
NoSQL 간단한 소개Wonchang Song
 
MSA와 infra
MSA와 infraMSA와 infra
MSA와 infraJe Hun Kim
 
C Language II
C Language IIC Language II
C Language IISuho Kwon
 
[Uws] enterprise application architecture, msa, java9, spring 소개
[Uws] enterprise application architecture, msa, java9, spring 소개[Uws] enterprise application architecture, msa, java9, spring 소개
[Uws] enterprise application architecture, msa, java9, spring 소개HYUN-JOO LEE
 
마이크로 프론트엔드 아키텍쳐를 위한 모노레포 관리
마이크로 프론트엔드 아키텍쳐를 위한 모노레포 관리마이크로 프론트엔드 아키텍쳐를 위한 모노레포 관리
마이크로 프론트엔드 아키텍쳐를 위한 모노레포 관리경식 최
 

Ähnlich wie Learn design pattern-1 (20)

Oop design principle
Oop design principleOop design principle
Oop design principle
 
Oop design principle SOLID
Oop design principle SOLIDOop design principle SOLID
Oop design principle SOLID
 
[Dev rookie]designpattern
[Dev rookie]designpattern[Dev rookie]designpattern
[Dev rookie]designpattern
 
Mongodb and spatial
Mongodb and spatialMongodb and spatial
Mongodb and spatial
 
3팀_객체지향 프로그래밍.pptx
3팀_객체지향 프로그래밍.pptx3팀_객체지향 프로그래밍.pptx
3팀_객체지향 프로그래밍.pptx
 
OOP - Object Oriendted Programing
OOP - Object Oriendted ProgramingOOP - Object Oriendted Programing
OOP - Object Oriendted Programing
 
Reactive programming vs reactive systems
Reactive programming vs reactive systemsReactive programming vs reactive systems
Reactive programming vs reactive systems
 
Uml intro 0
Uml intro 0Uml intro 0
Uml intro 0
 
Review MLP Mixer
Review MLP MixerReview MLP Mixer
Review MLP Mixer
 
효율적 클러스터 활용을 위한 job scheduler
효율적 클러스터 활용을 위한 job scheduler효율적 클러스터 활용을 위한 job scheduler
효율적 클러스터 활용을 위한 job scheduler
 
Responding to change
Responding to changeResponding to change
Responding to change
 
(11th korea data_tech_seminar)using_mongo_db_4.0_and_nosql_inbum_kim(skc&c)
(11th korea data_tech_seminar)using_mongo_db_4.0_and_nosql_inbum_kim(skc&c)(11th korea data_tech_seminar)using_mongo_db_4.0_and_nosql_inbum_kim(skc&c)
(11th korea data_tech_seminar)using_mongo_db_4.0_and_nosql_inbum_kim(skc&c)
 
R2서버정진욱
R2서버정진욱R2서버정진욱
R2서버정진욱
 
멸종하는 공룡이 되지 않으려면
멸종하는 공룡이 되지 않으려면멸종하는 공룡이 되지 않으려면
멸종하는 공룡이 되지 않으려면
 
10장 클래스
10장 클래스10장 클래스
10장 클래스
 
NoSQL 간단한 소개
NoSQL 간단한 소개NoSQL 간단한 소개
NoSQL 간단한 소개
 
MSA와 infra
MSA와 infraMSA와 infra
MSA와 infra
 
C Language II
C Language IIC Language II
C Language II
 
[Uws] enterprise application architecture, msa, java9, spring 소개
[Uws] enterprise application architecture, msa, java9, spring 소개[Uws] enterprise application architecture, msa, java9, spring 소개
[Uws] enterprise application architecture, msa, java9, spring 소개
 
마이크로 프론트엔드 아키텍쳐를 위한 모노레포 관리
마이크로 프론트엔드 아키텍쳐를 위한 모노레포 관리마이크로 프론트엔드 아키텍쳐를 위한 모노레포 관리
마이크로 프론트엔드 아키텍쳐를 위한 모노레포 관리
 

Mehr von 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
 

Mehr von 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
 

Learn design pattern-1

  • 1. Design Pattern(1) 시작하기 전에 알아야 할 것들 임광규
  • 2. 목차 • What is Design Pattern? • OOP 4대 기본 원칙 • SRP(Single Responsibility) • OCP(Open Close) • LSP(Liskov Substitution) • ISP(Interface Segregation) • DIP(Dependency Inversion)
  • 3. What is Design Pattern? • 많은 개발자들에 의해 입증된 방법 • 두 가지 주요 사용 이유 1. 개발자와 설계자의 공통 언어 2. 좋은 사례 모음 • OO(Object Orientated) 의 기본 원칙을 기본으로 함 • " 내가 그의 이름을 불러 주기 전에는 그 는 다만 하나의 몸짓에 지나지 않았다." - 김춘수님의 꽃
  • 4. OOP 4대 기본 원칙 • Abstraction(추상화) – 데이터나 프로세스 등을 의미기 비슷한 개념이나 표 현으로 정의해 나가는 과정이며, 동시에 개발 객체의 구현에 대한 상세함은 감추는 것 • Encapsulation(캡술화) – 정보의 영역의 한정 – 내부 구현이 변경되더라도 외부에 영향을 최소화 • Inheritance(상속) – 기능의 재활용 또는 기능의 확장 – 단 구현 상속은 필요할 때만 쓸 것 • Polymorphism(다형성) – 구현체 변경의 유연함을 제공
  • 5. SRP(Single Responsibility) -단일 책임 원칙- • 하나의 클래스는 하나의 역할만 담당하도 록 설계 한다.
  • 6. SRP(Single Responsibility) -예제- PROCESS : 전달된 Email의 값에 문제가 없으면, 회원 정보를 DB에 등록 하고 가입 완료 내용을 EMAIL로 발송 PROBLEM: 회원 등록과 EMAIL 관련 역할이 하나의 CLASS에 포함 되어 있다. SOLUTION: 회원과 EMAIL 기능을 가진 CLASS를 각각 분리하여 각 CLASS마다 하나의 역할을 담당 하게 한다.
  • 7. OCP(Open Close) -개방 폐쇄의 원칙- • 확장에 대해 열려 있어야 하고, 변형에 대 해서는 닫혀있어야 한다. • 표준안을 만드는 것
  • 8. OCP(Open Close) -예제- PROCESS : 도형의 넓이를 구하는 METHOD를 구현한다. PROBLEM: 초기 Rectangle 만 있을 경우는 문제가 안되었지만, 도형이 추가 될 경우 AreaCalcuator의 area 에서 해당 CLASS에 대한 처리를 진행 하여야 한다. SOLUTION: Shape 이라는 인터페이스를 각 도형에서 상속 받아 각 도형들이 넓이를 계산 하도록 변경 하였다. Shape는 이후 method 추가나 변경은 안되지만, 확장(구현 클래스)에는 열려 있다.
  • 9. LSP(Liskov Substitution) -리스코프의 대체 원칙- • 하위타입(sub type)은 그것의 기반 타입 (base type)에 대해 대체 가능해야 한다.
  • 10. LSP(Liskov Substitution) -예제- PROCESS : 전체 도형의 넓이를 구하는 넓이 계산기 Rectangle 을 상속 받은 Square가 추가 되었을 경우 CalculatorArea 에서 Square를 받아서 처리 할 수 있다
  • 11. ISP(Interface Segregation) -인터페이스 분리의 원칙- • 클라이언트가 꼭 필요하지 않은 인터페이 스 때문에 클라이언트가 영향을 받아서는 안된다. • 하나의 일반적인 인터페이스 보다는 구체 적인 여러 개의 인터페이스가 낫다
  • 12. ISP(Interface Segregation) -예제- PROCESS : Stream 이라는 쓰고 읽는 기능을 가진 Interface PROBLEM: 읽는 기능만 필요할 경우에도, 쓰는 기능 METHOD를 구현 해야 한다 반대의 경우도 마찬가지로 필요하지 않은 METHOD를 구현 해야 한다. SOLUTION: 쓰는 기능과 읽는 기능의 Interface로 분리 하고, 해당 기능을 상속 받은 각각의 고유한 역할을 가진 CLASS를 구현한다.
  • 13. DIP(Dependency Inversion) -의존 역전의 원칙- • 구현 클래스의 필요에 의해 추상 클래스를 변경 하는 것
  • 14. PROCESS : Worker라는 Class를 실행하는 Manager 가 있다. 추가적으로 SuperWorker가 생성 되었다 PROBLEM: Worker 를 사용하는 Manager Class에서 관리 할 수 없다. SOLUTION: IWorker라는 인터페이스를 추가 하고 Worker와 SuperWorker는 그 인터페이스를 구현한다. Manager에서 IWorker를 사용 하여 구조적인 문제를 해결 DIP(Dependency Inversion) -예제-
  • 15. 참고 URL • http://www.zdnet.co.kr/news/news_view.asp?artice_id=00000039134727&t ype=det • http://www.zdnet.co.kr/news/news_view.asp?artice_id=00000039135552&t ype=det • http://www.zdnet.co.kr/news/news_view.asp?artice_id=00000039139151&t ype=det • http://dmh11.tistory.com/32 • http://codebetter.com/raymondlewallen/2005/07/19/4-major-principles- of-object-oriented-programming/ • http://seodh007.tistory.com/5 • http://www.nextree.co.kr/p6960/ • http://javacan.tistory.com/entry/OO-Basic-1-Object • http://www.vogella.com/tutorials/DesignPatterns/article.html • http://www.codeproject.com/Articles/703634/SOLID-architecture- principles-using-simple-Csharp • http://blog.gauffin.org/2012/05/solid-principles-with-real-world-examples/