390 likes | 404 Views
Explore the Unified Modeling Language (UML) in depth, from its origins and core components to its diverse applications in software development. Learn about modeling elements, relationships, extensibility mechanisms, and various diagrams. Discover how UML supports the entire software development lifecycle and different application areas. Gain insights into UML's structural, behavioral, and grouping elements, as well as its extensibility features like stereotypes and constraints. Delve into use case diagrams, actors, and the importance of testing use cases for validation and verification.
E N D
UML Overview Paul Sorenson Univ of Alberta CMPUT 401 Software Engineering CMPUT 401 - UML Overview
What is UML? • It’s an open standard • Supports the entire software development lifecycle • Supports diverse applications areas • It’s based on experience and needs of the user community • Supported by many tools - e.g Rational Rose CMPUT 401 - UML Overview
UML 1.3 OMG Acceptance, Nov 1997 UML 1.1 Final submission to OMG, Sep ‘97 First submission to OMG, Jan ´97 Origins of UML public feedback UML partners UML 1.0 Web - June ´96 UML 0.9 Unified Method 0.8 OOPSLA ´95 Other methods OOSE (Jacobson) Booch method OMT (Rumbaugh) CMPUT 401 - UML Overview
UML • The UML is a language for • visualizing • specifying • constructing • documenting the artifacts of a software system • Main components are:- Modeling elements- Relationships- Extensibility Mechanisms- Diagrams CMPUT 401 - UML Overview
name attribute operations Modeling Elements • Structural elements • use case, class, interface, collaboration, active class, component, node • Behavioral elements • interaction, state machine • Grouping elements • package, subsystem • Other elements • won’t be discussed CMPUT 401 - UML Overview
Relationships • Association • Generalization • Realization • Aggregation • Composition • Dependency CMPUT 401 - UML Overview
Relationships • Association • Generalization • Realization • Aggregation • Composition • Dependency CMPUT 401 - UML Overview
Relationships • Association • Generalization • Realization • Aggregation • Composition • Dependency CMPUT 401 - UML Overview
Relationships • Association • Generalization • Realization • Aggregation • Composition • Dependency CMPUT 401 - UML Overview
Relationships • Association • Generalization • Realization • Aggregation • Composition • Dependency CMPUT 401 - UML Overview
Relationships • Association • Generalization • Realization • Aggregation • Composition • Dependency CMPUT 401 - UML Overview
Extensibility • Stereotype • Tagged value • Constraint CMPUT 401 - UML Overview
State Diagrams State Diagrams State Diagrams State Diagrams State Diagrams State Diagrams Object Diagrams Class Diagrams Component Diagrams Component Diagrams Component Diagrams Deployment Diagrams Use Case Diagrams Use Case Diagrams Scenario Diagrams Scenario Diagrams Use Case Diagrams Use Case Diagrams Scenario Diagrams Scenario Diagrams Use Case Diagrams Sequence Diagrams Statechart Diagrams Collaboration Diagrams Diagrams Models Activity Diagrams CMPUT 401 - UML Overview
Implementation View LogicalView Programmers Software management End-user Functionality Use Case View Performance Scalability Throughput System topology Delivery, installation Communication System engineering System integrators Deployment View Process View Architecture Representation Physical Conceptual CMPUT 401 - UML Overview
Use Case Diagram • Captures system functionality as seen by users • Built in early stages of development • Purpose • Specify the context of a system • Capture the requirements of a system • Validate a system’s architecture • Drive implementation and generate test cases • Developed by analysts and domain experts CMPUT 401 - UML Overview
Example Use Cases actors CMPUT 401 - UML Overview
Actors … someone or something that interacts with the system; it’s who or what uses the system • Actors communicate to the system by sending or receiving messages • Use case is always initiated by an actor that sends amessage to it. • Use cases can be discovered by identifying all thoseactors who need to create, destroy or modify informationin the system. CMPUT 401 - UML Overview
Use Cases in UML The bulk of the information for a Use Case should appear as text (in documentation section). Relationships between Use Cases • Extends relationship - typically used to document important specific variants of a more general usecase. (e.g., signing a car purchase contract extendsa signing insurance policy use case). • Uses relationship - implies shared activity. (e.g.,signing car insurance and signing life insurancehave certain common behaviors called signinginsurance policy.) CMPUT 401 - UML Overview
Uses Relationship Example CMPUT 401 - UML Overview
Testing Use Cases • Validation is done as soon as there is a finished usemodel. The model is presented to and discussed by the customers and end users, who determine if themodel is correct and complete. Actual validation is bestcarried out by “walking the use cases.” • Verification tests that the system works according tospecifications. It is not carried out until parts of thesystem are working. Then it is possible to determineif the use cases in the model can be performed asdescribed in the use-case description. (Acceptancetests are a usual technique for verifying use cases.) CMPUT 401 - UML Overview
Text in Nat. Lang. Description of a use case Outside the system Use Case is an instance of a Sequence diagram (time) Collaboration diagram Description of a scenario (space) Scenario An executionpath throughthe system (work) Activity diagram Relationship between Use Cases and Scenarios Perspective Model type Modeling lang. Model (document) CMPUT 401 - UML Overview
Class Diagram • Captures the vocabulary of a system • Built and refined throughout development • Purpose • Name and model concepts in the system • Specify collaborations • Specify logical database schemas • Developed by analysts, designers, and implementers CMPUT 401 - UML Overview
class aggregation association multiplicity role constraint generalization attributes interface dependency operations Class Diagram CMPUT 401 - UML Overview
Interaction Diagrams • Two types: • Sequence Diagrams • Collaboration Diagrams One can be automatically derived from the other. CMPUT 401 - UML Overview
Sequence Diagrams • Captures dynamic behavior (time-oriented) • Purpose • Model flow of control • Illustrate typical scenarios CMPUT 401 - UML Overview
object lifeline call message Focus of control Sequence Diagram Sequence Diagram CMPUT 401 - UML Overview
Collaboration Diagram • Captures dynamic behavior (message-oriented) • Purpose • Model flow of control • Illustrate coordination of object structure and control CMPUT 401 - UML Overview
Component Diagram • Captures the physical structure of the implementation • Built as part of architectural specification • Purpose • Organize source code • Construct an executable release • Specify a physical database • Developed by architects and programmers CMPUT 401 - UML Overview
Component Diagram CMPUT 401 - UML Overview
Deployment Diagram • Captures the topology of a system’s hardware • Purpose - Specify the distribution of components - Identify performance bottlenecks CMPUT 401 - UML Overview
Rational Unified Process • Iterative • Architecture-centric • Use-case driven • Risk managed CMPUT 401 - UML Overview
Changing Development Focus Discovery Invention Implementation Focus CMPUT 401 - UML Overview
Important Architectural Aspects When does architecture happen? • Phase, Iterations • Process Workflows • Activity, steps • Artifacts • models • reports, documents • Worker: Architect What does happen? What is produced? Who does it? CMPUT 401 - UML Overview
Lifecycle Phases Inception Elaboration Construction Transition time • Inception Define the scope of the project and develop business case • Elaboration Plan project, specify features, and baseline the architecture • Construction Build the product • Transition Transition the product to its users CMPUT 401 - UML Overview
time Product Release Vision Baseline Architecture Initial Capability Major Milestones Inception Elaboration Construction Transition CMPUT 401 - UML Overview
time Release Release Release Release Release Release Release Phases and Iterations Inception Elaboration Construction Transition ... ... Arch Iteration ... Dev Iteration Dev Iteration ... Trans Iteration An iteration is a sequence of activities with an established plan and evaluation criteria. In construction and transition, the result is an executable release. CMPUT 401 - UML Overview
Inception Elaboration Construction Transition time Architecture How is it Architecture-Centric? Where does the UML come in? • Models are vehicles for visualizing, specifying, constructing, and documenting architecture • The Unified Process prescribes the successive refinement of an executable architecture CMPUT 401 - UML Overview
Phases Process Workflows Inception Elaboration Construction Transition Business Modeling Requirements Analysis & Design Implementation Test Deployment Supporting Workflows Configuration Mgmt Management Environment Preliminary Iteration(s) Iter.#1 Iter.#2 Iter.#n Iter.#n+1 Iter.#n+2 Iter.#m Iter.#m+1 Unified Process Structure CMPUT 401 - UML Overview
Architectural Design Workflow Use case view • Select scenarios: criticality and risk • Identify main classes and their responsibility • Distribute behavior on classes • Structure in subsystems, layers, define interfaces • Define distribution and concurrency • Implement architectural prototype • Derive tests from use cases • Evaluate architecture Iterate Logical view Process view Implementationview Deployment view CMPUT 401 - UML Overview