180 likes | 367 Vues
The Unified Modeling Language. Overview of theory and practice of the OMG Unified Modeling Language v1.4. What Is Software ‘Modeling’?. The design of software applications before coding. Just like the plans for a house. Blueprints Elevation Site map. All models are wrong;
E N D
The Unified Modeling Language Overview of theory and practice of the OMG Unified Modeling Language v1.4
What Is Software ‘Modeling’? • The design of software applications before coding. • Just like the plans for a house. • Blueprints • Elevation • Site map All models are wrong; Some models are useful. Overview of theory and practice of the OMG Unified Modeling Language v1.4
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 software application will fail to meet all of its requirements on time and on budget. Overview of theory and practice of the OMG Unified Modeling Language v1.4
OOSE: Typical Requirements Document The software application HTMLProc will process HTML pages 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 is The first step in a software engineering lifecycle. Overview of theory and practice of the OMG Unified Modeling Language v1.4
OOSE: Find Classes, Attributes, and Methods The software application HTMLProc will process HTML pages 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
Structure diagrams Class Object Component Deployment Management diagrams Package Subsystem Model Behaviour diagrams State Use case Sequence Collaboration Activity Standard UML Diagram Categories Not all diagrams are needed for most models! Overview of theory and practice of the OMG Unified Modeling Language v1.4
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
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
UML State Diagram • Shows stateful behaviour. • Is most useful when: • Representing little concurrency. • Having no complex conditions. • Does not directly show actions. Revise style Check syntax for conformance to HTML 4.01 Overview of theory and practice of the OMG Unified Modeling Language v1.4
UML Class Diagram • Describes static structure. • Same thing as ‚class‘ in Java or C++. The classes of our main package HTMLProc. Overview of theory and practice of the OMG Unified Modeling Language v1.4
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
UML Deployment Diagram, Simple • Shows physical platforms and network connections. • Nodes are hardware, components are software. Here is our minimal hardware and software installation. Overview of theory and practice of the OMG Unified Modeling Language v1.4
UML Deployment Diagram, Complex • Shows physical platforms and network connections. • Nodes are hardware, components are software. As a future enhancement, HTMLProc might spawn a listener to serve incoming client requests. Overview of theory and practice of the OMG Unified Modeling Language v1.4
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
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
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
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
Fin Overview of theory and practice of the OMG Unified Modeling Language v1.4