2.93k likes | 3.12k Views
The Three Amigos. Unified Modeling Language (UML). P.S.Suryateja Asst. Professor CSE Department Vishnu Institute of Technology. Outline. Introduction to UML Importance of modeling Principles of modeling Object oriented modeling Overview of UML Conceptual model of the UML
E N D
The Three Amigos Unified Modeling Language (UML) P.S.Suryateja Asst. Professor CSE Department Vishnu Institute of Technology
Outline • Introduction to UML • Importance of modeling • Principles of modeling • Object oriented modeling • Overview of UML • Conceptual model of the UML • Architecture • Software development life cycle (RUP) • Structural Modeling • Classes • Relationships • Common mechanisms • Diagrams • Class diagrams • Advanced classes • Advanced relationships • Object diagrams
Outline (cont…) • Behavioral Modeling • Interactions • Interaction diagrams • Use cases • Use case diagrams • Activity diagrams • Events and signals • State machines • State chart diagrams • Architectural Modeling • Components • Deployment • Component diagrams • Deployment diagrams • Common modeling techniques
Prerequisites • Object orientation concepts • Software engineering
Objectives • Learn what is UML. • Learn why UML is relevant to developing software systems. • Learn how to speak the language effectively. • Learn how to apply UML.
Outcomes • Ability to read UML models. • Ability to develop UML models.
Software System - Definition Software [Set of programs] (Source Code) + Configuration files, system documentation, end-user documentation, test results, maintenance records etc…
Software System - Examples • Operating systems • Computer reservation systems • Air traffic control systems • Military command and control systems • Telecommunication networks • Content management systems • Database management systems • Expert systems etc…
Modeling What? How? Why? Where?
Model • A model is a simplified representation of the real thing/system. • A model captures the important aspects of the thing being modeled. • A model is expressed in a medium that is convenient for working.
Model (cont…) Construction
Model (cont…) Software Design
Modeling (cont…) • What? • The art and science of developing models. • Why? • To understand the system in a better/easier way. • Where? • Design phase (most of the time). • How? • That is what UML is for.
Importance of Modeling • We build models to: • Communicate the structure and behavior of the system. • Visualize and control the system's architecture. • Understand the system we are building in a better manner. • Manage risks.
Principles of Modeling • The choice of what models to create has a profound influence on how a problem is attacked and how a solution is shaped. • Every model may be expressed at different levels of precision. • The best models are connected to reality. • No single model is sufficient. Every non-trivial system is best approached through a small set of nearly independent models.
Object Oriented Analysis and Design • OOAD is a software engineering approach that models a system as a group of interacting objects. • The notation for representing these models is UML. • OOA focuses on what the system does. Models consists of use-case, class and interaction diagrams. • OOD focuses on how the system does it. Detailed diagrams.
Object Oriented Modeling Two approaches for developing models Algorithmic Perspective Object-Oriented Perspective • Traditional approach • Fundamental unit is function • Functional decomposition • Difficult to maintain • Modern approach • Fundamental unit is object or class • Communication through messages • Easy to maintain and enhance
What are Models For? • To capture and precisely state requirements and domain knowledge so that all stakeholders may agree and understand them. • To think about the system design. • To capture design decisions in a mutable form separate from the requirements. • To generate usable work products.
What are Models For? (cont…) • To organize, find, filter, retrieve, examine, and edit information about large systems. • To explore multiple solutions economically. • To master complex systems.
What is in a Model? • Syntax • Semantics • Presentation
Modeling work process Ref: UML 2 Tool Kit by Eriksson, Penker, Lyons, Fado
UML - Introduction What? How? Why? Where?
UML – Introduction (cont…) • What? • A modeling language for visualizing, specifying, constructing and documenting the artifacts of a software system. • Why? • UML is a industry standard modeling language. • Where? • Design phase (most of the time). • How? • That is what the subject is about.
UML Applicable Domains • Enterprise information systems • Banking and Financial services • Telecommunications • Transportation • Defense • Retail • Medical electronics • Scientific • Distributed web-based services
Why Unified? • UML is unified across several domains: • Across historical methods and notations • Across the development lifecycle • Across application domains • Across implementation languages and platforms • Across development processes • Across internal concepts
The Three Amigos History of UML Fusion 1st unification attempt OMT, Booch, CRC UML work begins UML proposal accepted by OMG UML 1.x Object Management Group RFP UML 2.0 Schlaer/ Mellor Prehistory Booch Rumbaugh (OMT) 1994 1995 1996 1997 2003 2004 Jacobson (Objectory) Booch & Rumbaugh (OMT) join Rational Jacobson (Objectory) joins Rational UML becomes an industry standard Ongoing UML development Coad/ Yourdon • A major upgrade to UML at the end of 2003: • Greater consistency • More precisely defined semantics • New diagram types • Backward compatible Latest Version: 2.4.1 Published on Aug 2011
UML is a Language for Visualizing • Problems with non-standard modeling (textual): • Communicating conceptual models to others is error-prone unless everyone involved speaks the same language. • There are some things about a software system you can't understand unless you build models. • If the developer who created the code never wrote down the models that are in his or her head, that information would be lost forever.
UML is a Language for Specifying • Specifying means building models that are precise, unambiguous and complete. • UML addresses the specification of all important decisions regarding: • Analysis • Design • Implementation
UML is a Language for Constructing • UML models can be directly connected to various programming languages such as Java, C#, VB etc. • Forward engineering • Reverse engineering • Round trip engineering
Forward Engineering Example Customer class Customer { private int cid; private String cname; private String mobile; private String email; public void purchase( ) { … } public void login( ) { … } public void logout( ) { … } public void search( ) { … } } - cid - cname - mobile - email + purchase( ) + login( ) + logout( ) + search( )
Reverse Engineering Example Customer class Customer { private int cid; private String cname; private String mobile; private String email; public void purchase( ) { … } public void login( ) { … } public void logout( ) { … } public void search( ) { … } } - cid - cname - mobile - email + purchase( ) + login( ) + logout( ) + search( )
Roundtrip Engineering Example Customer class Customer { private int cid; private String cname; private String mobile; private String email; public void purchase( ) { … } public void login( ) { … } public void logout( ) { … } public void search( ) { … } } - cid - cname - mobile - email + purchase( ) + login( ) + logout( ) + search( )
UML is a Language for Documenting • UML addresses the documentation of a system's architecture and all of its details. • UML provides a language for expressing requirements and for tests. • UML provides a language for modeling the activities of project planning and release management.
Conceptual Model of UML • UML building blocks (syntax) • Rules (semantics) • Common mechanisms
Relationships in UML Dependency Association Generalization Realization
Diagrams • Class diagram • Object diagram • Use case diagram • Sequence diagram • Collaboration diagram • Statechart diagram • Activity diagram • Component diagram • Deployment diagram
Common Mechanisms • Specifications • Adornments • Common divisions • Extensibility mechanisms • Stereotypes • Tagged values • Constraints
Architecture Development View Logical View End user Programmers & software managers Integrator System Engineer Physical View Developed by Philippe Kruchten