260
Chapter 13 Objects and the Internet
fact that a system can theoretically invoke objects anywhere on the network.This is a
powerful capability, and is the backbone for much of today’s Internet-based business.An-
other major advantage is that various pieces of a system can be distributed across multiple
machines across a network.
The idea of accessing and invoking objects across a network is a powerful technique.
However, there is one obvious fly in the ointment—the reoccurring problem of portabil-
ity.Although we can, of course, create a proprietary distributed network, the fact that it is
proprietary leads to obvious limitations.The other problem is that of programming lan-
guage. Suppose a system written in Java would like to invoke an object written in C++.
In the best of all worlds, we would like to create a non-proprietary, language-independent
framework for objects in a distributed environment.This is where CORBA comes in.
OMG
An organization you should become very familiar with is the Object Management Group
(OMG). OMG is the keeper of the keys for many standard technologies, including CORBA and
UML, among others. Find out more at http://www.omg.org.
The main premise of CORBA (Common Object Request Broker Architecture) is this:
Using a standard protocol, CORBA allows programs from different vendors to communi-
cate with each other.This interoperability covers hardware and software.Thus, vendors can
write applications on various hardware platforms and operating systems using a wide vari-
ety of programming languages, operating over different vendor networks.
CORBA, and similar technologies like DCOM, can be considered the middleware for
a variety of computer software applications.Whereas CORBA represents only one type of
middleware (later we will see some other implementations, like Java’s RMI), the concepts
behind middleware are consistent, regardless of the approach taken. Basically, middleware
provides services that allow application processes to interact with each other over a net-
work.These systems are often referred to as multi-tiered systems. For example, a 3-tiered sys-
tem is presented in Figure 13.8. In this case, the presentation layer is separated from the
data layer by the allocation layer in the middle.These processes can be running on one or
more machines.This is where the term distributed comes into play.The processes (or as far
as this book is concerned, the objects) are distributed across a network.This network can
be proprietary, or it might be the Internet.
This is where objects fit into the picture.The OMG states:“CORBA applications are
composed of objects.” So, as you can tell, objects are a major part of the world of distrib-
uted computing.The OMG goes on to say that these objects “are individual units of run-
ning software that combine functionality and data, and that frequently (but not always)
represent something in the real world.”
One of the most obvious examples of such a system is that of a shopping cart.We can
relate this shopping cart example to our earlier discussions on the instantiation of objects.
When you visit an e-commerce site to purchase merchandise, you are assigned your own
individual shopping cart.Thus, each customer has her own shopping cart. In this case, each
customer will have an object, which includes all the attributes and behaviors of a shopping
cart object.