15. 여러 개의
패턴이 뭉쳐서 움직인다.
Common
Strategy
Part
Variable
<<CREATES>>
Part
(Modularity)
Factory
Log
Security
<<LINKS>>
Configurable
Part Component Transaction
Configurator
19. 소프트웨어 관련된
모든 행위들을 다룬다.
§ 팀을 이루어 설계 대련을 수행하는 패턴
+
œ http://portal.acm.org/citation.cfm?id=273484
§ 팀 생산성을 향상 시키는 패턴
œ http://arload.wordpress.com/2008/09/02/teamproductivity/
그 외에도 기타 등등….
§ 지리적으로 떨어져 있는 팀 협업하는 패턴
œ http://hillside.net/plop/2006/Papers/Library/patternstoenablePLoP2006_sub
mission_v4.pdf
http://arload.wordpress.com/2008/04/02/plopfestival/
œ http://hillside.net/plop/2004/papers/vbricout0/PLoP2004_vbricout0_0.doc
§ 효율적인 회의를 이끄는 패턴
œ http://hillside.net/europlop/europlop2005/workshops/
25. 아키텍쳐의 이해 대상
Martin Fowler says …
The expert developers working on that project have
a shared understanding of the system design.
This shared understanding is called ‘architecture
architecture’
architecture
http://www.martinfowler.com/ieeeSoftware/whoNeedsArchitect.pdf
36. Template Method
Class QueryTemplate
{ public void doQuery()
{
QueryTemplate
string dbCommand;
dbCommand = FormatConnect();
dbCommand = FormantSelect(sql);
+doQuery()
} ...
#FormatConnect()
}
#FormatSelect()
void main()
{ //pQT라는 인터페이스를 선언한다
Inversion of Control QueryTemplate QT;
Sql sql = “select * from AA”;
(Hollywood Principle)
if (GetDBProductInfo() = Oracle)
QT = new OracleQT();
else
OracleQT SqlSvrQT QT = new SqlSvrQT();
Qt->doQuery(sql);
#FormatConnect() #FormatConnect()
}
#FormatSelect() #FormatSelect()
37. Component Configurator
설정 파일 정보가 바뀌면
소프트웨어의
코드 수정없이
속성이 변경되어라!!
변경되어라!! Text
XML Based
Log
Component
DES
RSA
Configuration HTTP
FTP Protocol
File Protocol
Great Architect
39. Component Configurator
void main()
{
<xml version =“1.0”>
<Components>
<!– Protocol 정보 선택 --> IMessage iMessage = new Message();
<Protocol>
if (GetComponentInfo(“Protocol”) = HTTP)
HTTP
iMessage->Protocol = HTTP;
</Protocol>
else
iMessage->Protocol = FTP;
<!– Log 정보 선택 -->
<Log>
if (GetComponentInfo(“Log”) = XML)
XML
iMessage->Protocol = XML;
</Log>
else
Advanced Topic iMessage->Protocol = TEXT;
<!– 보안 알고리즘 선택 -->
Reflection
<SecuAlgorithm> ...
DES
</SecuAltorithm> iMessage->Send(“Hello”);}
</Components>
39
Devpia A&D EVA 4/13/2009
40. Reflection
Meta Level
further
modifies
meta-
meta-level
components
MetaObject A MetaObject B MOP
modifies
retrieves
information
uses uses uses uses
Component A further Component B UserInterface
base-
base-level provides
components access to
Base Level
51. 패턴 가족 이야기 2
Get Info
Change
Load
Handler Config File
Notifiy
Client A
Overhead!!
Configuration File
App.config
File I/O
Web.config
Client B
52. 패턴 가족 이야기 2
Get Info
Change
Load
Handler Config File
Notifiy
Client A
FileSystemWatcher
.NotifyFilter Configuration File
App.config
Web.config
A Smart Developer
55. 무거운 (Heavy Dependency) 상황
// your API
public class Tracer {
MessageQueue mq = new MessageQueue(…);
public void Trace(string message){
mq.Send(message);
}
}
// your customer’s program that is hard to test
Tracer tracer = new Tracer();
public void ProcessOrder(Order order){
tracer.Trace(order.Id);
…
}
56. Inversion of Control
// your better API
public abstract class TraceListener {
public abstract void Trace(string message);
}
public class Tracer {
TraceListener listener;
Template Method
public Tracer(TraceListener listener){
this.listener & listener;
=
Publisher/Subscriber
}
public void Trace(string message){
listener.Trace(message);
}
}
57. Dependency Injection
// your customer’s program that is easier to test
Tracer tracer = new Tracer(new FileListener());
public void ProcessOrder(Order order){
tracer.Trace(order.Id);
…
}
58. Dependency Injection Container
// customer’s program that is even easier to test
Tracer tracer = container.Resolve<Tracer>();
public void ProcessOrder(Order order){
tracer.Trace(order.Id);
…
}
Check out DI Containers (a.k.a. IoC Containers): autofac,
Castle Windsor, PicoContainer.NET, Spring.NET,
StructureMap, Unity, nInject and others.
http://www.nInject.org
http://www.springframework.net/
76. EA의 기능 소개..
§ UML 2.1 Full 지원
§ 모델링 정보를 다양한 DBMS와 연동하여 저장가능
§ 형식을 파괴하는 모델링 지원
œ Use Case에서도 Class Diagram의 요소들을 사용가능
§ 다양한 언어를 지원
œ C++, C#, Delphi, Java, VB, VB.NET, PHP, Python
§ 강력한 코드 탬플릿 생성 기능
§ 강력한 역공학 기능
§ 다양한 Plug-in 지원
§ 테스팅 생성및 관리 (기존 Unit Testing 과 연동됨)
§ 가장 저렴한 가격 1 Copy당 20만원 ~ 30만원 사이
76
98. 참고자료
Douglas C. Schmidt (PLoP Editor, POSA 2, 4 Writter)
JAWS: An Application Framework for High Performance Web System
http://citeseer.ist.psu.edu/81775.html (En)
http://www.devpia.com/net2/EvaCast/Lecture/?cu=view&r=11 (Kr)
Ralph Johnson (GoF , Design Patterns)
Evolving Frameworks
http://st-www.cs.uiuc.edu/users/droberts/evolve.html (En)
http://arload.wordpress.com/2008/09/15/evolvingframeworks/ (Kr)
99. 참고자료
Robert C. Martin
Principles of Package Architecture (Design Principles and Design Pattern
s)
http://www.objectmentor.com/resources/articles/Principles_and_Patterns.
pdf (En)
http://www.devpia.com/net2/EvaCast/Lecture/?cu=view&r=108 (Kr)
For Korean People..
Load to Architect
http://www.arload.net
EvaCast (Online Free Lecture)
http://www.evacast.net
100. Question?
이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-동일조건변경허락 2.0
대한민국 라이센스에 따라 이용하실 수 있습니다.
This work is licensed under Creative Commons Korea Attribution 2.0 License.