Appeared in Object Magazine, August 1996
Column: Objects & The Web

A Natural Synergy

Dave Carlson
Ontogenics Corp.
dcarlson@ontogenics.com

John was browsing a web site provided by one of his vendors, looking for specifications related to a new product. He was frustrated that the web pages contained lots of apparently useful links to other information, but he kept getting lost and couldn’t find a "map" to guide his navigation. Many object technologists respond to this problem by wanting to "organize this mess" with a rigorous design and database.

Sue, on the other hand, is a capable object-oriented technologist and is designing an on-line order entry system to be implemented in C++. She is wrestling with approaches for integrating multimedia catalog information into her design. The users want nicely formatted text and graphics that they can easily modify and update. Many web technologists would want to scrap C++ saying that they could implement the whole thing in a week with a public domain HTML editor, Perl scripts and a simple database.

These are two examples of many common situations where potential synergy exists between web and object technologies, providing benefits to both end-users and developers. However, synergy doesn’t mean that object-oriented technology should conquer web-oriented systems, or vice versa. Synergy is about balance. Each contributor to a synergistic relationship can gain from the other perspectives, such that the benefit of the final solution is greater than the sum of its parts. My future columns will systematically analyze key contributions from each perspective, web development and object development, and describe how both benefit from the relationship. In this introductory column, I’ll paint a broad landscape of the forthcoming journey.

Modeling and Navigation

From the webmaster’s perspective, a good web site design balances creativity, innovation, intuitive use, and dynamic content. These are very different objectives when compared with traditional system development projects where stability, performance speed, and low maintenance are top priorities. However, both disciplines need to clearly communicate information to the end-user and to develop a plan for how that information will be organized. Both web pages and objects are based on conceptual classes of information and relationships/links between them, and both have the ability to invoke related behavior via scripts or methods. Besides, most information systems can benefit from a bit of creativity, and most web sites could stand performance improvement!

Can we construct a useful model of a conventional web site? To accommodate the creative bias of web designers, object models can be drawn with graphical icons and links, replacing the boxes and lines familiar to object-oriented methodologists. A graphical map of the domain can be created with no less rigor than formal object models. This graphical map can then be rendered as the web site home page, contributing further benefit by communicating the domain model to end-users for easier navigation. For example, see Macromedia’s site map (http://www-1.macromedia.com/Guide/sitemap.html), although this map, like all I’ve seen, is strictly hierarchical and doesn’t reflect any planned relationships between the pages.

After a model has been documented, designers can then make intentional choices about how to implement each class and each relationship. Web page templates can be created for each class to define page layout, analogous to the way C++ class definitions are used for defining new object instances. A hybrid architecture might be used that combines web and object technologies, e.g. active objects written in Java or distributed object architectures based on CORBA. For example, a web page might be partly static and partly dynamic. The text may be stored statically in a file, but the links are dynamically inserted by querying a CORBA relationship service whenever the page is displayed.

We could also use a web browser to navigate through the instances of an object model stored in an object database. Object database vendors are developing tools that generate web interfaces for navigating the relationships inherent in their databases (assuming the objects were placed there by other applications). Object, and object-relational, databases provide a natural fit for storing the text and multimedia intensive web pages. Sophisticated web sites will likely gain considerable advantage from incorporating their models and navigation into these databases. Illustra/Informix has been aggressive at addressing this market need, as demonstrated very effectively by their support for the 24 Hours in Cyberspace event (http://www.cyber24.com/).

Because this is the best starting place for web/object integration, I will devote my next column entirely to synergy that results from modeling and navigation. The solution is not strictly a technical or methodological problem. The Internet and web community has established its own very strong and tightly woven culture, and many webmasters are not trained computer scientists. Some adaptation is necessary before the synergy can be fully realized.

Hybrid Architectures

Do we add objects to the web, or the web to objects? This may not be as trite as it sounds. Depending on where you’re anchored, you are likely biased by one perspective or the other. In fact, both strategies are already being pursued.

Current attempts to add objects to the web take on a variety of forms. The most prevalent example is Java applets that are embedded in HTML formatted web pages and displayed in-line within the web client. (I will generally use the phrase "web client" instead of "web browser," recognizing the fact that programs like Netscape Navigator are becoming universal thin clients having much broader functionality than simply browsing static HTML documents.) From the outside, a Java applet is just a program that executes on the client machine and is not obviously object-oriented. However, the Java language is closer to a pure object-oriented programming language than C++, from which it was derived. A Java applet is a set of separate class definition files downloaded in a platform independent bytecode format. One of those classes inherits from the Applet class, and it is that class that is embedded in the HTML file. The other class files are instantiated during execution of the program, just like any other object-oriented program. However, a significant difference is that these supporting class files are only downloaded as needed. The simple fact remains that these object classes are embedded in a web page, sometimes transparent to the point where users don’t realize they’re seeing an applet.

Once invoked, a Java class can open tcp/ip socket connections with the server from which it was downloaded (for security reasons, embedded Java applets cannot connect to other servers). An applet can thus take on a life of its own, executing a tcp/ip based client/server application independent of the web server process and the HTTP protocol. Building on this capability, Java applets will soon be capable of participating as full-fledged ORB clients in a distributed object architecture. The applet will communicate with the ORB via the Internet Inter-ORB Protocol (IIOP), once again by-passing the web server process. See for example, PostModern Computing’s BlackWidow product (http://www.pomoco.com/) or Sun’s Remote Objects for Java ™ (http://splash.javasoft.com/pages/intro.html).

From the reverse perspective, adding the web to objects, software vendors are scrambling to web-enable their conventional client/server and workgroup systems. NeXT’s WebObjects product builds dynamic web applications, based on their prior enterprise client/server tools. ParcPlace and IBM are adding web-support classes to their Smalltalk tools. HTML parts are being developed for OpenDoc containers. OCX controls are available that allow designers to embed web browsers into proprietary client programs. Microsoft has announced plans to web-enable the entire Microsoft Office suite, and the entire desktop environment. Microsoft has added classes to the MFC framework in Visual C++ that support its proprietary ISAPI interface to its Internet server.

The Java virtual machine will be embedded in many types of client programs and into future versions of operating systems. Java will soon be put directly into silicon, i.e. designed directly into specialized microprocessors. Although embedding Java into other systems is not quite the same as adding web support directly, Java’s affinity for Internet and Web development is tantamount to adding web support.

The respective standards bodies also reflect this web/object duality of perspective. The Object Management Group has its Internet SIG (http://www.dstc.edu.au/AU/research_news/omg-isig/isig.html) and the WWW Consortium, or W3C, has its Object SIG (http://www.w3.org/pub/WWW/OOP/). Fortunately, there are efforts underway to learn from one another (http://www.w3.org/pub/WWW/OOP/9606_Workshop/).

These comments summarize a very high level view of hybrid web/object architectures. I am planning a full length article that addresses these architectures in greater detail, describing a series of design scenarios for using object technology to enable the development of powerful web-based systems.

A Continuum of Solutions

Modeling and hybrid architectures were both presented as having dual perspectives, web-centric and object-centric. Synergy will be realized when we are able to blend the best of each perspective and create solutions at appropriate points along the continuum between the two endpoints. We need a range of methodologies and tools at our disposal to support non-technical, but creative, webmasters, and to support complex software engineering applications.

I believe that the single most important factor contributing to the phenomenal growth of the web is ease of use, for both the developer and user. Open standards and free tools contributed to the ease of use, as did the web’s "fun factor." Let’s not lose sight of this fact as we seek ways to leverage the best of object-oriented and web-oriented development.