Re: Which web application framework? aka Why not Struts?
Larry Karnowski <[email protected]>
| Newsgroups | gmane.org.user-groups.trijug.juglist |
|---|---|
| Organization | HickoryWind.org |
| Message-ID | <[email protected]> |
Phillip & Don, An important thing to remember about Spring is that it's really many projects over one common architecture. Spring itself is just an "inversion of control" framework. It's a bean container that instantiates and configures Java beans from an XML descriptor file. Plain and simple. All the other features of Spring -- the MVC framework, the transaction support, etc, are all toolkits built on top of the core Spring framework. This is important to remember, because from the outside, Spring seems to do EVERYTHING, and I'm always very suspicious of "do everything" projects. Spring is cool, however, since all you ever need is the core Spring jar and whatever external toolkit you want. In your example, Phillip, all you'd need would be the Spring MVC toolkit. Okay, so to your original question -- why Spring MVC over Struts? Well, I think they're about the same in terms of features, but Spring's inversion of control makes the code easier to write, configure, and most importantly -- unit test. I think that Spring will soon eclipse Struts in its user base. One negative I've seen about Spring is that it's unintuitive to add to an existing standalone project. Spring MVC was easy enough to add to an existing webapp, but the core Spring framework, in a standalone Java project (non-webapp), tends to assume that the entire Java bean structure is in the spring.xml config. I've been able to work around it, but it's a tad unintuitive how to do it sometimes. It really does work better if everything is in Spring. For what it's worth, I think inversion of control and Spring are the wave of the future, if only for the incredible ease of unit testing with mock objects, etc. Hope this helps, Larry Don Brady wrote: > I am only looking at it so far but there is a huge community of Spring > users now. > > One thing we want for one application is nested Transactions (the ability > to do a partial rollback of database/GUI state) and Spring supports that > when used with a JDBC driver that supports savepoints (most do now). > > Nothing else in sight supports nested transactions - not JTA, not anything. > > Of course, the major point in favor of Spring is its declarative capabilities. > > It can be used for standalone apps as well as web apps. > > BEA is certifying Spring. I hope that IBM does the same thing. > > The book Expert One-on-One J2EE Design and Development, by Rod Johnson is > now being sworn upon as a bible by many (although I have not read it yet)...... > > > _______________________________________________ > Juglist mailing list > [email protected] > http://trijug.org/mailman/listinfo/juglist_trijug.org -- Larry Karnowski HickoryWind.org, Keeps Callin' Me Home Americana Music News, Reviews, & Personality www.hickorywind.org