I use Pro Spring and Java Development with the Spring Framework, and I am satisfied with both. But at the moment, I am mostly using Spring MVC and the Bean Factory only, and I am not too concerned about incomplete code examples. In fact, I prefer those to full code listings.
I find that Pro Spring is good for quickly getting an idea of what Spring has to offer on a given subject. And Java Development... gives you more in-depth information.
Also, here are some Spring blogs that I find useful -
Thanks, "Pro Spring" and the Spring and MVC were my next two choices, but I didn't want to plunk down the money if they were no better than "Spring in Action".
I realize that sample code can't always be provided 100%, but it would be nice if the very first example, a simple "Hello World" to show you how Spring works would actually work so that the reader can see what happens without trying to correct the author's errors.
Very disappointing for the usually terrific Manning Press books.
Jeroen T Wenting
Joined: Apr 21, 2006
I've never really liked Manning books much, I prefer O'Reilly by far.
Their Spring developer's notebook is quite good. Examples work (though they're not always given literally, requiring some thinking which is IMO a good thing). Only place you may/will have problems is in hooking up external packages like Hibernate which change their public interfaces more rapidly than authors can keep up with writing changelogs and errata for their books.
It is a pretty good introduction. When I tried it a while ago, it had some very minor errors to do with JSTL taglib urls. Otherwise, everything worked fine.
Also, have you checked online errata for your book?
Joined: Apr 30, 2005
It's not so much that I want to do the "Hello World", its that I bought this book (which like most computer books is not cheap) and the very first example, which looks fairly complete, doesn't even work. I know that not all examples can be complete, but this is really lame. Imagine if you picked up a book on Java and it had a "Hello World" example that didn't work, what would you think?
You would waste a lot of time trying to figure out what you did wrong, just as I did with this Spring book. After I had double checked classpaths, etc. and tried compiling the sample files from both commandline and from Eclipse to be certain that I was doing things correctly I just dropped it.
I have taught lots of classes on various software topics to both academic and industry classes and one thing you always want to do is give your audience at least one, small, simple example that works just as written so they know that they get the idea and they can see how it works. THEN you can give them code snippets and partial examples for them to complete.
This weekend, when I have the time, I'll check out other Spring books at the local technical book store, get one and just advise others to steer clear of this one.
Jeroen T Wenting
Joined: Apr 21, 2006
Never use any IBM software then. Their examples never work... I used to program with IBMs C libraries for OS/2, we had a standing joke in the office that as long as you did it differently from what was mentioned in the documentation it would probably work.
I didn't find the "Spring in Action" book to be that bad; I actually think the book is a pretty decent resource for Spring. True, there is a little bit more to do than just typing in the sample code in your IDE and clicking the "Run" button. Unfortunately, that leaves hands-on readers like yourself who may be unfamiliar with frameworks like this in a bit of a lurch.
I did have to change the code a bit to make it run:
I used Eclipse to run the program. Aside from typing in the code and making the change to the line that would not compile, I just had to put the Spring jars and the commons logging jar in the build path. The build path bit was the only thing I had to do that was not explicitly instructed in the book. And the program ran fine.
If you have any more difficulties with the book, just post a question here and I'm sure somebody can help you figure out a way around the problem. It would be a shame and a waste of good money and of a good resource on Spring for you to dismiss this book because it wasn't immediately obvious to you to do the two things I did to make the HelloApp program run. Even a busted clock is right two times a day. This book may be a little busted (just take a look at its errata page) but there's still quite a few things in it that can make it worth its price for you.
BTW, all the Spring books that I own are quite dog-eared now but my favorite reference for Spring is "Pro Spring" with "Spring in Action" and "Professional Java Development with the Spring Framework" sharing equal time as backups.
Hope this helps. [ May 06, 2006: Message edited by: Junilu Lacar ]
Are you kidding ? I have not read it, but Amazon's reviews were enough to refrain me from reading it.
I've read Spring In Action which is more than enough to give you a good understanding of Spring. I found the last part on Security a bit difficult and out-dated, but other than that, no complaints. I actually prefer to figure out samples by myself, rather than typing those in the book.
Linda, don't go with Spring Developer's Handbook at all ! I don't believe that Oreilly did this book, code is not working, bad explainations and ... If you do a small search onjava.com , you can get many sample snipets of this book and you will not like their smell. Do you want code (alot of code) ? get Spring Live from SourceBeat. Matt Raible (author of Spring Live) did a massive work in his book, he shows you how to use Spring with Struts, WebWork, Tapestry, Spring MVC, other view technologies, transaction, Hibernate, security and many other things (ah, I forgot about unit tests). And personaly, Spring In Action is not bad, it is a good reference indeed. Please note, I'm not a pro or something, but here is my recommended list : ---- Spring's documentation (Yes it is great, it is better than many books). Hibernate In Action (in the case you want to hibernate your data). Spring In Action POJO In Action
Joined: Apr 30, 2005
Well, I got "Pro Spring" this past Friday night and I'm well on the way into it and have found no major problems with it yet.
Special thanks to Junilu, that code you posted was exactly what was needed to make the "Spring in Action" sample "hello world" code work. I do like the text of "Spring in Action", but I'm going to be very careful of the code.
Thanks again to all
Joined: Apr 26, 2006
Hi Junilu, I've added Spring.jar and commons-logging.jar to th lib folder but when i'm trying to compile the code which you've posted - it says 'ClassPathResource cannot be resolved to a type'. do i need to put any other jar?