The Artima Developer Community
Sponsored Link

Object versus Document, Part III
by Bill Venners
First Published in JavaWorld, November 2000

<<  Page 4 of 8  >>

Advertisement

Advantages of an Object-Based User Experience

Now I'd like to mention a few advantages objects enjoy over documents from the perspective of users.

Advantage 1: UI/functionality Separation Facilitates Automation

One advantage of XML over HTML is that XML offers a clean separation of data from instructions on data presentation. In HTML, data intermingles with instructions for presenting the data to humans. An XML document, by contrast, is composed of just data, marked up by tags that have semantic meaning. Software can parse and use the data in an XML document with no human intervention needed. Yet by using separate stylesheets, software can also present the data embedded in the XML document to humans. Whereas HTML in general requires a human user, the information in an XML document can be interpreted by software, by humans, or by both.

Just as XML separates data from presentation, the Jini service UI architecture separates functionality from presentation. A Jini service object represents the functionality offered by a service through its interface. Software can link to and use the functionality offered by a service object, with no human intervention needed. Yet, using a separate UI object, software can also present the functionality offered by the service object to humans. Thus, Jini and the service UI architecture enable the functionality of a Jini service to be accessed by software or humans.

One advantage of Jini service objects over HTML (though not XML) documents, therefore, is that users can direct software agents to interact autonomously on their behalf with the same services that the users at times use directly. If your plane is delayed, for example, an agent could contact the hotel and car rental agency at your destination and make sure your reservations aren't cancelled. The agent could do this via the same services you used via service UI objects to make the reservations in the first place.

Advantage 2: UI/Functionality Separation Facilitates Evolution

Another benefit of service UI's separation of UI and functionality is that it frees the user interface to evolve independently of functionality. Both user interfaces and application programmer interfaces (APIs) evolve over time, but user interfaces tend to change more quickly. Consider how often you visit a Website and notice that its appearance, organization, means of navigation -- its user interface, in other words -- have been tweaked or undergone a complete overhaul. Designing a good user interface is difficult, and usually demands iterative design and deployment, with solicitation of user feedback and continuous efforts at improvement. When UI code is intermingled with functionality code, the functionality code can become convoluted and buggy as a result of the constant hacking on the nearby UI code. When the UI code and functionality code are kept separate, as in the service UI architecture, the user interface can be heavily hacked -- or even thrown away and completely replaced -- without disturbing the functionality code.

Advantage 3: Multiple UIs extend service reach

One major advantage of objects over documents is that the service UI architecture enables multiple UIs to be associated with the same service, which lets objects reach users through more kinds of clients than documents. Webpages work well in desktop computers, where the user is sitting upright, a foot or so in front of a reasonably large color monitor, with keyboard and mouse in hand. Webpages are rather difficult to use, however, from a horizontal position on a couch, a remote control in hand and a television screen 10 feet away. Webpages are also difficult to use on a PDA with a small touch screen and stylus, on a mobile phone with a small screen and keypad, or over the phone via a speech and touchtone interface. In short, Webpages are primarily suited to the kind of client hardware configuration commonly available at desktop computers.

Service UIs, by contrast, can be geared towards different client configurations. The same service could contain a:

Each client on which a service lands selects the most appropriate UI for its capabilities and user preferences. Therefore, users could access the same Jini services from many different kinds of devices.

<<  Page 4 of 8  >>


Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2017 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us