논리적구조설계 : 패키지도
Objectives. UML. 2
객체설계로옮겨가기 (interaction diagram). /.. : UML -UML. -UML. -. 1. 2. 3
문맥 Sample UP Artifact Relationships Business Modeling Domain Model * * Requirements Use-Case Model Vision Supplementary Specification Glossary The logical architecture is influenced by the constraints and non-functional requirements captured in the Supp. Spec. Design Model. -, - - (, C/S) - - -(Framework) Design package diagrams UI of the logical architecture (a static view) Domain interaction diagrams (a dynamic view) class diagrams (a static view) enteritem (itemid, quantity)... Register makenewsale() enteritem(...)... : Register 1 1 spec = getproductspec( itemid )... ProductCatalog getproductspec(...)... Tech Services : ProductCatalog 4
1. 예제 : 3 계층논리적구조를표현한 UML 패키지도. Presentation Layer UI Workflow Layer Swing not the Java Swing swing libraries, but GUI our GUI classes based on Swing Web Service Layer Domain Sales Payments Taxes depends on Persistence Layer Technical Services Persistence Logging RulesEngine 5
2. 논리적구조의정의및계층구조 (),,. (deployment diagram).,. 3 UI ( ) () (presentation layer) () (business service layer), POS Sale (persistency layer),,. 6
3. 사례연구에서의초점 ( ). UI. UI: Story Board, HCI(Human Computer Interface), Web Interface Design Java C++ STL ODBC Library DB Connection Pool Library API Framework 7
4. 소프트웨어아키텍처란? (Software Architecture) 1), 2) 3), 4),,.,. ( ) 8
5. UML 의적용 : 패키지도도식방법 UI Domain Swing Web Sales UI UI::Swing UI::Web Domain::Sales Swing Web Domain Sales :: subset 9
UML 패키지도 Namespace ) java::util::date Date util, util java. UML.. UI UI Domain. (,.) Domain UI. (.) Domain 10
6. 가이드라인 : 계층을이용한설계, ),. ) OSI 7 Layer : App Presentation Session Transport - Network Data Link Physical Layered Pattern Rising, Pattern Almanac 2000, Addison-Wesley,,,,. (Web -> Flash) (, ) 11
Layered Pattern GUI GUI windows reports speech interface HTML, HTML, XML, XML, XSLT, XSLT, JSP, JSP, Javascript Javascript,... UI (AKA Presentation, View) handles presentation layer requests workflow session state window/page transitions / consolidation/transformation of disparate data for presentation handles application layer requests implementation of domain rules domain services (POS, Inventory) - services may (POS, be used ) by just one application, but there is also the possibility. of multi-application services Application (AKA Workflow, Process, Mediation, App Controller) Domain (AKA Business, Application Logic, Model) dependency more app specific very general low-level business services used in many business domains ) CurrencyConverter Business Infrastructure (AKA Low-level Business Services) () (relatively) high-level technical services and frameworks Persistence, Security, Technical Services (AKA Technical Infrastructure, High-level Technical Services) low-level technical, services, utilities, and frameworks data structures, threads, math,,,,, file, DB, and network I/O DB, I/O Foundation (AKA Core Services, Base Services, Low-level Technical Services/Infrastructure) width implies range of applicability 12
가이드라인 : 응집력있는책임들 ; 관심분리원칙에맞춰분해하라 UI Widget,.,,. UI. ) Jframe., MVC : : :, UI. 13
코드 : 소스코드구조를계층및 UML 로매핑 (, C#,C++,Python ) C# C++ UI (NEXTGEN POS) com.mycompany.nextgen.ui.swing com.mycompany.nextgen.ui.web (NEXTGEN POS) com.mycompany.nextgen.domain.sales com.mycompany.nextgen.domain.payments com.mycompany.service.persistence org.apache.log4j org.apache.soap.rpc com.mycompany.util 14
UML: 몇가지정의 UML : (Reverse Engineering) ui.* UI :? POS sale, Payment : Workflow ) 15
정의 : 티어, 계층, 구획면 (tier): (layer): () (partition) :. ). Domain POS Inventory Tax Vertical Layers Technical Services Persistence Security Logging Horizontal Partitions 16
vs.. UP Domain Model Stakeholder's view of the noteworthy concepts in the domain. A Payment in the Domain Model is a concept, but a Payment in the Design Model is a software class. They are not the same, thing, but the former inspired the. naming, and definition of the latter.. This reduces the representational gap.,. This is one of the big ideas in object technology. Payment amount Payment amount: Money 1 Pays-for 1 inspires objects and names in 1 1 Pays-for date time Sale Sale date: Date starttime: Time getbalance(): Money gettotal(): Money... Domain layer of the architecture in the UP Design Model The object-oriented developer has taken inspiration from the real world domain in creating software classes. Therefore, the representational gap between how stakeholders conceive the domain, and its representation in software, has been lowered. 17
논리적모델과물리적모델을섞어그리지않는다. Worse mixes logical and deployment views Better a logical view Domain(s) Technical Services Domain(s) POS Technical Services Inventory a logical representation of the need for data or services related to these subdomains, abstracting implementation decisions such as a database. Foundation Persistence Naming and Directory Services Web AppFramework MySQL Inventory Novell LDAP Foundation UML notation: A UML component, or replaceable, modular part of the physical system UML notation: A physical database in the UML. 18
7. 가이드라인 : 모델 뷰분리원칙 -. 1. UI UI. Sale ( ) Jframe., -., 2. UI. UI UI,UI(: ), UI. == ==,,, UI Sale, Register,,,. Observer PropertyListener, notify, PropertyListener view update 19.
모델 - 뷰분리이유 UI,,UI UI -, 20
8. SSD, 시스템연산, 계층은어떻게서로연결되는가? UI :System : Cashier makenewsale() enteritem(id, quantity) description, total Domain Swing... ProcessSale Frame makenewsale() enteritem() endsale() makenewsale() enteritem() endsale() : Cashier endsale()... Register makenewsale() enteritem()... UC UI the SSD system operations handled by the system UI in an SSD represent the operation calls on. the Application or Domain layer from the UI layer 21
9. Case Study: 34 장 NEXTGEN POS 의 Layers UI Swing ProcessSale Frame not the Java Swing libraries, but our GUI classes based on Swing Text ProcessSale Console used in quick experiments Domain Sales Pricing Register Sale PricingStrategy Factory ISalePricingStrategy ServiceAccess Payments Services Factory CreditPayment ICreditAuthorization ServiceAdapter Inventory POSRuleEngine Taxes IInventoryAdapter POSRuleEngineFacade ITaxCalculatorAdapter Technical Services Persistence DBFacade Log4J Jess A general purpose thirdparty rules engine. SOAP 22
9. NEXTGEN POS 의존연관 Swing UI ProcessSale Frame Domain Sales Register Sale Pricing ServiceAccess Services Factory Payments CreditPayment ICreditAuthorization ServiceAdapter Inventory IInventoryAdapter POSRuleEngine POSRuleEngineFacade Taxes ITaxCalculatorAdapter Technical Services Persistence DBFacade Log4J Jess SOAP 23