Moses Hohman
10/8/2004 1:29:00 PM
Yes, I wouldn't take Struts to be the shining example of Java MVC
toolkits, even if it is the most popular.
I also can't claim to know the entire range of them intimately, but I
have been liking the Spring Framework's MVC stuff, even if it does use
XML configuration files : )
-Your model can be your domain object, or not, depending on which you
think is a better choice
-You define how your action return value maps to your views (so that
you don't have to define success and failure views for every
controller)
-Implementing actions does not require implementing them one per class
(although often I do this, but that doesn't seem like such a terrible
thing to me)
-Spring MVC is also view agnostic, so you can pick the view technology
you like the best, the layout thing is left up to you (tiles, sitemesh,
whatever you like, and by the way tiles does not require use of XML
files, only if you are doing something fairly complicated do you need
them)
-And, in the greater Spring framework, there are some nice
simplifications for JDBC access that can simplify this code as well,
although these are not part of the MVC framework. The greater framework
also provides simplification for Hibernate, JDO and other ORM tools.
Technically I don't think an MVC framework should choose an unrelated
technology for you like that. Does Rails allow you to swap out
something in place of ActiveRecords? I have very limited experience
with rails (I've gone through the basics of the installation and
tutorial only).
Moses
On Oct 8, 2004, at 6:20 AM, David Heinemeier Hansson wrote:
> I hope that helped a bit. Have in mind that I'm pretty biased, though
> :). Struts personifies much of my animosity towards the Java/J2EE
> world. It has XML-files up to here, duplication and repetition coming
> out of the wazoo, and very little to show for it when it's done.
>
> What I _do_ like about Struts is how it some how got positioned itself
> as the default controller in the majority of run-of-the-mill J2EE
> apps. That's a freaking awesome piece of PR work there. I'm still
> learning on that account ;)
>