Let's conclude with a quick summary of where you can go to learn more about some of the material covered in this book.
This has predominantly been a practical book, and although we've covered some theory, we haven't had space to describe all the concepts in detail. We recommend the following books for further reading on some of the major topic areas in this book:
Dependency Injection: Chapter 3 should have you well up and running. If you want more theoretical and conceptual background, you can refer to the coverage of IoC and Dependency Injection in Chapter 6 of J2EE without EJB. However, you should not need to do any further reading to be productive with the Spring IoC container. You can best build your understanding of Dependency Injection through practical experience.
AOP: Ramnivas Laddad's excellent AspectJ in Action (Manning, 2003) gives a good introduction to AOP, and is particularly relevant if you're considering using AspectJ along with Spring. Adrian Colyer's Eclipse AspectJ: Aspect-Oriented Programming with AspectJ and the Eclipse AspectJ Development Tools (Addison-Wesley, 2005) includes an example of AspectJ/Spring integration from an AspectJ perspective, and is a good practical guide to AspectJ, from its lead developer. Chapter 8 of J2EE without EJB ("Declarative Middleware Using AOP Concepts") provides a conceptual background on the motivation of using an AOP approach to solve common middleware problems.
OO design: The classic text here is Design Patterns (Gamma, Helm, Johnson, and Vlissides, [Addison-Wesley, 1995]). Every OO developer should read this book. Spring makes it easier to apply many of the best practices described here. Chapter 4 of Expert One-on-One J2EE Design and Development (Johnson, 2002) is also helpful in discussing issues around OO design in J2EE applications. We also recommend Domain Driven Design by Eric Evans (Addison-Wesley, 2003).
Web frameworks: Spring Live by Matt Raible (SourceBeat, 2004) has good coverage of using Spring with different web frameworks.
O/R mapping: Both Hibernate and iBATIS have excellent reference documentation that is available from the projects' respective home pages. There is also a range of books available on Hibernate, JDO, and other O/R mapping products.
There is much useful information about Spring online. You should refer to the Reference Manual and the JavaDoc available from www.springframework.org.
The Spring forums (forum.springframework.org) are active and a good place to go to ask questions. Be sure to use the search facility first, in case the question has been asked — and answered — before!
The Spring-developer mailing list is the place to go if you want to contribute ideas or patches to Spring, or discuss implementation issues with the core team. Subscribe by following the mailing list links from the Spring home page. Note that the Spring developer list is not intended for asking questions about how to use Spring, unless the questions concern framework implementation and design issues.
In addition to our box office sample application, we recommend that you study the following sample applications included in the Spring distribution.
These applications are suitable for use as templates. You can get them running quickly, and then keep the basic structure as you change the implementation to your own domain.
This is a good example of a web application using Spring and iBATIS. The comparison with Sun's EJB- based Java Pet Store is particularly illuminating.
Note the alternative configurations that show use with a JNDI-bound, container-managed datasource with JTA, and local JDBC transactions for use in a simple web container with a single database. There is also an alternative configuration showing the use of annotations, rather than XML metadata, to drive declarative transaction management.
This application includes good examples of the use of Spring's lightweight remoting, exporting services over a range of protocols without any change to the core business model.
The web tier includes both Spring MVC and Struts implementations. This is an excellent place to look if you are already familiar with Struts and want to see what Spring MVC has to offer.
This is a simple web application using Spring's data access abstraction with a variety of underlying persistence technologies. Hibernate, Spring JDBC, and Apache OJB are supported, demonstrating how the use of DAO interfaces we recommend can successfully isolate business objects from the persistence layer. The PetClinic also illustrates use of the org.springframework.test package for quick, effective integration testing outside an application server.
This is a web application showing more advanced use of Spring's JDBC abstraction. The principal functionality concerns BLOB writing and reading.
This application also demonstrates Spring's integration with the popular open source Quartz scheduler.
The web tier is implemented using Spring MVC.
There are also a number of sample applications using Spring on the web, such as Matt Raible's AppFuse, although these are not authored or endorsed by the Spring team.