uml unified markup language

33
UML Unified Markup Language Ziya Karakaya Atılım University, Computer Engineering [email protected]

Upload: dalton-goff

Post on 03-Jan-2016

33 views

Category:

Documents


2 download

DESCRIPTION

UML Unified Markup Language. Ziya Karakaya At ılım University, Computer Engineering [email protected]. DEFINITION. Unified Markup Language is the successor to the wave of Object-oriented Analysis and Design methods that appear in the late `80s and early `90s. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: UML Unified Markup Language

UMLUnified Markup

Language

Ziya KarakayaAtılım University,

Computer Engineering

[email protected]

Page 2: UML Unified Markup Language

DEFINITION

Unified Markup Language is the successor to the wave of Object-oriented Analysis and Design methods that appear in the late `80s and early `90s.

Most directly unifies the methods of Booch, Rumbaugh (OMT), and Jacabson, but its reach is wider than that.

UML went through a standardization process with the OMG (Object Management Grouop) and is now an OMG standard.

Page 3: UML Unified Markup Language

WHAT IT IS

UML is a modeling language, not a method Most methods consist, at least in principle, of both

a modeling language and a process. Modelling Language is the (mainly graphical)

notation that methods use to express designs. Process is their advice on what steps to take in

doing a design. Modeling Language is the most important part of

the method, which is the key part of communication.

Page 4: UML Unified Markup Language

WHY USE UML Helps Analysis and Design Used for communication Use the advantages of OO DocumentationAs stated in The Unified Modeling Language User

Guide;UML is a language for;• Visualizing• Specifying• Constructing• Documenting

Page 5: UML Unified Markup Language

Visualizing

It makes it easier to understand and work through problem

Since it is a formal language, it enables other developers familiar with the language to more easily interpret our drawings.

Page 6: UML Unified Markup Language

Specifying

We must communicate our software system using some common, precise, and unambiguous communication mechanism.

Again the formal nature of the UML facilitates this specification quite nicely.

Page 7: UML Unified Markup Language

Constructing

We know that the UML is a formal language with its own set of syntactical rules.

Because of this formality, we can create tools that interpret our models.

They can map the elements to a programming language, such as Java, C++.

Many tools such as Rational Rose, supports this forward engineering. In fact this is one of the advantages of using a formal modeling tool.

Page 8: UML Unified Markup Language

Documenting

The models we create are just one of the articats produced throughout the development lifecycle.

Using the UML in a consistent fashion produces a set of documentation that can serve as a blueprint of our system.

Page 9: UML Unified Markup Language

FUNDAMENTAL UML

Models and Views Core Diagrams Fundamental Elements

Page 10: UML Unified Markup Language

Models and Views

UML is more than disjointed diagrams Turn attention to an illustration of the UML

from three different perspectives Further insight into these divisions enables us

to realize one of the greatest benefits of modeling, which is creating different views of our software system.

Page 11: UML Unified Markup Language

Model

Views

Class DiagramsSequence Diagrams

Class Diagrams(Packages)

Individual Diagrams

Actor1

UseCase1

UseCase2

Fundamental Elements

Actor2UseCase3

Interface2 «uses»

-End1*

-End2*

{}

Class3

«interface»Interface3

«utility»utility1

Page 12: UML Unified Markup Language

Fundamental Elements

These are the elements of which diagrams are composed

Understanding the intent of each element enables us to create precise diagrams, because each of them has unambiguous meaning.

Page 13: UML Unified Markup Language

DIAGRAMS

Individual diagrams contribute more to the specification of a software system.

They are composition of many of the fundamental elements.

Are mechanism that developers use to communicate and solve problems in the complex aspects of the system.

The most common diagram is the Class Diagram, which describe the structural relationships that exist among the classes, can guide developers in understanding our software system’s class structure.

Page 14: UML Unified Markup Language

VIEWS

As we become more proficient in modeling, we begin to realize that using a combination of diagrams to communicate is most effective.

We may need to combine class diagram with a diagram whose intent is to give systems dynamics.

By combining these called views. View is a depiction of our system from a particular

perspective. By making different views, we can represent our

system from different perspectives.

Page 15: UML Unified Markup Language

VIEWS

There are five main views, Use case Design Development Process Physical

They must be consistent with each other, because all of them are representing the same system.

Can be used to validate each other.

Page 16: UML Unified Markup Language

USE CASE VIEW

This view documents the system from the customer’s perspective.

Terminology used in this view should be domain specific.

Depending on the technical nature of our audience, we should avoid obscure technical terms.

Diagrams most common in this view are the use case diagrams and, less common, activity diagrams.

Organizations transitioning to the UML may wish to work only with use case diagrams early and experiment with activity diagrams over time.

Page 17: UML Unified Markup Language

Design VIEW

This view documents the system from designer’s and architect’s perspective.

Diagrams most common in this view are class and interaction diagrams (either sequence or collaboration), as well as package diagrams illustrating the package structure of our Java application.

