Object Oriented Development with UML 11 12 18
Object Oriented Development with UML 11 -12, 18 -19 November 2006 At Sipa Chiangmai Introduction to UML โดย รศ. รงสต ศรรงษ อ. สายณห
UML History n เปนผลลพธมาจากการรวมกนข องวธการพฒนาเชงวตถท มชอเสยงในชวงตนทศวร รษท 90 : u Grady Booch (Rational), Object Oriented Analysis and Design u Jim Rumbaugh (GE), Object Modeling Technique u Ivar Jacobson (Ericsson), Object -oriented Software Engineering: A Use Case Approach (Objectory)
Creating the UML 2004 UML 2. 0 UML 1. 5 2003 UML 1. 4 2001 public feedback UML 1. 1 OMG Acceptance, Nov 1997 UML 1. 3 Final submission to OMG, Sep ‘ 97 First submission to OMG, Jan ´ 97 UML partners Web - June ´ 96 OOPSLA ´ 95 Other methods UML 1. 0 UML 0. 9 Unified Method 0. 8 Booch method OMT OOSE
Contributions to the UML Harel Meyer Before and after conditions Statecharts Gamma, et al Frameworks and patterns, HP Fusion Booch Operation descriptions and message numbering Booch method Embley Rumbaugh Singleton classes and high-level view OMT Wirfs-Brock Jacobson Responsibilities OOSE Shlaer - Mellor Object lifecycles Odell Classification
UML Diagrams n ชนดของไดอาแกรมใน UML: u Structural diagrams u Behavioural diagrams Use Case Deployment Class Component Package Collaboration Activity State Sequence
Classification of Diagram Types Diagram Static/Dynamic Use case Dynamic Class Static Package Static Sequence Dynamic Collaboration Dynamic Statechart Dynamic Activity Dynamic Component Static Deployment Static
State Daigram Activity Diagram Statechart Diagram UMLDiagram Implementation Diagram Package Diagram Static Structure Diagram Class Diagram Usecase Diagram Class Diagram Use case Component Diagram Scenerio Interaction Diagram Sequence Diagram De. Ployment Diagram Collaboration Diagram
Class Diagrams n n มความสำคญมากทสดใน UML ใชในการกำหนดคลาส รวมไปถงการตดตอกนระหวางคลาส ในรปของ ความรวมมอระหวางกน Multiplicity ตลอดจนความสมพนธระหวางกน เปนตน Class Customer Aggregation 1 Rental Invoice Abstract Class Rental Item {abstract} 1. . * 1 0. . 1 Composition Generalization DVD Movie Association VHS Movie Video Game Checkout Screen
State Diagrams (statechart) n ใชสำหรบการแสดงวงจรชวตของคลาสหนง ๆ โดยการกำหนดสถานะการทำงานของระบบทประกอบไปดวย states, transitions, Event และ events เปนหลก Guard Transition ]more videos[ /get next video customer appears Validate do/check account ]account valid[ /get first video Activity State ]account not valid[ Check-Out do/check-out video ]no more videos[ Check-Out Complete Action
Sequence Diagrams n ใชสำหรบแสดงการทำงานของออปเจคในชวงเวลาทกำหนด โดยประกอบไปดวยการรบสงแมสเสจทมการตดตอระหวาง ออปเจค : Checkout. Mgr : 1: find customer() 3: enter movie() Message Cust: Customer : Inventory : Rented. Items Employee 2: search (string) 4: search (string) Object Activation 5: rent (movie) 7: print. Invoice() 6: add(Cust, item) Lifeline 8: generate. Rental. Total()
Collaboration Diagrams n เปนไดอาแกรมทแสดงการตดตอกนระหวางออปเจค โดยเนนไปทโครงสรางการจดองคกรของออปเจคทมการรบ และสงคาแมสเสจ : Rented Items 1: enter_customer() 3: enter_movies() Object 5: add(customer, movies) 8: generate. Rental. Total() 2: Is. Valid. Cust(Cust. Id) 7: print invoice() : Check-out Manager : Customer : Clerk 4: Get. Movie. By. Barcode() : Inventory Message
Activity Diagram n มลกษณะคลายกบ data flow diagram โดยปกตแลวจะเปนการแสดงรายละเอยดของกจกรรมตาง ๆ ���������� และเกดขนภายใน use case Start State Identify Caller Action State Obtain Name & Address Current Customer? Decision Open Account? [no] [yes] End State Create Account
Component Diagram n ใชสำหรบแสดงรายละเอยดของคอมโพเนนทตาง ๆ ทใชภายในโปรแกรม ในชวงเวลาของ runtime ซงจะรวมไปถง source code, binary code และ executable component » library « DB Server Interface )dbsvr. dll( Component » library « Application Framework Interface Dependency » application « Video Workstation )vstation. exe( Supplied by Microsoft Note
Most used UML Diagrams: Use-Case Diagram Class Diagram Sequence Diagram
Combination: Quick Iteration Between Code and Models Java Source Code
UML Diagrams Are Key Artifacts Use-Case Diagram Class Diagram State Diagram Use-Case 1 Actor A Actor B Use-Case 2 Domain Expert <<entity>> Customer name addr receive() withdraw() fetch() send() Use-Case 3 Deployment Diagram Class Repository Document. List File. Manager Package Diagram User Interface Definition Collaboration Diagram Document Graphic. File Component Diagram File. List (Code Generation) Source Code edit, compile, debug, link Sequence Diagram Executable System
Software Lifecycle Activities Requirements Elicitation Requirements Analysis Expressed in Terms Of System Design Structured By Object Design Realized By Implementation Implemented By class. . . Use Case Model Application Domain Objects Sub. Systems Implementati on Domain Objects Source Code Testing Verified By ? class. . ? Test Cases
More Information… n n n Martin Fowler, Kendall Scott: UML Distilled second edition. Publisher: Addison-Wesley. Doug Rosenberg with Kendall Scott: Use Case Driven Object Modeling with UML. Publisher: Addison-Wesley. Larman, Craig. (1998) Apply UML and Patterns : Third Edition, Prentice Hall Grady Booch, et al: The Unified Modeling Language User Guide. Publisher: Addison-Wesley. James Rumbaugh, et al: The Unified Modeling Language Reference Manual. Publisher: Addison-Wesley. Ivar Jacobson, et al: Unified Software Development Process. Publisher: Addison-Wesley.
Some UML Tools Vendor Main UML Tool Visual Paradigm VP UML No. Magic Embarcadero GDPRO IBM CA(Platinum) Paradigm Plus Excel Software Vendor Riverton Mac. A&D/Win. A&D Rogue. Wave i-Logix Rhapsody Sparx. Systems Micro. Gold With Class Silverrun Microsoft Visio Borland Objecteering Popkin Together Objecteering Sybase Main UML Tool Magic. Draw Rose/Rose. RT How RW-UML Studio Enterprise Architect Silverrun JD Power. Designer Gentle. Ware Poseidon U of CA Irvine Argo. UML Object Architect Visual System Visual Analyst
- Slides: 27