views:

65

answers:

3

I am just starting to learn about spring and was looking at the difference between Spring 3.0 and Spring 2.5.

Initially i was following this tutorial http://static.springsource.org/docs/Spring-MVC-step-by-step/index.html which is a step by step guide to developing a Spring MVC application. It is based on Spring 2.5 and i notice there are quite a few differences with Spring 3.0. I tried to find the equivalent tutorial that is based on 3.0 but couldnt find it.

The difference i notice with 3.0 is that there is a lot of use of annotations and a lot of things is done for you in the background. I am sure this is a good thing but i am wondering for the purpose of learning the framework should i continue with 2.5 so that i can understand what goes on behind the scenes before i use spring 3.0?

Please also if you can recommend a spring book that is suitable for a beginner i would appreciate it.

Thanks

+1  A: 

"Spring in Action", "Pro Spring", and "Spring Recipes" are the three that I'd recommend to anyone.

If you've never used Spring, I'd say that learning either one will suit your purposes. The majority of Spring 2.5 carries over to 3.0, so it's not wasted.

The books and tutorials haven't kept up with Spring 3.0. Another change between versions was the purchase of Spring by VMWare. They've separated paid support from open source, so it's hard to tell what the future will be for non-paying customers.

duffymo
Thanks i've just bought the "Spring in Action" book from amazon as i have heard it mentioned quite a lot. Yes i have never used spring before. I was not aware of the purchase of Spring by VMware. Do you think this might affect the open source aspect of Spring in that it might not be open source anymore?
ziggy
It's impossible to say, since I'm not a Spring insider, but I could see where the open source stuff might be a step behind the paid product.
duffymo
+3  A: 

I'd recommend to always use the latest version of a framework. Especially if you're starting on a new project. There are always (well usually) tons of improvements, and simplifications, and migrating to the latest version later may be a pain.

Spring has a great user manual (see http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/), and IMHO a book doesn't have an added value in this case. I found the Spring user manual always easy to read and understand, so don't get intimidated. I think this is definitely the best starting for beginners as well. You don't have to read it all. Only the sections of interest!

Note that Spring 3.x contains many other improvements such as SpEL (Spring Expression Language), improved web support (you already saw that), REST support, and more.

Eran Harel
I agree with with Eran. The free online spring documentation is quite thorough. As reference documentation, its focus is on the "what" and "how". It also includes some of the "why" of Spring being beneficial compared with the alternatives, but perhaps not as much as you would find in a book. All to say, the reference documention is a great place to start.
btreat
+1  A: 

I was not aware of the purchase of Spring by VMware. Do you think this might affect the open source aspect of Spring in that it might not be open source anymore?

First, the SpringFramework guys are thoroughly committed to open source (from what I can see). So a change would probably entail lots of developers leaving.

Second, most of the people who use Spring do so because it is open source, so a change would risk a major migration of (paying) customers away.

Third, turning Spring into a closed source product would be a politically awful move for VMware, and would likely have fallout for other VMware product lines.

Finally, and most importantly for people committed to using Spring: there is no way that the VMware could legally "undo" the open sourcing of current Spring releases. The best they could do would be say that Spring 4.0 etc was closed source. Anyone who wanted to would be free to continue distributing and using SpringFramework 1.0.x, 2.0.x, 2.5.x, 3.0.x and all associated open sourced technologies. And anyone would be free to create a "fork" of any of them to continue Spring open source development. The only possible issue would be the use of trademarks, and that is easily worked around.

Add that all up, and (IMO) there is nothing to worry about.

Stephen C