When object-oriented development tool vendors adapt their products to the World Wide Web, their object models butt heads with HTML. How can objects make the lowest common denominator of the Web world more accessible to application developers? NeXT and Illustra provide some answers. (1,700 words)
Over the past few months, we looked at tools for developing World Wide Web-style applications that incorporate data from relational databases. Most of them stick pretty close to traditional Web architecture components by doing some variation of the following:
Tools like these have two important benefits. First, they make it relatively easy for you to give your Web site users access to data that you may already have on relational database servers. Second, and more generally, they give you a way of going beyond the highly static, rigid nature of HTML pages, allowing you to offer a Web site with content changing literally from minute to minute.
But the more you look into the area of tools for Web application development, the more you realize the tool vendors have a long way to go. Web applications are, at best, poor cousins of client/server apps that run on LANs. Web application developers have to contend with several constraints, compared to their LAN client/server brethren; by far the most severe of these is the lack of power available in the HTML user interface. Java is poised to change all that, but HTML will be on its own for quite a while.
This is an opportunity for tool vendors. There is a need for tools that look at the overall picture of application architecture and that take HTML clients into account. Bluestone's Sapphire/Web, which we saw last month, is a tool that shows potential in this respect. This month, we'll look at two other tools that address this problem through the rich means of object modeling: the WebObjects family of tools from NeXT and Web DataBlade from Illustra (now part of Informix).
WebObjects is NeXT's attempt to get mileage out of its well-traveled NeXTStep object model by interfacing it to the Web's HTML page scheme. At its heart, WebObjects is a set of object class definitions that encapsulate elements of HTML pages and HTML page behavior. A WebObjects application consists of three parts. First is the HTML template. In the manner of Web/database gateway tools that we've seen in previous columns, like Web/Genera and Sybase's web.sql, the template allows a developer to embed in an HTML page some executable code that runs and returns actual HTML on the fly -- just before the server's CGI script sends the resulting HTML page back to the user. In the case of web.sql, the embedded code can be either a Sybase SQL query or some perl code.
In WebObjects' case, the embedded code defines an object -- a WebObject -- delimited by the HTML tags <WEBOBJECT> and </WEBOBJECT>. WebObjects can be nested, i.e., <WEBOBJECT> definitions can appear inside other ones. This allows arbitrarily complex objects to be created, as any good object model should. Each WebObject can be a data field, or it can be an executable form that runs some code when the user clicks on the form's button.
Each WebObject corresponds with an object in the underlying NeXTStep environment. The second part of WebObjects, the declarations file (NeXT calling something a "file?" Shame on them!), sets up this correspondence by associating the name of each <WEBOBJECT> with that of a NeXTStep object. The final piece is the script file, which contains the Objective-C code used to implement the "back end" of WebObject forms. See NeXT's simple "Hello, World" program for an example.
Illustra's Web DataBlade
Illustra's Web DataBlade is very much analogous to NeXT's WebObjects. Essentially, it does for Illustra's DataBlades toolset what WebObjects does for NeXT's object model.
While NeXT is virtually a household word among programmers, Illustra may not be. Illustra is a so-called object-relational database system that was invented by Michael Stonebraker, the Berkeley professor who created INGRES, the first relational database for Unix systems. He became a contentious figure in the 1980s by insisting on the validity of relational technology while the majority of the database research community was embracing object-oriented data modeling.
Stonebraker's mid-80s research produced POSTGRES, a database model designed to show that you could get the benefits of object-orientation by extending -- not replacing -- the relational model. POSTGRES extended the relational model in a few key ways. Most importantly, whereas the relational model allows tuple (row) elements that contain only simple data types, like numbers and character strings, POSTGRES allows them to contain, in effect, pointers to other tuples. This lets you create complex data objects that contain other objects, just as you can in object-oriented programming models such as NeXT's Objective-C language and Java.
Stonebraker wanted to make POSTGRES into a commercial product; the company he formed to do this was originally called Montage. Montage soon changed its name to Illustra, under threat of lawsuit from another software company with an existing product called Montage, and changed its approach to emphasize DataBlades (as we'll see) in addition to the database server itself.
Recently, Informix acquired Illustra and is integrating it with its existing relational database product line. Illustra has thus become the first serious attempt by a major relational database vendor to evolve its product line into the object-oriented database market. Its object-oriented functionality eclipses undelivered promises of object engines from Oracle and Sybase. The key issue will be Informix' success at integrating Illustra's offerings into the larger product line -- an effort called Informix Universal Server -- but that's another story for another column...(stayed tuned).
Illustra's most important innovation for our purposes this month is its line of so-called DataBlades, which are object-oriented "packages" of code. DataBlades are object class libraries that encapsulate specialized data types, such as image, audio, geometric data, full-text indexing, and so on. They are similar to Modula modules, Ada packages, and C++ class libraries such as those from Rogue Wave and other vendors.
DataBlades give Illustra an immediate advantage in the multimedia world for creating databases of content. You can use them to model multimedia objects with rich semantics: With the Text DataBlade, for example, you can issue queries that do sophisticated text searching on a database of articles; or with the Image DataBlade, you have built in code for operations such as compression and format conversion, and you can even search for images with certain characteristics. You can't do this using relational databases without a lot of extra, messy ad-hoc programming.
The Web DataBlade extends Illustra's multimedia object smarts into the world of HTML. Like other database gateways we've seen over the last few months, the Web DataBlade uses HTML templates for building Web pages from database query results. But where other tools are capable of displaying plain text and tabular data only, the Web DataBlade understands what to do with things like images, audio, and video data (e.g., store an image in a temporary file, then insert an <IMG ...> HTML tag that points to that file).
That's the beauty of the object-oriented model: while the type (class) definition for an image object might already have a "display me" function that works for screen or printer display, the Web DataBlade can add a display function for HTML pages without disturbing any other code that uses the Image DataBlade.
NeXT's WebObjects has similar functionality, but it's meant to be used with in-memory objects (not stored in a database) within NeXTStep or OpenStep environments. NeXT does offer integration with relational database servers through a product called Enterprise Object Framework (EOF).
WebObjects Enterprise is an enhanced offering that combines EOF with WebObjects. But EOF's ability to handle complex data types is limited to the simple types supported by the underlying databases (Sybase, Oracle, and Informix).
Both products provide an object-oriented programming interface to HTML. Essentially, they create a software developer's view -- as opposed to a content creator's view -- of HTML. In other words, they treat HTML as an "implementation detail" in somewhat the same way as C or C++ programmers treat device drivers as such (or as content creators view an output language such as Postscript). It's necessary to expend effort on HTML because it will be around as a basic Web technology for quite some time -- in particular, as long as Windows 3.x remains widely installed and until Java matures -- and HTML is horrendous by itself as an application development tool.
For developers who work with multimedia content, Illustra's Web DataBlade offers much. Illustra slowly creates its niche as the large-scale multimedia repository of choice. The Web DataBlade effectively brings such a repository close to the Web by letting programmers insert data objects directly onto Web pages, without any extra format translation steps. The result is enhanced opportunities for developing robust, scalable, media-rich Web sites with a single, top-to-bottom data model.
Both use proprietary object models. This is potentially problematic, because Java is clearly emerging as the defacto object model for the Web. Interfaces to relational data are already appearing in the Java world, and it's only a matter of time before someone develops some kind of persistent language support for Java -- that is, some sort of database capability with a Java data model. Unless someone develops seamless interfaces between Java and the object models of NeXT and Illustra, these tools won't really play. Truly smooth integration among non-trivial object models has proved difficult. That's why the software engineer's dream circa 1980 of a brisk market in object classes for "plug-and-play" software development didn't come true, and it's why it has been very hard, for example, to make Microsoft's COM/OLE object model compatible with the Object Management Group's CORBA standard.
Ultimately, NeXT's WebObjects and Illustra's Web DataBlade will prove useful for those who have already made commitments to those vendors' existing infrastructural products. If Java really does drive the development of the Web's object model from the top (Web pages) down to the bottom (data infrastructure), then it will become the defacto standard. But since that will take a while to evolve, these two products are well worth a look.
Bill Rosenblatt is an Enterprise IT Architect at Sun Microsystems, where he specializes in media technology. Reach him at firstname.lastname@example.org.
Bill Rosenblatt is the author of Learning the Korn Shell and a coauthor of Learning Gnu Emacs and Learning the Bash Shell. You can buy these at Amazon.com Books. Select the hyperlinks to learn more about each and Amazon.com.
If you have problems with this magazine, contact
Last updated: 1 May 1996