U M L

UML
(Unified Modeling Language)

Concepts in UML
1. Introduction to UML 2. Basic Structural Modeling 3. Advanced Structural Modeling 4. Class & Object Diagrams 5. Basic Behavioral Modeling - I 6. Basic Behavioral Modeling - II 7. Advanced Behavioral Modeling 8. Architectural Modeling

Introduction to UML:
ØHistory of UML ØImportance of Modeling ØPrinciples of Modeling ØObject Oriented Modeling ØConceptual Model of UML ØArchitecture ØSoftware Development Life Cycle

Basic Structural Modeling:
ØClasses ØRelationships ØCommon Mechanisms ØDiagrams

Advanced Structural Modeling:
ØAdvanced Classes ØAdvanced Relationships ØInterfaces ØTypes and Roles ØPackages

Class & Object Diagrams:
ØTerms ØConcepts ØModeling Techniques for Class & Object Diagrams

Basic Behavioral Modeling – I:
ØInteractions ØInteraction Diagrams

Behavioral Modeling – II:
ØUse Cases ØUse Case Diagrams ØActivity Diagrams

Advanced Behavioral Modeling:
ØEvents and Signals ØState Machines ØProcess and Threads ØTime and Space ØState Chart Diagrams

Architectural Modeling:
ØComponent ØDeployment ØComponent Diagrams and Deployment Diagrams

UML:Why only UML?

Introduction to

The UML enables system builders to create “blueprints” that capture their visions in a standard , easy-to-understand way and communicate them to others.

What is UML:UML stands for Unified Modeling Language is a standard language for writing software blueprints used to specify, visualize, construct & document the artifacts of an object-oriented s/w intensive system under development.

History of vGrady Booch, James Rumbaugh and Ivar Jacobson are the “Three Amigos” who developed this UML in :UML the ending of 1996.
vThese gentlemen worked in separate organizations through the ‘80s and early ‘90s each devising his own methodology for Object-Oriented analysis and design. vIn 1994, Rumbaugh joined Rational Software Corporation, where Booch was already working. Jacobson enlisted at Rational a year later. vUML is a merged technique which is merged from the concepts of Booch Methods, Object Modeling Techniques & Object-Oriented Software Engineering(OOSE). vUML combines the best practices from Data Modeling concepts such as Entity Relationship diagrams, Data Flow, Work Flow diagrams, Object Modeling & Component Modeling. vThe UML consists a number of graphical elements that combine to form diagrams. The purpose of the diagrams is to present multiple views of a system, and this set of multiple views is called a “Model”. vIn 1997, the UML consortium produced version 1.0 of the UML and submitted it to the Object Management Group(OMG) for a standard modeling language.

üUML 1.1 in 1997 üUML 1.2 in 1999 üUML 1.3 in 2000 üUML 1.4 in 2001 üUML 1.5 in 2003 üUML 2.0 in 2005

Versions of üUML 1.0 in 1996 UML:-

üUML 2.1.1 in 2007 üUML 2.1.2 in 2007

Importance of Modeling:•Modeling is a proven and well-accepted engineering technique. •A Model is a simplification of reality. •A Model provides the blue prints of a system. •We build Models so that we can better understand the system we are developing. •Models helps us to visualize a system as it is or as we want it to be. •Models permits us to specify the structure or behavior of a system. •Models document the decisions we have made. •Models gives us a template that guides us in constructing a system. •We build Models of complex systems because we cannot comprehend such a system in its entirety. •Finally, we build Model to control the system.

Principles Of Modeling:I. The choice of what models to create has a profound influence on how a problem is and how a solution is shaped. II. Every model may be expressed at different levels of precision. III. The best models are connected to reality. IV. No Single model is sufficient, Every nontrivial system is best approached through a small set of nearly independent models.

Object-Oriented Modeling:üIn Object-Oriented Modeling approach, the main building block of all software system is the “ Object “ or “ Class “. üSimply put, an Object is a “ Thing “. üA Class is description of a set of common objects. üEvery object has identity, state, and behavior. üVisualizing, specifying, constructing, and documenting object-oriented systems is exactly the purpose of the Unified Modeling Language.

Overview of UML:ØUML as a Language:
A Language provides a vocabulary & the rules for communication that focus on physical & conceptual representation of a system, UML tells you how to create & read well-formed models, but they don’t tell you what models you should create and when to create.

ØUML for Specification:
UML address the specification of all the important analysis, design & implementation decisions that must be made in developing and deploying a software intensive system.

ØUML for Visualizing:
UML is such a graphical language that some “ Things “ can be modeled textually and some are best modeled graphically.

ØUML for Construction:
UML is not only a visual programming language but its models can be directly connected to a variety of programming languages.

ØUML for Documentation:
UML addresses the documentation of a system architecture and its details, requirements, activities of project planning & release management.

Conceptual Model of To UML:- understand UML, learners need to
1)Basic Building Blocks 2) Rules 3) Common Mechanisms

know about the Conceptual Model of this language and this requires learning three major elements. They are,

§Basic Building Blocks:
The Vocabulary of UML encompasses three kinds of building blocks. They are,

1. Things 2. Relationships 3. Diagrams
• “ Things “ form the vocabulary(Nouns) of a system and they are the abstractions of a particular model, “ Relationships “ tie the things together, “ Diagrams “ group related things together.

Things in UML:There are four kinds of “ Things “ in UML. They are, 1) Structural Things:- Structural things are the “ Nouns “
and are the static parts of an UML model.

2) Behavioral Things:- Behavioral things are the “ Verbs ” and
are the dynamic parts of an UML model. parts of an UML model.

3) Grouping Things:- Grouping things are the Organizational 4) Annotational Things:- Annotational things are the
Explanatory parts of an UML model. Structural things are classified into 7 types. Behavioral things are classified into 2 types. Grouping things are classified into 1 type. Annotatational things are classified into 1 type.

üStructural Things are of 7 types, they are,
1. Class:- A Class is a description of a set of objects that share the same
attributes, operations, relationships & semantics, class may implement one or more interfaces. Graphically, a class is rendered as a “ Rectangle ” with three compartments for Name of the class, Attributes, Operations as shown below.
Name of the Class Attributes Operations

2. Interface:- An Interface is a collection of operations that specify “ what to
do “. Graphically, an interface is rendered as a “ Circle ” with it’s name as shown below.

Interface name

3. Collaboration:- A Collaboration defines an interaction & it is a set of roles

and responsibilities. Generally, a collaboration is realized by a “ Use Case ”. Graphically, a collaboration is rendered as an “ Ellipse with Dashed Lines “ as shown below.

Roles 4. Use Case:- A Use Case is a description of a set of sequence of actions that a
system performs with a particular actor. A use case is graphically rendered as an “ Ellipse with Solid Line ” as shown below.

Action Name
5. Active Class:- An Active Class is a class where objects own one or more
processes or threads to initiate a control activity. Graphically, an active class is rendered like a “ Class but with Thick Lines “ as shown below.

6. Component:- A Component is a physical and replaceable part of a system
which provides the realization of Interfaces. Graphically, a component is rendered as a “ Rectangle with Tabs “ as shown below.
Name.java

7. Node:- A Node is a physical element that exists at runtime & represents a
computational resource like memory. Graphically, a node is rendered as a “Cube“ including the name.

Server

üBehavioral Things are of 2 types, they are,
1) Interaction:- An Interaction is a behavior that comprises a set of messages
Operation Name

exchanged among a set of objects. Graphically, an interaction message is rendered as a “ Directed Arrow Line ” including the name of the operation as shown below.

2) State Machine:- A State Machine is a behavior that specifies the sequences
of states. Graphically, a state is rendered as a “ Rounded Rectangle “ with it’s name and also it’s state as shown below. State Name

üGrouping Things are of 1 type, it is,

i. Package:- A Package is a general purpose mechanism for organizing elements
into groups. Graphically, a package is rendered as a “ Tabbed Folder ” as shown below. Package Name

üAnnotational Things are of 1 type, it is,

I. Note:- A Note is a special kind of graphical symbol used to specify comments

or constraints. Graphically, a note is rendered as a “ Rectangle with a dog-eared corner “ as shown below. Comments

Relationships in UML:There are four types of “ Relationships “ in UML. They are, i. Dependency:- A Dependency is a Semantic relationship between two things
in which a change to one thing may affect the semantics of the other thing. Graphically, a dependency is rendered as a “ Dashed Arrow “ as shown below.

ii. Association:- A Association is a Structural relationship that describes a set
of links that connected among Objects. Aggregation is a special kind of association representing a structural relationship b/w a whole and its parts. Graphically,

iii. Generalization:- A Generalization is a Specialization / Generalization
is

relationship in which Objects of the specialized elements are substitutable for objects of the generalized element. Graphically, a generalization relationship

rendered as a “ Solid Line with a Hallow Triangle Arrow Head ” as shown below iv. Realization:- A Realization is graphically rendered as a ” Dashed Line with a Hallow Triangle Arrow Head “ as shown below.

Diagrams in UML:There are two kinds of “ Diagrams “ in UML. They are, I. Static (or) Structural Diagrams II. Dynamic (or) Behavioral Diagrams In UML, a total of 9 diagrams are available that are classified either into Static or Dynamic. They are, 1. Class Diagram:- Class shows the entities in a system or a domain and
how these entities relate to one another. relationships.

2. Object Diagram:- Object shows instances of the classes and their inter3.

