Lambda the Ultimate

inactiveTopic Designing Tapestry Mega-Components
started 11/30/2001; 12:49:05 PM - last post 12/4/2001; 8:58:57 AM
Ehud Lamm - Designing Tapestry Mega-Components  blueArrow
11/30/2001; 12:49:05 PM (reads: 1918, responses: 1)
Designing Tapestry Mega-Components
Tapestry: Java Web Components is a powerful, flexible, open source framework for creating Web applications in Java. Tapestry builds on existing J2EE technologies to create an environment for robust, scalable, and highly dynamic Web applications. The framework was designed from the start to allow the creation of rich, reusable components. This article will explore the construction of one such component, the Palette, which exercises many of the advanced features of Tapestry.

The article repeatedly talks about the power of components, but in fact these are not ordinary components. What we have is an entire set of languages, layered on top of each other (HTML and Javascript are, of course, languages themselves).

That's why it is not surprising that Basic development took two days. Later, an additional day was spent reworking it to operate reasonably in Netscape Navigator 4, and then more time to adjust to Navigator 6. But now that the component exists, it is easier to use the Palette component than it would be to implement the other solutions.

Posted to OOP by Ehud Lamm on 11/30/01; 12:49:53 PM

Howard Lewis Ship - Re: Designing Tapestry Mega-Components  blueArrow
12/4/2001; 8:58:57 AM (reads: 780, responses: 0)
I honestly can't tell if you consider it a plus or a minus that Tapestry uses a "layered set of languages". Of course, for the problem space that Tapestry addresses, that layered set makes sense: HTML and JavaScript on the client side, HTML templates (including JavaScript) and XML descriptors on the server side.

A large chunk of that initial "two days" was writing the JavaScript and making it cross-platform (it still runs best on IE). JavaScript simply is not my forte :-)

However, all the talk about languages obscures the point of the Palette as a component. As the developer of that component, I had to do a bit of work -- none of which is relevant to an end-developer.

The end-developer will be able to "drop in" a Palette component onto a page of their application by defining a spot for it in the HTML template and configuring it in the page's component specification and have all that HTML and JavaScript, and all that client-side behavior, taken care of for them. The "advanced features of Tapestry" are those features that allows an end-user to drop in the Palette component without needing any great understanding of its inner workings ... regardless of how many Palette components are used, even on a single page. It's a tricky business, due to the limitations of HTML and JavaScript.

The point of the article was to outline the basic techniques for constructing this kind of complex component. These same techniques can be used for a number of situations, such as client side validation.

Tapestry: Java Web Components