struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Germuska <>
Subject [OT] "Why should I use Spring " (RE: Hibernate VS ibatis, which is better?)
Date Wed, 01 Sep 2004 21:07:40 GMT
At 4:50 PM -0400 9/1/04, David Friedman wrote:
>+1 on the "Why should I use Spring" and "beat me over the head until I use
>it" statement.

The Spring framework is a lot of things, and I'm not even interested 
in using most of them at all.  However, I find that the base 
framework provides a nice way to prepare an application context.

For a long time, I used Digester to read an XML file and use it to 
create one or more specialist classes that encapsulated business 
logic and DAO type behavior, and then I just had my Struts actions 
know where to look for those classes in the ServletContext.

Digester is still useful for this, but the Spring XmlBeanFactory 
achieves similar results and yet allows me to potentially link 
together some of the specialist classes a little more flexibly. 
Digester is very useful for a tree structure, but doesn't do as well 
when you want to refer to one element in two or more places. 
Spring's XmlBeanFactory lets you set properties by reference, which 
is proving to be more flexible for us.

This may be a little abstract to serve as a "beat you over the head 
until you use it" explanation, but in short, I'm pretty happy with it 
so far.

Spring also provides DAO abstraction, transaction management, and 
aspect-oriented development features, but you can leave all those 
behind if you don't need them.  Oh yeah, it also has an MVC web 
controller piece!


Joe Germuska       
"In fact, when I die, if I don't hear 'A Love Supreme,' I'll turn 
back; I'll know I'm in the wrong place."
    - Carlos Santana
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message