0% found this document useful (0 votes)
121 views21 pages

Unit 8-Component-Diagram Model

The document discusses component diagrams and their elements. A component diagram models the physical architecture of a system by showing components and their dependencies. It describes components used to implement logical elements, such as classes and interfaces. A component represents a physical package such as an executable, library, or file. Interfaces define provided and required services. Ports specify interaction points that allow components to communicate.

Uploaded by

sejal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
121 views21 pages

Unit 8-Component-Diagram Model

The document discusses component diagrams and their elements. A component diagram models the physical architecture of a system by showing components and their dependencies. It describes components used to implement logical elements, such as classes and interfaces. A component represents a physical package such as an executable, library, or file. Interfaces define provided and required services. Ports specify interaction points that allow components to communicate.

Uploaded by

sejal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 21

Unit – 5

Component & Deployment Diagram


Implementation Diagram
• It show the implementation phase of system
development such as the source code
structure and the run time implementation
structure
• It is high level diagram also called as physical
diagram
• Two types:-
– Component diagram
– Deployment diagram
Component Diagram

• It does not describe the functionality of the system but it


describes the components used to make those functionalities.
• It model the physical components such as executables,
libraries, tables, files and documents.
• A Component represents the physical packaging of logical
elements, such as classes, interfaces, and collaborations.
• Logical modeling help to visualize, specify, and document the
collaborations. Physical modeling is used to construct the
executable system.
• Component diagrams can also be described as a static
implementation view of a system. Static implementation
represents the organization of the components at a particular
moment.
Component Diagram

• In the UML, all these physical things are modeled as


components. A component is a physical thing that conforms
to and realizes a set of interfaces, thus interfaces bridge
logical and physical models.
• You also can have file components that represent the source
code files of an application or document files that represent,
for example, the user interface files such as HTML or JSP files.
• Finally, you can use components to represent even the
database tables of a system as well!
• Component diagrams are used during the implementation
phase of an application.
Elements
• Component: The objects interacting with each
other in the system. Depicted by a rectangle
with the name of the object in it, preceded by
a colon and underlined.
• A component is shown as a classifier rectangle with the keyword
«component». (UML 2.0 notation)

• ‘WeatherServices’ component
• Optionally, a component icon similar to the UML 1.4 icon can be
displayed in the top right corner of the component rectangle. If the
icon symbol is shown, the keyword «component» may be omitted.
• UserServices component

• A component may be manifested by one or more artifacts, and in


turn, that artifact may be deployed to its execution environment. A
deployment specification may define values that parameterize the
component’s execution.
Interface
• It is a collection of operations that specify a
service that is provided by or requested from
a class or component.

<<Interface>>
Name

methods
• A provided interface is the one that is either
• realized directly by the component itself, or
• realized by one of the classifiers realizing component, or
• is provided by a public port of the component.
• Ball-socket notation is used to show interface
• The provided interfaces of a port describe requests to the
classifier that other classifiers may make through this port.
The required interfaces of a port describe the requests that
may be made from the classifier to its environment through
the port. Weather Services component provides
(implements)
Weather Forecast interface
• A required interface is either
• designated by usage dependency from the component itself,
or
• designated by usage dependency from one of the classifiers
realizing component, or
• is required by a public port of the component.

User Services component requires


IOrderServices interface

Port
A port specifies an interaction point through which a classifier can communicate
with its environment, with other classifiers, or with its internal parts.
• A Port is a specific window into an encapsulated component accepting messages
to and from the component conforming to specified interface.
• Port is shown as a small square placed either overlapping the boundary of the
rectangle denoting the encapsulated classifier, or it may be shown inside that
rectangle symbol. The name of the port is placed near the small square.
• Ports can support unidirectional communication or bi-directional communication.
• The type of a port may be shown after the port name, separated by
colon ":".
• Multiplicity of a port (if any) is shown after the port name in square
brackets. Both name and multiplicity of port are optional.

Library Services class has port Library Services class has 1 to 6


searchPort with SearchBooks type. searchPort ports.

A provided interface may be shown using the "lollipop" notation attached to the port. A
required interface may be shown using the "socket" notation attached to the port.
Relationship
• Relation/Association: Similar to the
relation/association used in class diagrams

(dependency) (Realization)
Uses of Component diagram
• Modeling Source Code: In application, we organize the files
into larger groups. Sometimes we update some files or
create new version of file. Component diagrams help to
visualize these source code files and their relationships.
• Modeling Executable releases: Releasing a simple
application is easy but for complex technologies we need
main executable, libraries, stored procedures.
Component diagrams help to visualize, specify, construct
and document the configuration of executable releases,
consisting the deployment components that form each
release and the relationships among those components.
• Modeling physical databases: Mapping a logical
database schema to a relational database is not so
simple. In presence of inheritance decisions should be
made about how to map classes to tables.
– Define a separate table for each class
– Collapse inheritance lattices so that all instances of
any class in a hierarchy have the same state
– Separate parent and child states into different tables
• Modeling adaptable systems: sometimes due to
complex operations the database is separated on
different servers.
Example: Online shopping system
• WebStore subsystem contains three components related to online shopping -
Search Engine, Shopping Cart, and Authentication. Search Engine component
allows to search or browse items by exposing provided interface Product
Search and uses required interface Search Inventory provided by Inventory
component. Shopping Cart component uses Manage Orders interface provided
by Orders component during checkout. Authentication component allows
customers to create account, login, or logout and binds customer to some
account.
• Accounting subsystem provides two interfaces - Manage Orders and Manage
Customers. Delegation connectors link these external contracts of the
subsystem to the realization of the contracts by Orders and Customers
components.
• Warehouses subsystem provides two interfaces Search Inventory and Manage
Inventory used by other subsystems and wired through dependencies.
Component Diagram for School Admission System

You might also like