I'm just wrapping up a fairly major project which was built on top of
Struts (thereby giving me a chance to learn it). I'm a little mixed
about the experience, not being entirely sure the value add was there. I
definitely feel "helped" by Struts' form validation infrastructure, and
I would probably appreciate the message resource bundling more if my
application needed to be internationalized (which it didn't). On the
flip side, the Action/ActionMapping system, while elegant, only covered
about half of my application (since I had to write roughly as many
custom JSP tags as I did Struts actions). Lastly (and this last comment
is independent of Struts), I've come to the conclusion that a strict
adherence to the MVC pattern is by no means a magic pill to perfect
application manageability.. that is, plenty of worms still manage to
crawl out of the woodwork, and I have a sense that the Java community
needs something more than just a good MVC system in order to build an
elegent (and robust) web application.
The application was also based upon EJB, for even more fun and complexity.
On the tags vs. actions dilemma - I took the approach recommended in
various other publications etc., which is:
1. if the Java code will alter your Model, then put it in an Action (or
equivalent).
2. if the Java code is only reading your Model to aid in rendering some
portions of it, the put it in a custom JSP tag.
Some quick metrics and "factoids" about my project:
1. 19 Struts actions
2. 18 custom JSP tags (for which I could find little in Struts to add value)
3. 15 ActionForms
4. 13 database tables
5. Since the application uses EJB session beans for all business logic,
virtually all of the Struts actions as well as JSP custom tags ended up
being very shallow pass-throughs of parameters to the EJB bean, and
return values back to the JSP pages.
I'm wondering if there are others out there who have finished projects
and reached similar conclusions as mine (in particular, about having to
implement lots of Tags and not finding much value-add in incorporating
Struts classes into them).
I am also interested in someone graciously providing a birds-eye view of
Struts and Turbine, with relative strengths and weaknesses. I'm sure
that, on the whole, Turbine probably has a completely different "central
focus" than Struts (apples and oranges), but as someone who is just
coming off a Struts project and is a bit daunted by the Turbine "welcome
literature" (as I was initially with Struts), I would sure love
someone's overview from a Struts-centric perspective.
Lastly, I'm not leaving this group, as I am responsible for managing the
lifecycle of the application I've described above, even though
development is basically "done" (for now!).
Thanks,
Bryan