se-chapter-7

Unified Modeling Language (UML) Overview

General Definition

  • UML is a modelling language, not a design or development methodology.

  • Primarily used for documenting object-oriented analysis and design results.

  • Independent of any specific design methodology.


Historical Context

Object-Oriented Development (OOD)

  • In the late 1980s and early 1990s, various software development houses used different notations.

  • Methodologies were tightly coupled to specific notations.

Development of UML

  • Created in the early 1990s to standardize numerous existing object-oriented modelling notations.

  • Aimed at addressing fragmentation in modelling practices.


UML Lineage

Foundational Methodologies

  • OMT (Object Modeling Technique) proposed by Rumbaugh in 1991.

  • Booch’s Methodology proposed by Booch in 1991.

  • OOSE (Object-Oriented Software Engineering) suggested by Jacobson in 1992.

  • Involvement of other methodologies, including Odell’s and Shlaer & Mellor's contributions.


Adoption and Standards

Recognition by OMG

  • UML was formally adopted by the Object Management Group (OMG) in 1997.

  • OMG promotes consensus in notations and techniques across industries.

Applications Beyond Software

  • UML has applications in various fields outside software development, including manufacturing, as illustrated by its use in car production.


Developments in UML

Ongoing Refinements

  • UML continues to evolve with refinements and applicability to new contexts, such as embedded systems over the years.


Importance of Modelling

Purpose of Modelling

  • Modelling serves as an abstraction mechanism that captures essential aspects while ignoring the less important details.

  • It aids in managing complexity in systems.

  • UML acts as a graphical modelling tool that is easy to understand and construct.


UML Diagrammatic Views

Diagram Types

  • UML comprises nine diagrams that offer different perspectives of a software system:

    • User's View: Use Case Diagrams.

    • Structural View: Class Diagrams, Object Diagrams.

    • Behavioral View: Sequence Diagrams, Collaboration Diagrams, State-chart Diagrams, Activity Diagrams.

    • Implementation View: Component Diagrams.

    • Environmental View: Deployment Diagrams.

Use Case Development

  • Use Case Diagrams illustrate interactions between users (actors) and use cases of a system.

  • Each use case can have multiple scenarios demonstrating various interactions.


Factoring Use Cases

Reasons for Factoring

  • Complex use cases are factored into simpler ones for easier understanding and representation of common behaviors.

Techniques for Factoring

  • Generalization: Child use cases inherit from parent use cases with optional behavior addition or overrides.

  • Include: Common behaviors are made into separate use cases that other use cases can include.

  • Extend: Allows creating optional added behaviors to existing use cases that can be triggered under certain conditions.


Class and Object Diagrams

Class Diagrams

  • Class diagrams describe the static structure of a system.

  • Main components:

    • Classes: Identify entities with attributes and operations, represented as rectangles with compartments for name, attributes, and operations.

    • Visibility: Indicated by symbols (+ public, # protected, - private).

Object Diagrams

  • An object diagram shows instances of classes at a specific time, illustrating the actual values and states of those instances.


Activity and State Chart Diagrams

Activity Diagrams

  • Illustrate the workflow of processes, showing parallel activities and alternative paths.

  • Useful for business process modeling and developing interaction diagrams.

State Chart Diagrams

  • Model how the state of an object changes during its lifecycle.

  • Useful for representing state-dependent behaviors and managing complexity in systems with nested or concurrent states.


Components and Deployment Diagrams

Component Diagrams

  • Show physical implementations, including the organization of source code into executables, libraries, and other components.

Deployment Diagrams

  • Illustrate how a software application is physically deployed on hardware components, detailing interactions among them.


UML 2.0 Enhancements

Key Changes in UML 2.0

  • Introduced new concepts, including ports and nested structures.

  • Enhanced diagrams: 13 types including new interactions like the timing diagram and various refinements in activity and use case diagrams.


Tools Supporting UML 2.0

  • Various tools are available for UML 2.0 capabilities:

    • PlantUML, ArgoUML, IBM Rational Software Architect, Sparx Systems Enterprise Architect, etc.


Review Questions

  • Illustrate understanding of key UML concepts using multiple-choice or true/false formats in relation to object-oriented design paradigms.