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

Components

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 6

Unit-3

COMPONENTS

• Important building blocks in modeling the physical aspects of the system.

• A component is a physical and replaceable part of a system.

• Used in modeling the physical things that may reside on a node, such as executables, libraries,
tables, files and documents.

• A component physically represents the physical packaging of logical elements such as classes,
interfaces, and collaborations.

• In UML all physical things are modeled as components.

• It realizes a set of interfaces.

• Interfaces therefore bridge your logical and physical models.

• You may specify an interface for a class in a logical model and that same interface will carry over
to some physical component that realizes it.

• Ex: Object libraries, executables, COM + components and EJB

• We can also use components to represent tables, files and documents.

Names
Components and Classes:
In many ways components are like classes i.e.

• both have names.

• Both may realize a set of interfaces

• Both may participate in dependency, generalization, association, relationships.

• Both may be nested

• Both may have instances.

• Both may be participants in interactions.

Differences between components and classes.

• classes represent logical abstractions ; components represent physical things.


• components may live on nodes, classes may not.

• Classes may have attributes and operations directly, where as components can not have
attributes but can have operations

• In general components only have operations that are reachable only through their interfaces.

• If the things you are modeling lives directly on a node, use a component, otherwise use a class.

• component is a physical implementation of a set of other logical elements , such as classes and
collaborations.

COMPONENTS AND INTERFACES:

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


component.

• we can show the relationship between a component and its interfaces in one of two ways.

1. most common style renders the interface in its elided , iconic form.

2. rendering the interface in its expanded form

BINARY REPLACEABILITY:
• You can create a system out of components and then evolve that system by adding new
components and replacing old ones, without rebuilding the system.

• The interfaces are key to making this happen.

1. Component is physical.

2. A component is replaceable.

3. A component is a “part of a system”. A component rarely stands alone like IC chip.

KINDS OF COMPONENTS :

3- kinds of components:

1. Deployment components: components necessary and sufficient to form an executable system, such
as dynamic libraries(DLL) and executables(EXE).

2. Work product components: These components are essentially the residue of the development
process, consisting of things such as source code files and data files

3. Execution Components: These are created as a consequence of an executing system such as a COM+
object, which is instantiated from DLL.

ORGANIZING COMPONENTS:

• We can organize them into packages

* dependency

• generalization

• Association

• aggregation

• realization relationships

Standard Elements:

• All UML extensibility mechanisms(stereo types, tagged values, constraints) apply to components.

• The UML defines five standard stereotypes that apply to components:


1. Executable : Specifies the component that may be executed on a node.

2. Library: Specifies a static or dynamic object library.

3. Table: Specifies a component that represents a database table.

4. File: Specifies a component that represents a document containing source code or data.

5. Document: Specifies a component that represents a document.

You might also like