michael schloh von bennewitz [email protected] 1. oktober 2002 the unified modeling language...
TRANSCRIPT
Michael Schloh von [email protected]. Oktober 2002
The Unified Modeling Language
Overview of theory and practice of the OMG Unified Modeling Language v1.4
Overview of theory and practice of the OMG Unified Modeling Language v1.4
2
The design of software applications before coding.
What Is Software ‘Modeling’?
All models are wrong;Some models are useful.
Just like the plans for a house. Blueprints Elevation Site map
Overview of theory and practice of the OMG Unified Modeling Language v1.4
3
What Is the Unified Modeling Language?
A standard of the Object Management Group. Informal language for specifying software systems.
Helps visualize structure and design. Provides design documentation.
Independent of any methodology. James Rumbaugh’s (OMT) classes and objects. Many of Grady Booch’s diagrams. Ivar Jacobson’s use cases.
It’s most likely that a large softwareapplication will fail to meet all of itsrequirements on time and on budget.
Overview of theory and practice of the OMG Unified Modeling Language v1.4
4
OOSE: Typical Requirements Document
The software application HTMLProc will process HTMLpages on a SUN E450. Design engineers will use HTMLProc to process files one at a time, before manually entering their contents into an existing SQL database. HTMLProc will correct the style, stripping unviewable whitespace, replacing tabs with four spaces, and testing the syntax according to the world wide web consortium HTML 4.01 specification. HTMLProc will finish by returning 0 and writing the HTML <body> to the console if the input file was found to be conformant. Otherwise, it will return 1 and write a meaningful error message to the console.
Requirements gathering isThe first step in a softwareengineering lifecycle.
Overview of theory and practice of the OMG Unified Modeling Language v1.4
5
OOSE: Find Classes, Attributes, and Methods
The software application HTMLProc will process HTMLpages on a SUN E450. Design engineers will use HTMLProc to process files one at a time, before manually entering their contents into an existing SQL database. HTMLProc will correct the style, stripping unviewable whitespace, replacing tabs with four spaces, and testing the syntax according to the world wide web consortium HTML 4.01 specification. HTMLProc will finish by returning 0 and writing the HTML <body> to the console if the input file was found to be conformant. Otherwise, it will return 1 and write a meaningful error message to the console.
Nouns are candidates for actors, classes, and attributes.Verbs are candidates for methods.Actions are candidates for use cases.
Overview of theory and practice of the OMG Unified Modeling Language v1.4
6
Standard UML Diagram Categories
Structure diagrams Class Object Component Deployment
Management diagrams Package Subsystem Model
Behaviour diagrams State Use case Sequence Collaboration Activity
Not all diagrams areneeded for most models!
Overview of theory and practice of the OMG Unified Modeling Language v1.4
7
UML Use Case Diagram
Shows who will use a system. Describes behaviour from a user‘s perspective. Offers a functional description of the system. Shows what kinds of interactions to expect.
Overview of theory and practice of the OMG Unified Modeling Language v1.4
8
UML Activity Diagram
Shows logical activity. Shows flow of data. Differs from state diagram.
Has fork and join symbols. Show complex conditions. Are not stateful.
Overview of theory and practice of the OMG Unified Modeling Language v1.4
9
UML State Diagram
Shows stateful behaviour. Is most useful when:
Representing little concurrency. Having no complex conditions.
Does not directly show actions.
Check syntax for conformance to HTML 4.01
Revise style
Overview of theory and practice of the OMG Unified Modeling Language v1.4
10
UML Class Diagram
The classes of our main package HTMLProc.
Describes static structure. Same thing as ‚class‘ in Java or C++.
Overview of theory and practice of the OMG Unified Modeling Language v1.4
11
UML Package Diagram
Shows how classes can be divided into modules. Used as a high-level view of the overall static model.
As a future enhancement, HTMLProc might save itself directly to a database.
Overview of theory and practice of the OMG Unified Modeling Language v1.4
12
UML Deployment Diagram, Simple
Here is our minimal hardware and software installation.
Shows physical platforms and network connections. Nodes are hardware, components are software.
Overview of theory and practice of the OMG Unified Modeling Language v1.4
13
UML Deployment Diagram, Complex
As a future enhancement, HTMLProc might spawn a listener to serve incomingclient requests.
Shows physical platforms and network connections. Nodes are hardware, components are software.
Overview of theory and practice of the OMG Unified Modeling Language v1.4
14
UML Component Diagram
HTMLProc might just be one of many components, but the developer doesn’t need to know that at all.
Overview of theory and practice of the OMG Unified Modeling Language v1.4
15
UML Object Diagram
Represents run time structure. Each object is an instantiated class.
Overview of theory and practice of the OMG Unified Modeling Language v1.4
16
UML Sequence Diagram
How objects collaborate. Shows messages passed. Shows sequence in time.
Overview of theory and practice of the OMG Unified Modeling Language v1.4
17
UML Collaboration Diagram
Cross between a object and sequence diagram. Shows spatial organization and interaction.
Same as shown on sequence diagram.
Overview of theory and practice of the OMG Unified Modeling Language v1.4
18
Fin