Let us look at the definition of software component
given in
A software component is a unit of composition
with contractually specified interfaces and
explicit context dependencies only.
A software component can be deployed independently
and is subject to composition by third parties.
This definition was the result of an ECOOP96 Workshop on Component-oriented Computing. Notice that the definition itself contains a reusability requirement, in mentioning composition by third parties. The requirements of explicit context dependencies, the absence of inherent state and contractually specified interfaces only strengthen this.
In contrast, an object is not a unit of deployment,
but a unit of instantiation.
Objects are not used in isolation.
Objects, do have state and identity.
Deploying an object or a collection of objects, moreover,
is often subject to (implicit) assumptions
concerning the interaction of objects.
Components as better objects
Reconsidering the definitions given,
I tend to think of the distinction between
components and objects as a distinction between
perspectives.
From a deployment perspective we need components.
From a developer's perspective we might prefer to speak
about objects.
Unfortunately, matters are not that easy.
But we need to take a closer look at the technology
to find out why.
The technology matrix
The component technology field is currently dominated
by three players:
Microsoft (D)COM,
OMG CORBA,
and (the youngest player)
Sun Microsystems Java.
When comparing these technologies with respect to attributes
such as
distribution,
mobility,
language and platform independence, and
reflective capabilities,
we see that there are many differences.
First of all, notice that component technology does
not automatically mean distribution.
For example, JavaBeans and Microsoft COM do not support
distribution.
Secondly, whereas language independence seemed to be
of importance in the pre-Java era, that is for (D)COM and CORBA,
it is not so for the Java-based solutions.
Finally, platform independence is hard to achieve.
But, fortunately, it is on the agenda of all three
technologies, including (D)COM.
It is worth mentioning that the three major technologies have a rather different origin. Microsoft (D)COM is primarily a desktop technology, with Office as its killer application, whereas CORBA originated from the need to have an enterprise-wide solution for distributed objects. Java is a special case. It started as a Web-based language, but rapidly took position in the desktop and enterprise world as well.
Java distinguishes itself from the other technologies
both with respect to mobility and reflection.
As a Web-based language, Java allows for downloading
code dynamically, that is class descriptions for instantiating new
objects.
True mobile objects,
that is instantiated objects that migrate themselves,
are only possible when using a system such as Voyager,
or any of the other Java-based agent ORBs.
Java also provides a powerful Reflection API,
which allows for various kinds of meta-programming,
including the creation of new classes.
In comparison, meta-programming facilities of
the two other technologies are limited
to querying the availability and functionality of interfaces,
dynamic method invocation
and some dynamic typing.
Trends -- interoperability
An interesting project in this respect is the
K-Office project,
which aims at developing an Office Application Suite for the
Unix/X11 desktop.
It is built upon the KDE GUI environment,
and employs a CORBA-based component technology,
(nick)named KOM, to interconnect
(embed and link) the various document components
and their associated tools. See http://koffice.kde.com .
if semantical issues can be resolved
development becomes more complex
it affects performance significantly
wrong, it is an evolution from OO and C/S
unknown source
And, as indicated in slide myths,
do not underestimate the complexities
of developing such applications.
Given the failure of many OO projects, as described in
Yet, in conclusion,
just as object orientation may be regarded as
a natural evolution from data-oriented approaches,
we may look at component-oriented approaches
as a natural evolution from object orientation into
the realm of distributed systems.
(C) Æliens
04/09/2009
Component myths
Component software engineering may be characterized
as an approach that relies on the availability of
reusable `off-the-shelf' components that may be composed
into applications.
This includes applications for banking,
medical services,
corporate management,
entertainment,
etcetera.
Components: myths and reality
Software engineering perspectives
In addition, we need to deal with the practical aspects
of developing component-oriented applications,
that is master the distributed (object) technology involved,
and manage multi-tier architectures.