Unified Modelling Language | Basics of UML



UML Introduction::

  • UML is used to represent a software using some diagrams. It acts as a communication language between software engineers to build the software product.

  • UML is a way of visualizing a software program using a collection of diagrams.

  • Uml is a standard language for specifying, visualizing, constructing, and documenting the artifacts (Internal parts) of software systems. 

  • Uml is a Language used to make software blueprints. 

  • Uml is not a programming language.

  • Although UML is generally used to model software systems, it is not limited within this boundary. It is also used to model non software systems as well. 

  • Uml has a direct relation with object oriented analysis and design.

  • Uml has become an OMG standard.

  • There are 13 types of diagrams in UML. Actually the original uml has nine diagrams; Uml 2.x brings that number up to 13. The new four diagrams are

    1.  communication diagram

    2. composite structure diagram

    3. interaction overview

    4. timing diagram. 

  • In 2.x statechart diagrams are renamed to state machine diagrams (also known as state diagrams).

Building blocks of UML

The building blocks of UML are

  1. Things

  2. Relationships

  3. Diagrams


  1. Things

    1. Structural Things

      1. Class

      2. Interface

      3. Collaboration 

      4. Component

      5. Use case

      6. Node

    2. Behavioral Things

      1. Interaction

      2. State Machine

    3. Grouping Things

      1. Package

    4. Annotational Things

      1. Note

  2. Relationships 

    1. Dependency

    2. Association

    3. Generalization 

    4. Realization

  3. Diagrams



Things

  • Real world entities or objects are termed as things.

  • These entities or objects can be tangible (physical object), or intangible (abstract concept).

There are 4 types of things in UML. They are

  1. Structural Things

  2. Behavioral Things

  3. Grouping Things

  4. Annotational Things

Structural Things:

Structural things define the static part of the model. They represent the physical and conceptual elements. This is again divided into six parts, those are

  1. Class:

Class describes a set of objects that share the same attributes, operations.It is represented as a rectangle with three compartments.

  1. Interface:

Interface defines externally visible behaviour of a class.

It is a collection of operations that specify the services of a class or component and is represented by a circle

  1. Collaboration:

A collection of UML building blocks (classes, interfaces, relationships) that work together to meet a certain goal(task).

It is represented as an ellipse with dashed lines.

  1. Component:

Component describes the physical part of a system. 

It is represented as a rectangle with tabs.

Ex:: we can represent a sim card (in phone) as a component when designing calling related software.

  1. Use Case:

It is used to describe the list of steps to be performed by a system. Example: receive a phone call. It is represented as an ellipse with a solid line.

  1. Node:

A node can be defined as a physical element that exists at runtime and represents a resource.

It is represented as a cube.


Behavioral Things:

A behavioral thing consists of dynamic parts of UML models. 

This again divided into 2 parts:

  1. Interaction

  2. State Machine


  1. Interaction Things:

Interaction is defined as a group of messages exchanged among elements to accomplish a specific task.

Each message in the interaction is represented as an arrow. 

  1. State Machine:

State machine is useful when the state of an object in its life cycle is important. 

It defines the sequence of states an object goes through in response to events.

Each state in the state machine is represented as rounded rectangle. 


Grouping Things

Grouping Things can be defined as a mechanism to group elements of a UML together.

  1. Package::

Package is a namespace used to group together elements that are semantically related and might change together 

A package may contain structural, behavioral and other grouping things

Annotational Things

  • Annotation means Note

  • Annotational Things can be defined as a mechanism to capture remarks, description, and comments of UML model elements.

  1. Note:

It is the only annotational thing available.

A Note is used to render comments, constraints etc of a UML element.


Relationships

  • In understanding complex systems, it is important to model how different elements are related to one another. This is done through relationships 

  • There are four types of relationships in UML 


  1. Dependency

  2. Association

  3. Generalization

  4. Realization


  1. Dependency ::

Dependency is a relationship between two things in which change in one element also affects the other.

It is represented as directed dashed line.


----------------->

  1. Association

Association is basically a set of links that connects the elements of a UML model.

 It also describes how many objects are taking part in that relationship.

  1. Generalization

  • It basically describes the inheritance relationship in the world of objects.

  • It is a kind of relationship in which the specialized element (called Child) builds on the specification of the generalized element (called Parent).

  • It is represented as a solid line with a hollow arrowhead pointing to the parent.

  1. Realization

Realization can be defined as a relationship in which two elements are connected. One element describes some responsibility, which is not implemented and the other one implements them. 


Diagrams




Post a Comment

1 Comments

  1. For best viewing download https://docs.google.com/document/d/1xoopSMU2JfexPRWeIOEJZV7h7WcUeD5uNPgb7RRoi1c/edit?usp=drivesdk

    Download Google docs for best view

    ReplyDelete