A component is a cohesive, opaque, replaceable, functional module of a larger system.
The larger system can be a hardware, software, or business system, thus a component can be a hardware component, such as a device, microchip, or circuit; a software component such as a user interface, database, or message passing subsystem; or a component can be a business unit such as payroll, provider, or shipping. (See the Wikipedia article on Systems Theory for a good overview of the full scope of the system/component concept.)
A component's functionality is specified by a set of provided interfaces (lollipops).
A component provides its services to other components. In turn, a component may require the services of other components. These requirements are specified by a set of required interfaces (sockets).
A process component provides some sort of functionality to other components.
A process component is usually transaction based.
A process component is usually stateful. A service component is a like a process component except that it is stateless.
A component can have subcomponents. We call these subsystem components.
University/College
Admissions
Registration
Records
Human Resources
Accounting
Grants
Faculty
Retail Company
Sales
Marketing
Accounting
Shipping
Supply
Payroll
Factory
Parts
Maintenance
Assembly
Shipping
Warehousing
Hospital
Billing
Pharmacy
Admissions
Nursing
Radiology
Surgery
Emergency Room
Wards
Open Distributed Processing (ODP) is an ISO reference architecture that describes an abstract network of distributed components. Any component implementing basic interfaces for discovery can join the network. CORBA is the most famous implementation of this architecture.
Agent-Based Architecture is a FIPA reference architecture that takes ODP one step further by viewing components as intelligent, goal-driven, active agents.
The WSA (Web Services Architecture)
Web App
Web Service
WSDL
UDDI
Discovery
Eclipse Plugin Platform
Servlet Containers
A black box view shows components and their dependencies without showing any internal details of the components.
Here is a coarse black box view of an e-commerce system. Note that the FedEx component is shown as a component instance, while EStore and EBank are component types:
In this version we show required and provided interfaces of the components. UML 2.0 shows components as stereotyped classifiers:
Of course if the interface provided by the EBank component was different, say "transfer funds", then we could use an adapter component to convert this interface to the required interface:
A component can be implemented by other components. This is the case for abstract components and subsystems.
A simple component is realized by a collaboration.
A collaboration is a group of classes or objects that work together to provide the functionality of a component.
We can implement a component as a collection of classes (package or outer class) with a facade.
The white-box view of a component shows the component and the collaboration that realizes it.
Ports can be used to show the connection between related interfaces (provided and required) to the internal classes that implement the interface.
interface Communication {
void send(Message m, Correspondent
recipient);
Message receive(int id);
}
interface Registration {
void register(Correspondent c);
void unregister(Correspondent c);
int findID(Correspondent);
}
class MessageBroker implements Communication, Registration {
class PostOffice { ... }
class Mailbox { ... }
// etc.
}
The physical (electronic or material) manifestation of a component is an artifact. Artifacts are deployed on execution environment nodes.
An artifact is often a file:
.exe, .class, .jsp, .jar, .war, .zip, .java, .doc, .db
A node is a hardware or software platform.
Examples of software platforms (called execution environment nodes) include:
J2EE, J2SE, J2ME
.NET
Windows XP, Windows ME
Linux
Oracle, MySQL
Eclipse
Hardware platforms host software platforms.
Examples of hardware platforms (called device nodes) include:
computers (PCs, mainframes, clients, servers)
PDAs
DMA controllers
Nodes can communicate with other nodes over communication links using a specified protocol such as
<<HTTP>>, <<FTP>>, <<TCP/IP>>, <<UDP/IP>>, <<JDBC>>, <<SOAP>>, etc.
component: database
is realized by a collaboration of: entities, tables, queries
and is manifested by artifact: a file
which is deployed on an EE node: dbase server
which is hosted on a device node: mainframe, desktop, PDA, ...
component: web service/application
is realized by a collaboration of: servletts, JSP, ASP
and is manifested by artifact: .war file
which is deployed on an EE node: J2EE, .net web server
which is hosted on a device node: mainframe, desktop, PDA, ...
component: Eclipse plugin
is realized by a collaboration of: any classes
and is manifested by artifact: a .plugin file
which is deployed on an EE node: Eclipse platform
which is hosted on a device node: mainframe, desktop, PDA, ...
component: program
is realized by a collaboration of: various classes
and is manifested by artifact: a .exe file
which is deployed on an EE node: Operating system
which is hosted on a device node: mainframe, desktop, PDA, ...
component: program
is realized by a collaboration of: various classes
and is manifested by artifact: a .java file
which is deployed on an EE node: Language processor, javac/java
which is hosted on a device node: mainframe, desktop, PDA, ...
component: agent
is realized by a collaboration of: behaviors/roles, ontos
and is manifested by artifact: a .class file
which is deployed on an EE node: FIPA platform
which is hosted on a device node: mainframe, desktop, PDA, ...
VP shows components rather than artifacts being deployed on nodes: