Stripes
Greg Hinkle writes about a new JDK 5-only Java web framework called Stripes.
Stripes is a presentation framework for building web applications using the latest Java technologies. The main driver behind Stripes is that web application development in Java is just too much work! It seems like every existing framework requires gobs of configuration. Struts is pretty feature-light and has some serious architectural issues. Others, like WebWork 2 and Spring-MVC are much better, but still require a lot of configuration, and seem to require you to learn a whole new language just to get started.
I dig the fact that someone is trying to create a web framework that requires less configuration. It's also very cool that they've released it as 1.0 (rather than 0.1 as many OS projects do) and it also seems to be well documented. Unfortunately, it doesn't look like there's any support for Spring or dependency injection.
Personally, I don't mind the configuration required by WebWork or Spring MVC - but then again, I use AppFuse and tend to generate most of the configuration code using AppGen. Even so, it would be nice to get away from the configuration requirement. Hopefully more framework authors will find ways to reduce or even eliminate the XML hell we have in Java web frameworks. Kudos to the Tapestry developers for doing this in their 4.0 release.
I like the convention over configuration that Rails uses. It's this same mantra that I've been trying to develop AppFuse with for the past few years. The problem with Java web frameworks is developers want configuration choices - even if they never bother to use them.
Posted by Geert Bevin on September 07, 2005 at 05:23 AM MDT #
Posted by Cesidio on September 07, 2005 at 03:50 PM MDT #
If you're looking for "convention over configuration", look no further than Wicket (http://wicket.sf.net). It has no XML, and runs circles around tapestry and JSF. Oh, and the AJAX support is really turning out great as well. =)
Posted by Ryan Sonnek on September 07, 2005 at 04:09 PM MDT #
Posted by Niall on September 07, 2005 at 04:54 PM MDT #
You state "Unfortunately, it doesn't look like there's any support for Spring or dependency injection.". And you're right that out of the box there is no integratin with Spring or any other dependency injection system. That's not because I don't like the idea, but at some point you have to pick a feature set for 1.0 and drive to it! I don't use Spring much at all, but since a lot of others do, I'd definitely be interested in hearing your opinions on what kind of integration you would look for?
Given Stripes' push to get rid of as much XML configuration as reasonably possible, I wouldn't want to use Spring to lookup and configure ActionBean instances - it'd put things right back to everything in XML. My initial thoughts are to have an extension that lets you annotate properties (getters/setters) with the name/ref of a Spring bean (e.g. @SpringBean(name="dbConnection")...), and would then use Spring to lookup that depenedency, and inject it into your ActionBean for you. I realize that in full-on Spring you have everything in XML, which gives you flexibility at both ends....you can change the defintion of "dbConnection", or you can change the name of what's being injected into your bean. Using an annotation would obviously cut out one half of this (until you recompile that is), but still allow you to flex the definition of the inserted beans. Is that a reasonable compromise? If not, what's a better approach?
Posted by Tim Fennell on September 14, 2005 at 11:54 AM MDT #
Posted by Mike on November 02, 2007 at 04:05 PM MDT #