Spring in Action, Third Edition, Early Access Edition
ISBN:
Reviewer Ratings
Relevance:Readability:
Overall:
Buy it now
One Minute Bottom Line
| This book is an excellent reference for Java developers who are developing applications using Spring Framework. It covers many topics like dependency injection, aspect oriented programming, wiring beans using Spring Framework, how to reduce boiler plate coding using Spring templates, manage database transactions, Spring annotation, MVC in Spring and use remote services in Spring. It covers Spring 3.0, Spring security 2.0 and Spring WebFlow 2.0. Still, this third edition is being written so it is hard to give fair evaluation. Second edition was excellent book, it had 3 sections and 16 chapters. In this edition, it seems that author has made sincere efforts trimming down too many details to make it more appealing and easy to read. This edition is easier to read and follow as compare to second edition. I feel that in process, few topics have been left out or are over simplified e.g. Web Services, Security, messaging, MVC and Integrating with other web Frameworks are not covered in great details. It is possible that author may add them or revise them later since this edition is still under writing. Overall this book is very well written. I would give this book four stars. |
Review
This book is Manning Early Access Program edition. This book is divided into 10 chapters that show Java developers how to develop applications using Spring Framework 3.0. Still, chapter 8 and 9 are not included. The book covers many new features in Spring 3.0. In this review, I'll summarize some noteworthy chapters.
First chapter provides an excellent overview on Spring Framework and how it simplifies development of Java applications using POJO compare to other Frameworks. It also explains strategies’ used by Spring Framework using AOP, dependency injection, templates etc., and how Spring Framework avoids littering classes implementing with unnecessary code and locking into any specific Framework code and enables decoupling. If you are not familiar with dependency injection, Aspect Oriented Programming this chapter provides you an excellent overview with examples. It also explains how you can eliminate boilerplate code with templates. This chapter also covers high level overview on Spring container, BanFactory, Application context and different types of application contexts in Spring and now to use them. It also explains briefly, bean life cycle management. At the end, there is a brief overview on major Spring modules and new features in Spring 2.5 and 3.0.
There is a separate chapter containing lot of details on how to create a Bean in Spring. It explains different namespaces in Spring Framework. It provides very good explanation on construction injection v/s Setter injection, how to create bean through singleton factory method, also explains about bean scope. It also covers in great details about Bean life cycle management, intializatingBean and DisposableBean, injecting bean properties through setters, wiring Inner class bean, collections like List, Set, Map, properties, wiring values from other bean, system properties using Spring expression language(SpEL). There are illustrates calling other bean’s method, static method using SpEL and brief introduction to SpEL collection projection.
This book provides excellent tips on Minimizing XML configuration in Spring, talks about Auto-wiring and Auto-discovery. Explains in details with example four auto-wiring types, by name, by value, by constructor and auto-detect. How you mix auto-wiring with explicit wiring, and force auto-wired property to null. There is a section on auto-wiring with annotation and wiring null values discover power of using expressions with annotation injection. There is a separate section on automatically discovering beans, annotating bean for auto-discovery.
There is a chapter on AOP in Spring which covers AOP basics, it also covers creating aspects from POJOs, using annotation in aspects and dependency injection in AspectJ. If you are new to AOP then this chapter will provide you an excellent overview. It covers in depth, AOP support in Spring. Selecting JoinPoints with PointCuts and declaring aspects in Spring XML and how to extend functionality of a class without changing it using Spring AOP. Annotating aspects are also covered in great details. It also points out few limitations of Spring implementation of AOP.
There are two chapters covering database and managing Transactions and provide some best practices e.g. use hibernate contextual session, use of template, support class to avoid boiler plate code, tips of using annotation to reduce Spring XML config. They also explain robust, simple, and clear, Spring's support for JDBC and ORM Frameworks and avoiding common boilerplate code that exists in all persistence mechanisms, also explain how Spring simplifies data access is by managing the lifecycle of database connections and ORM Framework sessions, ensuring that they are opened and closed as necessary. Provide explanation on Management of persistence mechanisms by Spring, which is virtually transparent to your application code. They also show how to build the persistence layer of a Spring application using JDBC, Hibernate, or JPA. Explain Spring transaction management, how it differs from EJB transaction, and configuring transaction manager in Spring, declarative transactions in Spring, propagation behavior, transaction isolation, annotation driven transactions and working with specific transaction management.
A chapter on web Framework was dry reading. I wish author would have covered this in more details with examples. It covers employing annotations, and how Spring MVC’s near-POJO development model makes simple work of developing controllers that handle requests and are simple to test and how controllers delegate requests to other beans in the Spring application context that are injected into the controllers using Spring's dependency injection. Also explains handler mappings that choose controllers to handle requests and view resolvers to choose how results are rendered, how MVC maintains a loose coupling between how a controller is chosen to handle a request and how its view is chosen to display output.
There is also a chapter on Overview of Spring remoting including RMI, Hessian/Blurp, Spring’s HTTP Invoker, JAX-RPC and JAX-WS. Configuring RMI service in Spring and RMI exporter and how to access them using remote client.
Overall, this is an excellent book. It is very well written. Examples are very concise and easy to follow. I can’t wait to see a final published version.
Overall Rating * * * *
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)





