Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Pro Spring 2.5

 
Book Review Team
Bartender
Posts: 962
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9497
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)...
 
Hong Anderson
Ranch Hand
Posts: 1936
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17276
6
IntelliJ IDE Mac Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17276
6
IntelliJ IDE Mac Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic