Comparing it to struts is a No-brainer... But i would like to think we have moved on since then...
I would like to see Stripes compared to Spring MVC.
I agree this would be nice. I've used Struts a lot, which is why I was happy to write that comparison. I've played with Spring-MVC and found quite a lot that I /personally/ didn't like. But I haven't used it in depth enough to write a good comparison - so I'll have to leave that to someone else.
These are the things that i am not to keen on...
You have Tags for generating HTML (form elements)... This means this HTML is hidden from HTML designers.. They have problems styling it...
eg:
In spring mvc you would do this:
name="${status.expression}" value="${status.value}" />
Well, the bind tags was something that I really didn't like in Spring-MVC. It just so verbose! In Stripes, although custom tags are used, they mirror HTML tags in every respect. All attributes are the same as the HTML equivelants. So if you're template designers have a tool that can preview your templates, the tags should all be very familiar. And if not, your template designers can use pure HTML and you can run a quick search replace for to . And given that in reality developers do a lot of template writing/maintenance, this is a simpler syntax for them.
Spring MVC also abstracts out the the View... So i don't have to use JSP. I could use freemaker or velocity or xlst etc.
Stripes doesn't have any dependency on JSP. It supports JSP and FreeMarker well. You could use Velocity or XLST if you want - you just won't get the benefit of the tag library.
I see in the quick start guide you have:
return new ForwardResolution("/quickstart/index.jsp");
Is this just a quick example of getting to the view or do you abstract it out.. So the controller does not know the view... Eg could i put
return new ForwardResolution("index");
and that is resolved to /quickstart/index.jsp. If NOT that is a coupling that is not good and is worse than struts.
This is a longer discussion. The main difference here is that Stripes returns concrete Resolution objects, whereas Spring-MVC prefers symbolic strings. My personal opinion is that "abstracting" the name of the view out of the controller class is effort, and people condescendingly refer to it as a best-practice when in reality the benefit is questionable. Returning the Resolution as the Stripes examples show just means you're spreading information around less (no external config files full of action/result/page mappings).
This approach also makes it hugely more straight-forward to stream information back to the client in the case of AJAX downloads as you can just construct a Resolution and hand it back to Stripes to execute. When dealing with symbolic results you have to jury-rig a way of passing the extra information (the File or Stream, content type etc.)
BUT, it should be pointed out that having concrete Resolutions doesn't in any way prohibit symbolic results. It'd be about 20 minutes work to write a SymbolicResolution that uses a symbolic name to look up a the page and whether to forward/redirect etc.
The configuration seems to heavily dependent on JDK1.5. Not such a bad thing but limiting.. Seems a lot of effort to work in JDK1.4
Stripes states pretty clearly that it is designed for JDK 1.5. This is a purposeful decision. It allows it to use annotations everywhere it needs, and not have to deal with externalized config or clunkier mechanisms. Similarly it can use generics information to the fullest to work with Lists and Maps etc. And in reality, the kind of developer/team that is willing to try a relatively new (compared to Struts/WW/Spring-MVC) framework is usually the kind of team that's already using JDK 1.5.
-Tim Fennell
Stripes: Because web development should just be easier