Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Lec 6 - Component Diagrams

Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

Component diagrams

Lecture 6

1
Component Diagram: Why?
• Logical modeling is to visualize, specify, and document the decisions
about the vocabulary of the domain and the structural and behavioral
way those things collaborate.

• Physical modeling to construct the executable system.


• Whereas these logical things live in the conceptual world, the physical
things live in the world of bits…

2
What is a UML Component?
• The Rational definition
“A component is a physical and replaceable part of a system that
conforms to and provides the realization of a set of interfaces”
• A component is a single piece of software…i.e Physical module of
code.
• Graphically denoted as a rectangle with tabs.

Component

3
What is a UML Component?
• We use components to model physical things that may reside on a
node, such as executables, libraries, tables, files, and documents.

• A component typically represents the physical packaging or otherwise


logical elements, such as classes, interfaces, and collaborations.

4
What is a Component Diagram?
• Is a way to model the physical aspects of an Object Oriented system.
• visualize and specify component based systems.
• That is…Explains the structure of a system
• Shows the organizations and dependencies among software
components.
• Collection of
• Components
• Interfaces
• The relationships between them

5
What is a UML Component?
• Key word in the definition is physical.
• A component must be something physical in the system
• Binary executable
• Data file
• In software, many operating systems and programming
languages directly support the concept a component.

6
Components & Classes
• Both have names, may realize set of interfaces, both may participate in
dependency, generalization, and association relationships.

• Both may have instances, may be participants in interactions.

• Classes represent logical abstractions, components represents physical


things(packages) that live in the world of bits.

• Classes may have attributes and operations directly. In general,


components only have operations that are reachable only through their
interfaces.

7
Component structure
• Components were nothing more than a well defined set of classes
with a clear interface that required no other objects to perform a
given task.
• Component structure shows
• Name of component
• Type of component (executable, file, table, document, library)
• Interfaces to the component

8
Interface
• An interface is a collection of operations that are used to specify a
service of a class or a component.

• The relationship between component and interface is important.

9
Provided and required interfaces
• Provided Interface - describes the functionality offered by a class.

• Required interface – describe functionality needed by another class.

10
Provided and required interfaces

11
Component Diagram Example

12
12
Component Diagram Explained
• Diagram in the previous slide shows how the components are
related to each other.

• ShoppingSession is dependent on the methods exposed by the


Shopping CartHome Interface in the ShoppingCart component.

• Catalog component consists of CatalogPK, CatalogInfo and


CatalogJAR components.

13
Example 2

14
Ticket Selling System Component Diagram Example
There is a ticket seller component that sequentializes requests from both ticket selling system and
clerks. A component that processes credit card charges; and the database containing the ticket
information.

15
Summary
• Component diagram breaks down the actual system under
development in to various high levels of functionality.

• Shows the interaction between the components.

• Indicate interfaces that a component provided or required.

16

You might also like