Unit 4: Architectural Modeling-1 Components
Unit 4: Architectural Modeling-1 Components
Unit 4: Architectural Modeling-1 Components
Components
A component is a physical and replaceable part of a system that conforms to and provides the
realization of a set of interfaces. Graphically, a component is rendered as a rectangle with tabs.
Names:
Every component must have a name that distinguishes it from other components. A name is a textual string. That
name alone is known as a simple name; a path name is the component name prefixed by the name of the package in
which that component lives. A component is typically drawn showing only its name.
An interface that a component realizes is called an export interface, meaning an interface that the
component provides as a service to other components. A component may provide many export interfaces. The
interface that a component uses is called an import interface, meaning an interface that the component conforms to
and so builds on. A component may conform to many import interfaces. Also, a component may both import and
export interfaces.
Binary Replaceability:
The basic intent of every component-based operating system facility is to permit the assembly of systems
from binary replaceable parts. This means that 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. Interfaces are the key to
making this happen. When you specify an interface, you can drop into the executable system any component that
conforms to or provides that interface.
First, a component is physical. It lives in the world of bits, not concepts.
Second, a component is replaceable. A component is substitutable• it is possible to replace a component
with another that conforms to the same interfaces.
Third, a component is part of a system. A component rarely stands alone. Rather, a given component
collaborates with other components and in so doing exists in the architectural or technology context in which it is
intended to be used.
Fourth, a component conforms to and provides the realization of a set of interfaces.
Kinds of Components:
Three kinds of components may be distinguished.
First, there are deployment components. These are the components necessary and sufficient to form an
executable system, such as dynamic libraries (DLLs) and executables (EXEs).
Second, there are work product components. These components are essentially the residue of the
development process, consisting of things such as source code files and data files from which deployment
components are created.
Third are execution components. These components are created as a consequence of an executing system,
such as a COM+ object, which is instantiated from a DLL.
Organizing Components:
You can organize components by grouping them in packages in the same manner in which you organize
classes. You can also organize components by specifying dependency, generalization, association (including
aggregation), and realization relationships among them.
Standard Elements:
The UML defines five standard stereotypes that apply to components:
1. executable: Specifies a 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.
A node is a physical element that exists at run time and represents a computational resource, generally
having at least some memory and, often, processing capability. Graphically, a node is rendered as a cube.
Names:
Every node must have a name that distinguishes it from other nodes. A name is a textual string. That name alone
is known as a simple name; a path name is the node name prefixed by the name of the package in which that node
lives. A node is typically drawn showing only its name.
Organizing Nodes:
You can organize nodes by grouping them in packages in the same manner in which you can organize
classes and components. You can also organize nodes by specifying dependency, generalization, and association
(including aggregation) relationships among them.
Connections:
The most common kind of relationship you'll use among nodes is an association. In this context, an
association represents a physical connection among nodes, such as an Ethernet connection, a serial line, or a shared
bus.
Common Modeling Techniques:
Modeling Processors and Devices:
To model processors and devices:
1. Identify the computational elements of your system's deployment view and model each as a node.
2. If these elements represent generic processors and devices, then stereotype them as such. If they are kinds of
processors and devices that are part of the vocabulary of your domain, then specify an appropriate stereotype with an
icon for each.
3. As with class modeling, consider the attributes and operations that might apply to each node.
Common Properties:
A component diagram is just a special kind of diagram and shares the same common properties as do all
other diagrams• a name and graphical contents that are a projection into a model. What distinguishes a component
diagram from all other kinds of diagrams is its particular content.
Contents:
Component diagrams commonly contain
1. Components
2. Interfaces
3. Dependency, generalization, association, and realization relationships
Like all other diagrams, component diagrams may contain notes and constraints. Component diagrams may also
contain packages or subsystems, both of which are used to group elements of your model into larger chunks.
A deployment diagram is a diagram that shows the configuration of run time processing nodes and the
components that live on them. Graphically, a deployment diagram is a collection of vertices and arcs.
Common Properties:
A deployment diagram is just a special kind of diagram and shares the same common properties as all other
diagrams• a name and graphical contents that are a projection into a model. What distinguishes a deployment
diagram from all other kinds of diagrams is its particular content.
Contents:
Deployment diagrams commonly contain
1. Nodes
2. Dependency and association relationships
Like all other diagrams, deployment diagrams may contain notes and constraints. Deployment diagrams may also
contain components, each of which must live on some node. Deployment diagrams may also contain packages or
subsystems, both of which are used to group elements of your model into larger chunks. Sometimes, you'll want to
place instances in your deployment diagrams, as well, especially when you want to visualize one instance of a
family of hardware topologies.