Filed Under (Java, Software Development) by jonr on February-16-2009

I spent most of the day working on setting up a new project with the latest Spring (3.0.0M1) and Hibernate (3.3.1.GA) releases.  I have more recent experience with Hibernate and was able to get everything working pretty quickly with Postgres on VMWare share.  It has been a few years since I last setup a Spring project and really got down in the guts with it.  I remember it being a mostly low cost framework that provided quite a bit of handy plumbing.  I have never been wowed by dependency injection for dependency injections sake, but I have always liked the things Spring pairs with their container (AOP, ORM support, etc).

Anyhow, as I dug in today I was pretty shocked to see how bloated Spring (and Hibernate) have become.  I have been guilty of throwing JAR after JAR at problems, but it was almost unbelievable to see how many dependencies each framework now has, which of course caused me significant versioning hell in attempting to get the right mix of JARs.  With each change, a tweak to libraries seems to come.

The other surprising part to me was the number of different options there are now for configuring Spring, and how difficult it is to find a clear path to follow.  I am huge fan of annotations, and I am glad that they added significant support in that area.  However, even though I now have a working setup, I have little confidence that I am completely inline with the best practices.

Our company’s founders, Stu and Ed, love to make the statement, “Freedom from choice.” It seems like a “lightweight container,” like Spring would follow this simple axiom.

Anyhow, I am posting my current project for feedback.  Let me know if you see any silliness or have feedback on how I can improve my setup.  It pretty basic so far … Hibernate with Annotations, Spring (Annotations, ORM support), and SpringSecurity.  Here is the project.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • DZone
  • Digg
  • del.icio.us
  • Reddit
  • Facebook
  • LinkedIn

Comments:
Peter Kelley on March 31st, 2009 at 6:47 pm #

I’ve been doing a bit of Spring/JPA(Hibernate) coding lately and I’m wondering if using Groovy builders to do the configs might not be a better option. After I get my XML configs working I might give it a go.

Post a comment
Name: 
Email: 
URL: 
Comments: