Archives
 
 
 
  Special
 
 
 
  About Us
 
 
 

Newsletter
Free E-mail Newsletter from BYTE.com

 
    
           
Visit the home page Browse the four-year online archive Download platform-neutral CPU/FPU benchmarks Find information for advertisers, authors, vendors, subscribers

ArticlesSo, Help Me, Java


May 1998 / Javatalk / TopLink Bridges Two Worlds / So, Help Me, Java

JavaSoft continues to roll out APIs about as fast as you can hiccup. The new Java Help API, currently in beta testing, is an all-Java "über alles" help system for JavaBean components, applications, desktops, and HTML pages. (That's a big target.) The Java Help documentation envisions a Java help system written purely in Java.That means you can embed a help system within an application or compress it into a Jar file for transport to another destination.

The primary component of a Java help system seen by a user is the he lp viewer, which comprises a toolbar, content pane, and navigation pane. (Java Help relies heavily on swing user-interface components.) The contents of the help viewer ought to be familiar to anyone who has interacted with a help system. The conte nt pane displays help topics. The navigation pane is a tabbed pane that lets a user select from among the table of contents, index, and text search options.

Java Help permits a single help system to support varying "navigational views" of help content. The navigational view is a description of how a particular kind of content is to be viewed. In that sense, it is metadata -- data about data. For example, a navigational view is defined by (among other things) its format (how it is to be shown) and data that identifies the format and location of the view. A navigational view is implemented by a Help Navigator, which is a subclass of the JHelpNavigator class (a swing component).

The Java help system already understands several n avigational views. The table of contents, index, and search information (displayed in the help viewer) already have navigational views defined. Java Help provides mechanisms for registering new navigational views. Consequently, the diversity of data permitted, and the means by which the data is viewed, is limited only by developers' imaginations.

The data structure that carries all the information needed to provide a view into a help system is bundled into a HelpSet file. Note that there are two "loose" terms at use here. First, a HelpSet file isn't necessarily a file, in the same sense as files that you store on your hard disk. A HelpSet file could be bound into an application, for example. Second, it's probably more accurate to say that the information is rooted in the HelpSet file. The structure of a HelpSet is XML-encoded (Extensible Markup Language) data. The data points to the URLs from which you can find the info necessary to build the help system.

Here's an example. One portion of the HelpSet file points to yet another structure called the Map file. A Map file is a series of "key = value" pairs. Each key is a help topic (i.e., an entry from the table of contents), and the value is the URL of another file that stores the actual content that the system will display when the user selects a table-of-contents item.

The upshot is that the data structures used by a Java help system are flexible enough to permit a wide variety of delivery scenarios: Help can be bundled into a JavaBean, help can be inside an application, help can be a separate (but local) file outside the application, help can be pulled in from across the network, and so on. The architecture is initially daunting, but it looks as if it will serve the broad (and ever-broadening) needs of Java applications and applets.


Up to the Javatalk section contentsGo to previous article: TopLink Bridges Two Worlds
Flexible C++
Matthew Wilson
My approach to software engineering is far more pragmatic than it is theoretical--and no language better exemplifies this than C++.

more...

BYTE Digest

BYTE Digest editors every month analyze and evaluate the best articles from Information Week, EE Times, Dr. Dobb's Journal, Network Computing, Sys Admin, and dozens of other CMP publications—bringing you critical news and information about wireless communication, computer security, software development, embedded systems, and more!

Find out more

BYTE.com Store

BYTE CD-ROM
NOW, on one CD-ROM, you can instantly access more than 8 years of BYTE.
 
The Best of BYTE Volume 1: Programming Languages
The Best of BYTE
Volume 1: Programming Languages
In this issue of Best of BYTE, we bring together some of the leading programming language designers and implementors...

Copyright © 2005 CMP Media LLC, Privacy Policy, Your California Privacy rights, Terms of Service
Site comments: webmaster@byte.com
SDMG Web Sites: BYTE.com, C/C++ Users Journal, Dr. Dobb's Journal, MSDN Magazine, New Architect, SD Expo, SD Magazine, Sys Admin, The Perl Journal, UnixReview.com, Windows Developer Network