I don't know. The word "framework" sort of puts me off. I've come to
associate it with unclear objectives and lots of browsing through
thick manuals. Last time I tried to get into a web development
framework was Zope. Two years later I still don't know what Zope is
good for.
After poking around
www.springframework.org for 15 minutes I have no
clue as to what Spring is supposed to do. That to me is a bad sign.
Maybe you could turn me around? For example by showing me some Spring
code that does DB connection pooling side to side with code using some
alternative library and demonstrate that Spring is simpler.
alex
Spring is a framework that makes writing J2EE applications a lot easier.
It's not a "lock-me-in" framework since it's very simple and very light, and
all of it works on interfaces. This means you can just implement a new
interface, swap out the old component for your new one. Just read the
reference documentation. You don't have to read the whole thing, just get
your feet wet with the bean factories. I don't know how anyone could
develop without dependancy injection nowadays.
<!-- DATASOURCE -->
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<property
name="driverClassName"><value>org.postgresql.Driver</value></property>
<property
name="url"><value>jdbc
ostgresql://localhost:5432/databasename</value></property>
<property name="username"><value>username</value></property>
<property name="password"><value>password</value></property>
</bean>
This is an example of configuring a datasource (note it's
org.apache.commons.dbcp.BasicDataSource in this case, but it can be any
datasource that follows the interface). You can then pass this datasource
into other beans, like a hibernate session factory, and they won't even need
to know that you've changed databases.
Just read the reference docs. I can't explain it all to you when they
already did a fine job already. Just use it, because it's not one of those
frameworks that will disappear tomorrow. In fact, it's gaining popularity
everyday and it's considered very standard in terms of open source
enterprise projects (web or not web).