New Tapestry 5 Feature

One of the key features in Tapestry 5 is something which Howard has dubbed adaptive API. The idea is that the framework adapts to your code, rather than the other way around. IoC containers get you halfway there by allowing you to code POJOs with distinct responsibilities which are later wired by the container. However, when your code is part of a larger whole (i.e. you’re using some framework), best practice usually dictates that the relevant boundaries are formed by some well-defined set of interfaces.

Tapestry 5 has taken another route: do whatever you want to do, and the framework will use every trick in the bag to attempt to accommodate you. One obvious example of this principle is the event handler API. Specifically, the return values for these event handlers determine the next page that will be rendered. In most web frameworks, you would most definitely need to return an instance of IPage or ILink or whatever well-defined return type your framework understands. In T5 land, however, you can return almost anything that might make sense: null, a page name, a page instance, a link, even a stream. And now, thanks to Howard’s genius and my copy-and-paste skills, a page class :-)

I’m a Tapestry Committer!

Well, it’s official: I can now add features to Tapestry without a middleman! If Howard hadn’t beat me to it, I’d probably start out by adding a BeanForm component to Tapestry 5. As things stand, I’ll probably start small — fix some bugs, add some small features, etc.

This also increases the pressure to get HtmlUnit working with the Prototype (Tapestry 5) and Dojo (Tapestry 4) JavaScript libraries. There’s no excuse for my two pet projects to remain immiscible. Well… except that it’s hard to simulate all of the extravagant browser features that these newfangled JavaScript libraries require ;-)

I enjoy writing (to a degree), so one of my self-imposed tasks may also be to polish the documentation for Tapestry 5. One of the more prominent criticisms of Tapestry 4 has been that the learning curve is steep and the documentation is sub par. It’d be nice to turn that around and move Tapestry 5 to the opposite side of the spectrum: a gentle learning curve facilitated by excellent documentation. On vera comment ça va aller…

« Previous entries