Sponsored Link •
In this article, Bill Venners compares objects and documents from a user's perspective. Whereas the previous articles in the series focused on clients that operate autonomously, this article focuses on clients that connect network-delivered services to human users.
In the Object Design Workshop, an object-oriented design seminar that I teach, I always begin by claiming that "objects are for people, not for computers." Objects don't help computers run software; rather, objects help people develop software. Computers are just as happy running assembly language programs as object-oriented programs. The aim of software technology evolution, from machine language to assembly language to procedural languages to object-oriented languages, has always been to help programmers deal with complexity and change. In short, objects are tools that help programmers do their jobs.
In this article, however, I'd like to consider another possible use for objects besides being tools for programmers. What if objects were the fundamental abstraction with which people (everyday users, not just programmers) interacted with software?
A new computer is on the horizon, a meta-computer made up of everything connected to everything. This coming change in the hardware status quo provides an opportunity to rethink the basic user-interface metaphors by which people use software. Two fundamental metaphors currently dominate most people's software experience: the desktop metaphor and the hypertext Web.
The personality of a desktop computer is its hard disk. The desktop metaphor primarily helps users manage files on disks; some of those files are applications, other files are documents, and all files are represented by icons. If you double click on an application's icon, the application launches. If you double click on a document icon, an application is launched that opens that document.
Each document on the desktop is associated with an application. The application, which is the behavior that knows how to use the document's data, can be thought of as the document's type. The document type is usually indicated in some manner external to the document file contents. On Windows, for example, the document type is indicated by the filename's three-character extension. The filename (and its extension) is known to the filesystem, but is not generally an intrinsic part of the file itself.
The World Wide Web popularized hypertext, a user-interface metaphor distinctly different from the desktop. Yet on the hypertext Web, the fundamental unit is still the file. Rather than helping users manage files on nearby disks, however, the Web helps people use files delivered by servers on the Internet. Most files, but not all, show up as HTML Webpages. As on the desktop, each file on the Web has a type, which is external to the contents of the file itself. When an HTTP server sends a file, it includes a MIME type header that indicates the file type. The browser uses the file type to decide how to present the file to the user.
The browser understands certain MIME types, such as text and HTML. For such types, the browser itself is the behavior that knows how to use the file's data. If the browser receives a file with a MIME type it doesn't understand, it looks around for a plug-in that does understand that type. If it finds a suitable plug-in, it passes the file to the plug-in, which then decides what to do. In this case, the plug-in is the behavior that understands how to use the file. In either case, the software that represents the behavior for a particular file type must already reside on the client side, either in the browser itself or as a plug-in.