0% found this document useful (0 votes)
23 views

Component, Deployment and Package Diagrams

Uploaded by

Hopelight
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views

Component, Deployment and Package Diagrams

Uploaded by

Hopelight
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

UML

component,deployment and
package diagrams
UML
Component Diagram
Component Diagram

■ A component represents a modular part of a


system that encapsulates its contents and
whose manifestation is replaceable within its
environment.
■ Component diagrams are used to model
software as group of components connected to
4

each other through well-defined interfaces.


They help decompose systems and represent
Component Diagram

■ Components can be modeled using an external


black-box or internal white-box approach.
■ Black-box approach hides the component’s internal structure.
&Components interact with each other only through identified
interfaces.
■ White-box approach shows the component’s internal structure (e.g.,
realizing classifiers).
■ Component interfaces are classified as provided or 5

required interfaces.
6
Component Diagram
Two more important concepts used in component diagrams are:

■ Ports
■ Abstraction used to model access points for allowing the external
environment to access the component’s services and for allowing
components to interact with their external environment.
■ Modeled using a small square at the boundary of a classifier, in this
case, a component.
■ Ports can be named, e.g., port names below are Port 1 and Port 2.
■ Delegation connectors 7

■ Used to model the link between the external provided interfaces of


a component to the realization of those interfaces internally within
the component.
■ Similarly, delegation connectors model the link between internally
Component Diagram

8
Component Diagram

■ Consider a system with the following desired properties:


■ A data collection system equipped with:
■ Sensors
■ Video capture capabilities
■ Automatic collection at specific times of the day.
■ Collection schedules need to be provided to the system.
■ It is expected that the technology used for collection can
improve, therefore: 9
■ Different sensors technology can be incorporated.
■ Different video capture capabilities can be incorporated.
■ This is important to the customers!
■ The system must make available the data collected.
■ Both sensor and video data.
10
DEPLOYMENT DIAGRAMS
Deployment Diagrams

■ Deployment diagrams are structural diagrams used


to model the physical realization of
software systems.
■ They provide the means to visualize and evaluate the
environment in which software executes.
■ They model nodes and the interfaces between them.
12
Deployment Diagrams

■ A Node is a computational resource that host software


artifacts for execution.
■ A Node is a named classifier modeled as a cube.
■ Deployment diagrams also include artifact and
components and depicts how all of these work
together from a system deployment perspective. 13
Deployment Diagrams

14
PACKAGE DIAGRAMS
Packages
■ Logical grouping of UML elements
■ Simplifies UML diagrams
■ Groups related elements into a single
higher-level element
■ Dependency relationships 16

■ Shows a dependency between packages


Syntax for Package Diagram

A PACKAGE

17

A DEPENDENCY RELATIONSHIP
Modification Dependency
■ Indicates that a change in one package could cause a
change to be required in another package.
■ Example:
■ A change in one method will cause the interface for all

objects of this class to change. Therefore, all classes


that have objects that send messages to the instances
of the modified class have to be modified.
18
Dependencies
Acyclic graph Cyclic graph
( DESIREBLE) (UNDESIREBLE)

19
System

20
Importing and Accessing Packages

● With <<import>>, the elements of imported


package are accessible without qualification.
● With <<access>> only the importing package
can access the elements of the accessed package.

21
Steps for Identifying Packages and
Building Package Diagrams

■ Set the context


■ Cluster classes together based on shared
relationships
■ Model clustered classes as a package
■ Identify dependency relationships among packages
■ Place dependency relationships between packages 22
Thanks

You might also like