The idea behind component technology is to break these large, monolithic programs into their intrinsic components and then glue them back together in vario
us ways to make applications. The components are easier to build and more robust than the same routines in a monolithic application, simply because the same component is used and tested in multiple applications. There is then no need to reinvent the functionality or the test regime. Above all, software developers can build new programs more quickly and efficiently by reusing their own or third-party components. This is the promise of component technology in general and of OpenDoc in particular.
Enter OpenDoc
OpenDoc is a new component technology that is currently available for the Macintosh and soon to be available for Windows, OS/2, and various flavors of Unix (beginning with IBM's AIX). OpenDoc offers several layers of glue for holding various components together. At its most fundamental level, OpenDoc provides a standardized, low-level framework that allows components to exchange data and messages. At a higher level, OpenDoc provides an arbitrator through which components reques
t access to the screen.
But calling OpenDoc a framework is misleading; it's really an extension of the native OS. Although current implementations sit on top of the native OS, both Apple and IBM have committed to incorporating OpenDoc as a generic part of their OSes and modifying their OSes to take advantage of the plug-in component technology at every level. OpenDoc begins to blur the boundary between the OS and the application.
The User Experience
From a user's point of view, installing OpenDoc doesn't greatly change the manner in which you use your Mac. The only change that you see on the Desktop is the addition of an OpenDoc icon and a folder full of parts.
OpenDoc's name is unfortunate. Building your own documents from scratch is tedious. The real power of OpenDoc arrives as companies start supporting the plug-in technology in existing applications.
Consider what an industry standard for plug-in modules will mean. Need a special effect for Photoshop? It wi
ll also work correctly in QuarkXPress and PageMaker. Want to add a spreadsheet to that page layout? The same part will work in your word processor.
The end result is twofold. First, you can use your tools when and where you want. The application presents fewer restrictions on the operations you can perform. Second, you save both time and money. Once you learn how a part works, you can use it within different applications. In addition, you can buy a single part (e.g., a spreadsheet) and know it will work in all your OpenDoc applications.
All this is based on the premise that developers will flock to the OpenDoc standard, revise their old applications, and produce new ones that support component parts. Will this happen? Probably -- at least on the Macintosh and OS/2 platforms. Apple, in particular, has always attempted to make developers adopt the latest technologies that enhance the OS's overall integration. The result is an operating environment with a consistent look and feel.
The S
DK in Practice
With all the potential advantages, how well do Apple's tools carry the OpenDoc flag? To get some perspective, we used the OpenDoc Software Development Kit (SDK) to build a bridge that let us incorpo-rate existing Metrowerks PowerPlant code into a simulation project. (We did this for the SimCalc Project, aimed at developing interactive simulation software for education.) The SDK comes with PartMaker, a utility that produces a ready-to-compile OpenDoc part, with all source code and stubs for part-specific behavior. We could build a working part in minutes and customize it to our needs in a few days. We next
built a pair of components
to test the feasibility of high-speed interpart communications between a simulation and various meters, graphs, and control panels.
Overall, we're impressed. Both projects were successful, and we built the bridge and simulation parts in less than a month. Also, the QuickView on-line reference for OpenDoc is excellent. W
e're particularly impressed with IBM's System Object Model (SOM) technology: It seems exactly right for building simulation objects that interact with other developers' components. Right now, working with SOM is a bit slow because we need to precompile C++ bindings, but a direct-to-SOM compiler would fix that.
From a practical standpoint, OpenDoc introduces a lot of new terms and concepts, but it's a real architecture with well-conceived mechanisms for interpart communications, drag and drop, and scripting. Based on our experiences, we think OpenDoc has a promising future in education.
The Developer Experience
Remember all those rules Apple has been hounding us with for years? (Factor your applications! Support AppleScript! Implement the Object Reference Model!) It's now payback time. If you've been adopting these new standards, you'll find moving to OpenDoc fairly straightforward.
Think seriously about how to break your product into basic units of functionality. What
components should you be reusing over and over again? Make them into separate OpenDoc Parts, and you're well on the way to your first OpenDoc program.
Scripting also plays a big role. OpenDoc supports the Open Scripting Architecture (OSA), the basis upon which AppleScript is built. All OpenDoc Parts are scriptable, and you can automatically record and play back your scripts, much like you can with a standard Macintosh application.
From here on, things become simpler. Language vendors, from Metrowerks and Symantec to QKS Smalltalk and Novell AppWare, are readying their OpenDoc-ready development environments. At present, all the Macintosh language vendors have stated their support for OpenDoc.
OpenDoc Timetable
Current OpenDoc announcements have centered around the availability of the final SDK for Macintosh. Although Apple expects some companies to ship applications in spring 1996, the first major wave probably won't arrive until late summer. By then, the OS/2 version
will be shipping, and the Windows 95/NT version will be just a few months away.
Most users probably won't install OpenDoc on their systems until they purchase software that supports it. Since OpenDoc is free, software publishers will be distributing it with their new products. If you can't wait until then, you can download a copy from Apple's World Wide Web site at
http://www.opendoc.apple.com
.