IN THE EARLY DAYS of the web it was great fun to craft web pages by
hand, carefully placing each HTML tag onto the page. As time has gone
on, we've acquired a wealth of new technologies, including CSS,
JavaScript, and the full gamut of HTML standards, including XHTML and
DHTML. These advances bring freedom but also complexity and an almost
overwhelming array of choices. Few developers can intimately know all of
these technologies, and even if they could, browser compat- ibility
issues are often significant enough to humble the most hard-core
developer. However, even with these new technologies, we still often
feel that we're rein- venting the wheel each time we build a website.
For example, when we create image buttons that change when the mouse
pointer rolls over them, we're writing fresh JavaScript script. That
script has to be written and tested, but it also adds potentially
unhelpful complexity when we come to change the page later. Then when we
want to reuse the script, we have to figure out how to transplant it
neatly, and then go through the whole test cycle again to make sure we
didn't break it. And if the user interface element is more complex-for
instance, a pop-up menu, a navigational tool bar, or a rich form
control-we disappear into a deep, dark pit of DHTML and script, and it
may not be clear whether the work is worthwhile.