The Least-Worst Web Framework

Sometimes, when I’m giving presentations about web technology choices, I mention that Struts was the least worst framework back in 2000.

I phrase it that way to emphasize that while I don’t think there was a better alternative, I don’t think that it was really a “good” framework.

So, now I’m using Tapestry. And, to be clear, it’s much better than Struts. It’s orders of magnitude better than anything involving JSPs. But I am kinda mentally thinking of it as the least worst framework of 2006.

It’s not so bad. Not really. But there are some aspects of it that just fill me with hate. Here are some of the things I really dislike:

  • “Improper” HTML. Sometimes, to get a particular effect, you have to implement “illegal” HTML. Stick a <span> or <div> around a table row, or something like that.
  • Lack of proper DOCTYPE support. My HTML tends to be 4.01 Strict. Tapestry barfs at some 4.01 stuff. Like this:
<input name="fred" value="Something">

What’s the problem? Turns out Tapestry wants a slash prior to the closing angle-bracket. Seems Tapestry can’t agree with the W3C’s HTML Validator.

  • Abstract classes. It’s only now that I realize how much “coding by numbers” I do. I like the way the compiler forces me to implement certain methods when I subclass an abstract base class. Not Tapestry, though. It wants me to leave classes abstract. Abstract classes, I’ve found, increase my opportunities for error.
  • Testing. Why is it so hard to do out-of-web-container unit testing for Tapestry? Especially the render cycle? I want to ensure that something renders properly. It shouldn’t be that hard. It really shouldn’t.
  • DirectLinks.
  • When you build pages in “cache=false” mode, there are some important behaviour differences, especially w.r.t. caching instances of objects that were read in by Hibernate. If we hold on to a Hibernate entity beyond its session lifetime, really bad stuff starts to happen.

It's only fair to share...
Share on FacebookGoogle+Tweet about this on TwitterShare on LinkedIn

Leave a Reply