Page 18: UML Unified Markup Language

Development VIEW

This view documents the components that the system is composed of.

This view typically contains component diagrams.

Except for the most complex Java applications, this view is optional.

Page 19: UML Unified Markup Language

Process

This view documents the processes and threads that compose our application.

These processes and threads typically are captured on class diagrams using an active class.

Because of the advanced nature of active classes, coupled with the volume of use, active classes are beyond the scope of this discussion.

Page 20: UML Unified Markup Language

Physical VIEW

This view documents the system topology. Deployment diagrams that compose this view

illustrate the physical nodes and devices that make up the application, as well as the connections that exist between them.

Page 21: UML Unified Markup Language

VIEWS (cont.)

We are not limited with the listed views. If there is something that architecturally

important, for example security, then we may create a new view (ex: security view) into the system from that perspective.

Page 22: UML Unified Markup Language

DIAGRAMS As we’ve seen, we can combine

diagrams that form models and that can serve as views into our system.

If an advantage in modeling is to combine diagrams to form views into our system, then it only makes sense that each diagram has a different focus on what it communicates.

Each falls into one of two categories: behavioral, and structural.

Most commonly used are use case, sequence, and class diagrams.

Page 23: UML Unified Markup Language

Behavioral diagrams Behavioral diagrams depict the dynamic aspects of our

system.They are most useful for specifying the collaborations among elements that satisfy the behavior of our system’s requirements.

Five diagrams that fall into this category are; Use case Activity State Sequence Collaboration

Mostly used are use case, sequence, and collaboration. Activity and state diagrams are used on an as-needed basis. Activity diagrams visually represent behaviors captured by use

cases. State diagrams, on the other hand, are used to illustrate complex

transitions in behavior for a single class.

Page 24: UML Unified Markup Language

Use case diagrams Use case diagrams are centered around the

business processes that our application must support.

Most simply, use case diagrams enable us to structure our entire application around the core processes that it must support.

Doing so enables us to use these use cases to drive the remainder of the modeling and development effort.

Shows a set of actors and use cases, and the relationships between them.

Use case diagrams contribute to effective model organization, as well as modeling the core behaviors of a system.

Page 25: UML Unified Markup Language

Activity Diagrams

Models the flow of activity between processes.

These diagrams are most useful in detailing use case behavior.

An activity diagram doesn’t show collaboration among objects.

Page 26: UML Unified Markup Language

State Diagrams

Illustrates internal state-related behavior of an object.

Transitions between states help identify, and validate, complex behavior.

A class can have at most a single state diagram.

Page 27: UML Unified Markup Language

Sequence Diagrams

Semantically equivalent to a collaboration diagram.

sequence diagram is a type of interaction diagram that describes time ordering of messages sent between objects.

Almost in all software development activity, this diagram is used.

Page 28: UML Unified Markup Language

Collaboration Diagrams

A type of interaction diagram that describes the organizational layout of the objects that send and receive messages.

Semantically equivalent to a sequence diagram.

It uses class diagrams layout, and can be used to make more cohesive and less coupled classes.

Page 29: UML Unified Markup Language

STRUCTURAL DIAGRAMS Diagrams in this category are focused on specifying the static

aspects of our system. Of these four diagrams, the class diagram is most often used. when transitioning to the UML, most organizations tend to use

class diagrams first because they are excellent mechanisms for communication among developers, as well as tools that can be used for problem solving.

There are two forms of class diagrams. The first is the most commonly understood and consists of the

classes that compose our system and of the structure among these classes.

Unfortunately, the second is not often used but is of equal importance and can be most effective in helping developers understand our system from a high level.

A type of class diagram, called a package diagram, often represents the Java packages and the dependencies between them that our application consists of.

Page 30: UML Unified Markup Language

Class Diagrams

Illustrates a set of classes, packages, and relationships detailing a particular aspect of a system.

This diagram is likely the most common one used in modeling.

Page 31: UML Unified Markup Language

Object Diagrams Provides a snapshot of the system illustrating the

static relationships that exist between objects. Object diagrams depict the structural relationship

that exists among the objects within our running application at a given point in time.

When we think of the runtime version of our system, we typically think of behavior.

Many people have found that object diagrams are most useful in fleshing out the instance relationships among objects, which in turn can help verify our class diagrams.

Beyond this, object diagrams are not often used.

Page 32: UML Unified Markup Language

Component Diagrams

Addresses the static relationships existing between the deployable software components.

Examples of components may be .exe, .dll, .ocx, jar files, and/or Enterprise JavaBeans.

Component diagrams might be used to show the software components within our application.

Components aren’t equivalent to classes.

Page 33: UML Unified Markup Language

Deployment Diagrams

Describes the physical topology of a system. Typically includes various processing nodes,

realized in the form of a device (for example, a printer or modem) or a processor (for example, a server).

Deployment diagrams are most useful when we have a complex configuration environment.

If our application is to be deployed to multiple servers, across locations, a deployment diagram might be useful.