<pre>Author/s : Rob Harrop, Jan Machacek Publisher : Apress Category :J2EE Review by : Valentin Crettaz Rating : 10 horseshoes</pre> Unless you have been living in a cave over the past 18 months, you have most certainly heard of the Spring Framework, the next generation lightweight framework, which integrates numerous widely supported technologies into a well-designed and extensible infrastructure that finally makes J2EE accessible to any frustrated expert and novice developer.
Aside from its impressive set of technical features, Spring's second invaluable asset is incontestably its extensive documentation and examples suite. However, note that Pro Spring is not a blatant clone of the supplied documentation. Instead, it takes a different route in that the authors gracefully introduce Spring by adopting a very pragmatic approach based on their real-world experiences with the framework. What you will read in this book is not theory at all. Fasten your seatbelts and get ready to see Spring at work in all its splendor. The authors spend over 700 pages showing you how to use Spring in practice when dealing with inversion of control, data access with JDBC, Hibernate and iBATIS, AOP, transaction management, EJB, JNDI, JMS, e-mail, Struts, MVC, and much more. Once you'll get through this book, you'll confess that Spring truly is an impressive framework and you'll even ask yourself how you could manage to develop your applications without it.
Finally, note that to get the most out of this book, you should be comfortable with J2EE concepts and the Java platform in general as the authors deliberately stay focused on Spring and its novelties.
<pre>Author/s : Rob Harrop, Jan Machacek Publisher : Apress Category :J2EE Review by : Lasse Koskela Rating : 9 horseshoes</pre>
Looking at "Pro Spring", one can immediately see that it packs a lot of information. The page count almost reaches 800 and the table of contents does indeed seem to cover pretty much anything there is to know about the Spring Framework. The first parts of the book introduce the Spring Framework on a bird's eye level, the sample application used throughout the book as a playground for the examples, and explain some basic concepts like Inversion of Control and Spring's basic bean-wiring facilities. After page 150 or so, it's all about digging deep inside the vast number of features and modules under the Spring umbrella.
The Spring AOP framework is introduced quite well, starting from the fundamentals like what is a pointcut, what is a joinpoint, etc. One really understands what the framework is about after reading through the AOP chapters. The data access part, which no doubt is of high interest to most readers, also does a good job on showing how the Spring JDBC framework works. It also presents a very nice "tutorial" on integrating Hibernate with Spring, although it's certainly not by any means a complete resource for learning Hibernate itself. The data access part also covers the iBATIS SqlMap framework for object-relational mapping (and actually uses more pages on that than for the Hibernate integration) which, on the other hand, was a nice surprise. Then again, the authors had decided not to cover Spring's JDO integration at all (only a brief mention somewhere near the beginning) which I would've expected. I gather JDO is not that widely used to date so maybe that isn't a problem (and the Hibernate stuff is very close to what the JDO integration looks like anyway). One specific thing I especially liked about the Hibernate chapter was that the authors had gone through the trouble of actually showing the SQL being generated for the different kinds of mappings. That's not really relevant for Spring but it was such a nice surprise that I felt like mentioning it anyway.
The heart of the book then covers "Spring in the middle tier", i.e. transaction management, integrating J2EE components such as Enterprise JavaBeans, job scheduling, sending email, and remoting with the various protocols supported by Spring. The technologies and APIs are not all there is to this part, though. Chapter 11 provides a more thorough discussion on good design practices and common pitfalls. Actually, the authors have managed to sprinkle these also elsewhere in the book in smaller amounts. The only thing that's really missing here is security, partly because the Spring core project doesn't provide much support for authentication and authorization (that's being handled either by custom frameworks or by the Acegi Security Framework project).
The last 100 pages before appendices have been dedicated to using Spring in web applications. The Spring MVC framework itself was described quite nicely, although I was left hanging a bit trying to wrap my head around the different base classes for controllers, resolvers, and so forth. Then again, I've had the same feeling with all (2) Spring books I've read so far. In addition to the standard JSP view, integration with the Velocity template engine and other alternative view technologies such as XSL transformations, the Tiles framework, PDF generation with iText, and Excel generation with the POI library are briefly demonstrated with JSP tags and Velocity macros getting most of the attention. One short chapter has also been dedicated for presenting the integration between Struts and Spring--a topic that many have struggled with.
Finally, the appendices showcase the Spring Rich project for building rich clients on top of Spring, the Spring IDE Eclipse plugin, and some features that are coming (or have already by now) soon such as JMX integration. Perhaps the most important appendix is, however, the one titled "Testing with Spring", which gets you going with unit and integration tests that use the Spring bean container. I would've loved to read more about this topic but even these few pages are a big help for a beginner since the first steps are often the most critical ones and having someone show initial direction can save the day.
In summary, "Pro Spring" is a good book and a valuable reference in learning Spring. It's not a book you'll want to carry around too much but it does include plenty of sample code (with just a few obvious typos that are easy to figure out) both Java code and the corresponding configuration elements. It's not the be-all-end-all reference for Spring but it's pretty close. A second edition with JDO and Acegi covered could be a full 10 horseshoes.
I happen to read the book Pro Spring in online digital library, I find the book really excellent. And it provides a good detailed explanation of fundamental concepts such as DI AOP along with spring framework.
But I find reading a book On-line is very tough, I prefer to have a printed copy.
I tried to buy a local paper-back edition in India and found there is no Indian edition of this book.
It is really unfortunate that books like pro-spring are not available in India.
It would be great if authors of best selling books talk with their publishers and made sure that cheap paper-back editions are available in markets like India.