Apple WebObjects 3.5 User Manual

Page 94

background image

Chapter 6

Creating Reusable Components

94

Figure 27. A Navigational Control

The HTML code for one page might look like this:


World Wide Web Wisdom, Inc.


Please come visit us again!







World Wide Web Wisdom, Inc.
Home Sales Service Search



Thirteen lines of HTML code define the HTML table that constitutes the
navigational control. You could copy these lines into each of the application’s
pages or use a graphical HTML editor to assemble the table wherever you need
one. But as application size increases, these approaches becomes less practical.
And obviously, when a decision is made to replace the navigational table with an
active image, you must update this code in each page. Duplicating HTML code
across pages is a recipe for irritation and long hours of tedium.

With a reusable component, you could define the same page like this: