This article is the first in a series on OpenDoc for OS/2
A Technology Frontier
by Rollin White
Hopefully you're seeing OpenDoc mentioned in the press and on the net more and more. As with any buzz word, I encourage you to ask yourself, just what is OpenDoc and why do I care? The ultra-short, but not quite accurate, description is that OpenDoc is OLE for OS/2.
Actually, OpenDoc is much, much more than OLE. OpenDoc is a technology to allow for embedded documents (frequently referred to as parts). It also facilitates open technologies for extensions, storage, and scripting. As with most important technologies, OpenDoc is also a vision about how software should ideally work.
Why Embed Documents?
The notion of embedding documents within each other is not new, but you may not be familiar with all of the motivations. When you buy a software product today, there is frequently overlap between it and something else you already own. For example, you may want to place a graphic in your word processor document. One way to perform that function is for the word processor to support various graphics formats so you can import the image.
Another method would be to have some sort of integration between vendor A's word processor and their graphics program. You can see that for yourself with the IBM works applications included in the Bonus Pak. The more natural scenario is being able to " lace" the graphics program inside of your word processor document. This was first accomplished in a mass market environment by Microsoft's OLE (hence the comparisons to OpenDoc).
The idea is that you not be limited to vendor A's graphics program working with vendor A's word processor. Instead, you should be able to mix and match applications between all vendors. This is good. So why not just implement OLE on OS/2?
There are several problems with OLE. If you haven't guessed by now, OLE is not the most open, flexible, or robust environment (it is a Microsoft product after all). It's not portable and it really only describes how applications should talk to each other in a minimal fashion. In the embedded document world, there is so much more.
Enter the initial mandate for and sponsors of OpenDoc. IBM, Apple, and Word Perfect formed an organization known as CILabs to facilitate OpenDoc. The new technology was expected to meet several design goals. Chief among them were an open environment, scripting capability, portability, open storage mechanisms, object oriented interfaces and development, and a consistent, rich user interface. These goals are quite lofty!
But, enough of the history lesson, let's examine more closely what OpenDoc can do for you.
Here are 4 examples of the currently available OpenDoc parts. Can you identify them? The tickertape, push button, and text parts are contained in the Page Layout part.
Putting a Graphic in Your Document
Returning to our example, with OpenDoc not only can I easily embed a graphic into my word processor document, I can also edit the graphic directly while it's there. Let's expand our example a little. Let's say I have a table of numbers that I'd like to include in my document as well as a chart relating to those numbers.
Just like the graphic, I can also embed a spreadsheet and chart application into my word processor. I can enter the numbers into my spreadsheet. I can then connect the chart application to my spreadsheet application. But what if I need to change some of the numbers? You might think that you would restart the spreadsheet application, change the numbers, restart the chart application, then regenerate the graph. Not so with OpenDoc.
The spreadsheet and chart are not static documents embedded within another document. They are actually live, participating parts of the word processor document. With OpenDoc, you simply select the spreadsheet and change your numbers. The rest happens automatically!
Once we've finished our document it is time to pass it on to our boss for his review. We built the spreadsheet portion of the document with our favorite program SpreadSheet Pro. But the boss can't cope. He uses SpreadSheet Jr, an inferior competitor's product. However, if both products fully support OpenDoc, the boss will be able to use his SpreadSheet Jr. without even knowing we built it with another application.
Parts vs Apps
If you've heard of OpenDoc before reading this article, you've undoubtedly heard about it in the context of parts. When you hear about parts, it's the vision side of the OpenDoc story coming out. The idea is that today we have monolithic applications. When a word processor's hard disk consumption is measured in tens of megabytes, you should know something is wrong. Because OpenDoc allows you - the user - to mix and match applications to accomplish a task, there is motivation to write smaller, more modular, and more focused applications. These are commonly referred to as parts because by themselves, they are not a complete application (by today's standards).
Let's look at an interesting twist to our word processor/spreadsheet scenario. Let's just say I want to write a spreadsheet product. Today's standards for spreadsheets require that cells have all sorts of formatting capability. I'm a spreadsheet person, I have no idea how to deal with fonts, font styles, and font sizes - let alone some of the nicer features such as spell checking. If my product is built around OpenDoc, I can simply use someone else's text part to do the stuff I don't want to have to fi gure out. Instantly, I'm freed from hundreds if not thousands of man hours of development time. But it get's better!
If I'm a small developer, I'm probably going to include a cheap text part in my spreadsheet - that may be all I can afford. But if you have a favorite text part that you've already paid for - say Text Magic - you could use that text part with my spreadsheet. So if my low end part doesn't include spell checking, but Text Magic can spell check in 37 different languages, my spreadsheet can now spell check its cells in 37 different languages thanks to Text Magic.
If you're following along, you should be extremely excited by now. If you're not, it either means I lost you or you are extremely cynical - both are OK. If you're lost, don't worry, this definitely falls into the vision category.
With this increased flexibility and modularity, the next logical step is a revolution in the way software is used and sold. If I don't have to spend as much time building text functions into my spreadsheet, I can redirect that time into focusing my spreadsheet even more (so someone else will ship it with their Text Magic product!). Also, I can afford to price the software much lower because the part itself is simpler and cheaper to build.
Now and tomorrow
All of this sounds great right? Where can you get your hands on this modern
miracle called OpenDoc? While OpenDoc has been in development for several
years, it has only recently been released. The OS/2 version of OpenDoc can be
obtained on the Web at:
Before you rush off to download this stuff, let me give you the bad news. Because OpenDoc is relatively young, there are very few OpenDoc enabled applications. Lots of vendors (including Vendor A and C, but not Vendor B) have made statements indicating that they will be developing for OpenDoc. So, in reality, you will not now be able to accomplish most of what I have described in this article. But if you're curious, it's still worth downloading and installing.
Hopefully, this overview has done two things. At the least, it should have given you a clearer picture about what OpenDoc is. Hopefully, you are also thinking about some of the implications of parts, modularity, and open standards. I would love to discuss these issues further, on the BBS, via e-mail, or at the user group meetings.
For a complete analysis of the OpenDoc vs. OLE discussion, you'll want to