This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Book Reviews and the fly likes Pro Spring 2.5 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Books » Book Reviews
Bookmark "Pro Spring 2.5" Watch "Pro Spring 2.5" New topic
Author

Pro Spring 2.5

Book Review Team
Bartender

Joined: Feb 15, 2002
Posts: 932
Authors: Jan Machacek, Jessica Ditt, Aleksa Vukotic, Anirvan Chakraborty
Publisher: Apress
Reviewed by: Mark Spritzler
Rating: 9 horseshoes

8 1/2, but since we only have 8 or 9, I liked it enough to make sure I rounded up instead of down.

I highly recommend this book to learn Core Spring. It is the only book currently out by Dec 08 that covers version 2.5. Other books still only cover 2.0

I found the writing easy to understand, I found that they covered the material very well with good examples. They cover a lot of material and leave you with great in-depth knowledge in each of those Spring technologies.

Now, I don't agree with everything they say in the book, but it isn't that they are wrong, but that I just disagree with certain statements. For example, in a Note section they stated that "They do not encourage the use of annotations on the objects you will persist using Hibernate." Using JPA Annotations, from an ORM tool expert, is a best practice and makes your life so much easier, in my opinion, and many other ORM experts. This note should have been left out of the book, unless they wanted to fully cover why.
Al Scherer
Greenhorn

Joined: Jan 14, 2009
Posts: 1
You said that this is "the only book currently out by Dec 08 that covers version 2.5."
Wasn't "Spring Recipes: A Problem-Solution Approach (Books for Professionals by Professionals)", ISBN 978-1590599792, published in June of '08? According to the cover, it was written by a SpringSource author and covers version 2.5.
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9291
    
  17

I have this book and I have gone through the first few chapters and the book looks great. When I started to learn how to use Spring with Struts, all the things in this book helped me grasp that concept within minutes (BTW I'm using Struts 2 in Action which is also a great book)...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Hong Anderson
Ranch Hand

Joined: Jul 05, 2005
Posts: 1936
Thanks for your review.
Book Review Team wrote:
Now, I don't agree with everything they say in the book, but it isn't that they are wrong, but that I just disagree with certain statements. For example, in a Note section they stated that "They do not encourage the use of annotations on the objects you will persist using Hibernate." Using JPA Annotations, from an ORM tool expert, is a best practice and makes your life so much easier, in my opinion, and many other ORM experts. This note should have been left out of the book, unless they wanted to fully cover why.

I don't like JPA Annotations, I disagree that it's a "best practice", who decide that using JPA Annotations is a best practice?

I don't like it because, it couple domain models with JPA Annotations, dependency generally isn't a good thing. What if we want to change implementation from JPA to other technology such as JDBC, iBATIS? Or what if we want to change persistence layer to not use RDBMS? I think it's a bad practice to "hardcoded" dependency to JPA in domain model code.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

Kengkaj Sathianpantarit wrote:Thanks for your review.
Book Review Team wrote:
Now, I don't agree with everything they say in the book, but it isn't that they are wrong, but that I just disagree with certain statements. For example, in a Note section they stated that "They do not encourage the use of annotations on the objects you will persist using Hibernate." Using JPA Annotations, from an ORM tool expert, is a best practice and makes your life so much easier, in my opinion, and many other ORM experts. This note should have been left out of the book, unless they wanted to fully cover why.

I don't like JPA Annotations, I disagree that it's a "best practice", who decide that using JPA Annotations is a best practice?

I don't like it because, it couple domain models with JPA Annotations, dependency generally isn't a good thing. What if we want to change implementation from JPA to other technology such as JDBC, iBATIS? Or what if we want to change persistence layer to not use RDBMS? I think it's a bad practice to "hardcoded" dependency to JPA in domain model code.


Sorry it took me so long to see this reply.

Coupling occurs when you are required to have all the classes and such in the application in order for it to work. However, annotations are not coupling anything to anything, they are just markers. You need the Annotation class only at compile time, and you do not have to use the technology that the Annotation is about, that is fine, you can choose something else. For instance, I can have JPA and JAXB on the same domain class and I don't have to use JPA, I don't have to be using JAXB, but it is nice to have those in there if I am and it is all in one place so I can see exactly what is going on.

I think you need to understand Annotations a little bit better to fully grasp how much nicer and easier it is to use them rather than externalizing into xml files.

Annotations and xml like everything else needs to be used wisely and for purposes that make each one better. Over configuration of xml with everything is so much overkill and just makes things more of a maintenance nightmare.

And remember, in the review I specifically said "my opinion" and everything I typed in this reply is my opinion, so you can take it with a grain of salt.

Mark
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Annotations without backing functionality are a code smell--they're terribly misleading.

I think annotations are *great* for some things, but I have yet to be convinced that persistence is one of those things.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

David Newton wrote:, but I have yet to be convinced that persistence is one of those things.


And I have yet to see any benefit of having my mapping in xml, except adding complexity (xml mapping is a bit more confusing to me), and taking a lot more time to create, lots of errors from xml is all strings, no type safety. So I find it riskier to use xml mapping.

For a question before, the advice of Annotations as a best practice comes from the developers of the ORM tools themselves, not from me, although I completely agree.

Mark
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Pro Spring 2.5
 
Similar Threads
Learning How to Use Annotations in Spring
Passed the OCPJP yesterday!! A couple of questions..
Methods on advice are not being called
is spring persistense with hibernate use spring 3
Spring in Action by Craig Walls, Ryan Breidenbach