Use Case Diagram:- Use Case shows system usage, this appears with
an actor or stick figure. interact with one another over time.

4. Sequence Diagram:- Sequences visualizes how the Objects in a system 5. Collaboration Diagram:-Collaboration is another way of visualizing
how Objects work together overtime.

6. State Chart Diagram:- State Captures the state of an Object during a
specific time period.

7. Activity Diagram:- Activity shows the steps and decision points that
occur within the behavior of an Object, or within a business process. of a system.

8. Component Diagram:- Component models the software components 9. Deployment Diagram:- Deployment represents the physical
architecture of a computer-based system.

§Rules:

The UML has various semantic rules for, i. Names ii. Scope iii. Visibility iv. Integrity v. Execution

§Common Mechanisms in UML:
There are four types of mechanisms available in UML. They are,

1. Specifications Mechanism:- UML is a language which is not

only meant for visualizing the system but also used for specifying the various artifacts of an intensive system. 2. Adornments Mechanism:- In UML , some of the vocabulary of the system are elided(hided) because of the rules . In order to expose some of the facts, UML has a mechanism often known as “ Adornments ” which may be in the form of graphical or textual.

3. Common Divisions Mechanism:-The Common divisions are,
Class & Object Interface & Implementation

4. Extensibility Mechanism:- UML provides a mechanism to

extend the various naunces(issues) such as vocabulary, properties, & semantics using three extensibility mechanisms known as Stereotypes, Tagged values & Constraints.

Architecture of UML:- In UML, the architecture of a s/w intensive
system can be best described by the following 4+1 architecture view.
Design View Implementation View Use Case View Process View Deployment View

An Architecture is a set of significant decisions about, 2. The Organization of the system. 3. The selection of structure elements and their interfaces. 4. Their behavior and collaborations among other elements. 5. The composition of structural and behavioral elements. 6. The architecture style that guides the organization.

I. Use Case View:- A Use Case View of a system encompasses the use cases

that describe the behavior of the system. In UML, “ Static “ aspects of this view are captured in Use Case diagrams, the “ Dynamic “ aspects of this view are captured in Interaction, State Chart and Activity diagrams.

II. Design View:- The Design View of a system encompasses the classes,

interfaces and collaboration that form the vocabulary of the system. In UML, the “ Static ” aspects are captured using Class diagrams and Object diagrams, the “ Dynamic “ aspects are captured using Interaction, State Chart & Activity diagrams.

III. Process View:- The Process View of a system encompasses threads and

processes that form the system. The same type of diagrams used for Design View are used for this view but Classes are replaced with Active Class .

IV. Implementation View:- The Implementation View of a system encom-

passes the components and files are used to assemble and release the physical system. The “ Static “ aspects of this view are captured using Component diagrams, the “ Dynamic “ aspects of this view are captured using Interaction, State Chart and Activity diagrams.

V. Deployment View:- The Deployment View of a system encompasses the

nodes that from the systems hard-ware topology. The “ Static “ aspects of this view are captured using Deployment diagrams whereas the “ Dynamic “ aspects of this view using Interactive, State Chart and Activity diagrams.

Software Development Life Cycle(SDLC):UML is lastly based on the topic “ process independent “. However, to get the most benefits from UML we should consider a process which is, i. Use-Case driven ii. Architecture-Centric iii. Interactive iv. Incremental üUse Case driven means that use cases are used as a primary artifact for establishing the desired behavior of the system, for verifying and validating the systems architecture, for testing and communicating among the stakeholders of the project. üArchitecture-Centric means that a system’s architecture is used as a primary artifact for conceptualizing, constructing, managing and evolving the system under development. üAn Interactive process is one that involves managing a stream of executable releases. üAn Incremental process is one that involves the continuous integration of the systems architecture to produce the releases. Together, an interactive & incremental process is risk-driven, meaning that each new release is focused on attacking and reducing the most significant risks to the success of the project.

Overview of Conceptual Model in UML

Basic Building Blocks

Rules

Common Mechanisms

ØNames üThings üRelationships ØScope ØVisibility üDiagrams ØIntegrity ØExecution

vSpecifications vAdornments vCommon Divisions vExtensibility

Things

Structural Things

Behavioral Things

Grouping Things

Annotational Things

Class Interface Collaboration Use Case Active Class Component Node State Machine Interaction Package Note

Dependency Association/Aggregation Generalization/Specialization Realization

Relationships

Class Diagram Object Diagram Use Case Diagram Sequence Diagram

Diagrams

Collaboration Diagram State Chart Diagram Activity Diagram Component Diagram Deployment Diagram

Rules

Name

Scope

Visibility

Integrity

Execution

Specifications Adornments Common Mechanisms Common Divisions Extensibility

Master your semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master your semester with Scribd & The New York Times

Cancel anytime.