Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSCI 3428: Software Engineering Tami Meredith UML Unified Modeling Language.

Similar presentations


Presentation on theme: "CSCI 3428: Software Engineering Tami Meredith UML Unified Modeling Language."— Presentation transcript:

1 CSCI 3428: Software Engineering Tami Meredith UML Unified Modeling Language

2 UML Is a diagrammatic framework for modeling systems Has both syntax and semantics Has formal specifications Can be executed (MDA; Model Driven Architecture) Is NOT a process – it is to support S.E., not replace existing practices Can be used in multiple ways, including informally, and is easily extended Is generally associated with OOP

3 References 1. http://en.wikipedia.org/wiki/Unified_Mo deling_Language 2. Dan Pilone & Neil Pitman (2005).UML 2.0 in a nutshell: A desktop quick reference, O'Reilly Media Inc.: Sebastopol, CA, USA.

4 History Based on 3 distinct OOP modeling methods 1. Booch Method of Grady Booch 2. Object Modeling Technique of James Rumbaugh 3. Objectory by Ivar Jacobson UML 1.0 was released in 1994 UML 1.1 Released in 1997 by Object Management Group UML 2.0 was released in 2005 Currently using 2.4.1 released in August 2011 UML 2.5 was released on October 2012 and is "in process"

5 Uses Capturing and communicating business processes (Domain modeling) Capturing details about a system for requirements or analysis Designing software Documenting existing systems, software, processes, or organizations UML can be used anywhere in S.E. for diagrammatically describing and communicating

6 Rules of Thumb 1. Nearly everything in UML is optional 2. UML models are rarely complete 3. UML is designed to be open to interpretation (different organisations use it differently) 4. UML is intended to be extended UML is a framework, a set of guidelines, a tool for communicating and explaining things While it can be formal, it doesn't have to be

7 Power of Practicality Unless being used formally (e.g., Rhapsody, MDA), UML is designed to improve communication It should describe constraints, not impose them Do not let UML limit your thinking, perspectives, analyses, or designs Use it as you need, when you need, how you need

8 Components UML Infrastructure – low-level, core, bottom-most concepts used by the UML creators to provide the foundation for UML UML Superstructure – 600 pages describing the elements of UML OCL – Object constraint language for writing constraints and expressions in a specific model Data Interchange Specification – an XML schema for sharing UML models between tools

9 UML Diagrams

10 Structural Diagrams Perform static modeling Describe the structure of the system, its design, components, parts, pieces Includes attributes and relationships Most of these diagrams can be subsumed as variants of ER diagrams Not designed to capture behaviour, activities, and dynamic concerns More of value in the design phases

11 UML Structural Diagrams 1. Class Diagrams: The OO class organisation 2. Component Diagrams: Describes how the system is split up into components and shows dependencies between components 3. Composite Structure Diagrams: Describes the internal structure of a class 4. Deployment Diagrams: Describes the hardware and execution environments 5. Package Diagrams: shows how the system is split into logical groupings 6. Object Diagrams: Show a snapshot of the executing (partial) system at a moment in time 7. Profile Diagram (new): Used at Meta-model level (not covered)

12 1. Class Diagrams Decomposes a system into Objects (classes) representing entities Most commonly used diagram Classes have attributes, of which some provide functionality and are called operations Special relationships exist: Aggregation: "has a," also decomposition Generalisation: "is a," also specialisation Generally limited to OOP paradigms

13 Basic Class Notation Class name Data Methods

14 Visibility Class members (data and methods) are preceded with symbols to indicate visibility " + " Public " - " Private " # " Protected " ~ " Package " / " Derived (can be combined with one of the others) Derived data is not stored it is calculated e.g., age = date – birthdate), or obtained in some other way (e.g., from an external sensor)

15 Relationships Subtypes point to their parents with a hollow arrow (inheritance) Components point to their containing (holder) with a diamond arrow Hollow: Aggregation, part can exist alone Solid: Containment, part cannot exist without holder Other notations exist for other relationships

16

17 Class Diagram Example #1

18 Class Diagram Example #2

19 Notation Summary

20 2. Component Diagrams

21 3.Composite Structure Diagrams

22 4. Deployment Diagrams

23 Deployment Diagram Example

24 5.Package Diagrams

25 6. Object Diagrams (Snapshot)

26 UML Behavioural Diagrams Captures interactions among components and users Explores execution, timing, sequencing, control flow, and other dynamic behaviour Focus on functionality instead of structure More of value in requirements analysis and specification phases Can be used in the development of test plans

27 UML Behavioural Diagrams 8. Use Case Diagrams: Usage scenarios 9. Activity Diagrams: Flowcharts, step-by-step workflows 10. State Machine Diagrams: For systems where behaviour can be shown using state models 11. Interaction Overview Diagrams: Help show how other diagrams are related 12. Communication Diagrams: Interaction in terms of message sequences 13. Sequence Diagrams: Message passing and sequences 14. Timing Diagrams: For RT systems where explicit timing constraints exist

28 8. Use Cases Represent the system in terms of how it can be used Frequently represented as a set of usage scenarios Good for capturing data flow Customers tend to like these

29 Use Case Notation (UML)

30 Use Case Example #1

31 Use Case Example #2

32 9. Activity Diagrams Control flow diagrams Based on structured programming of the 1970s Flowcharts (basis for most process diagrams) Can have: hierarchical components, abstractions, decompositions into "swim lanes" (sequences)

33

34 Activity Diagram Example #1

35 Activity Diagram Example #2

36 Use Case Notation (alternative)

37 10. State Machine Diagrams

38 State Machine Example #1

39 State Machine Example #2

40 11. Interaction Overview Diagram

41 12. Communication Diagrams

42 Communication Diagram Example

43 13. Sequence Diagrams

44 Sequence Diagram Example #1

45 Sequence Diagram Example #2

46 14. Timing Diagrams

47 Effective Diagramming Know your purpose – Modeling (complete, precise, detailed) vs. Communication (partial, concise, clear, focused) Let your diagram speak when you can't – its a form of documentation that may be used without you to explain it Limit the number of abstractions in each diagram to 1 Don't feel limited by UML – if not using MDA then do whatever is needed to get the ideas across

48 Abuse the Notation You can merge the ideas if you want Mix'n match parts'n pieces


Download ppt "CSCI 3428: Software Engineering Tami Meredith UML Unified Modeling Language."

Similar presentations


Ads by Google