Book description
The Spring Framework is a major open source application development framework that makes Java/J2EE(TM) development easier and more productive. This book shows you not only what Spring can do but why, explaining its functionality and motivation to help you use all parts of the framework to develop successful applications.
You will be guided through all the Spring features and see how they form a coherent whole. In turn, this will help you understand the rationale for Spring's approach, when to use Spring, and how to follow best practices. All this is illustrated with a complete sample application. When you finish the book, you will be well equipped to use Spring effectively in everything from simple Web applications to complex enterprise applications.
What you will learn from this book
The core Inversion of Control container and the concept of Dependency Injection
Spring's Aspect Oriented Programming (AOP) framework and why AOP is important in J2EE development
How to use Spring's programmatic and declarative transaction management services effectively
Ways to access data using Spring's JDBC functionality, iBATIS SQL Maps, Hibernate, and other O/R mapping frameworks
Spring services for accessing and implementing EJBs
Spring's remoting framework
Who this book is for
This book is for Java/J2EE architects and developers who want to gain a deeper knowledge of the Spring Framework and use it effectively.
Wrox Professional guides are planned and written by working programmers to meet the real-world needs of programmers, developers, and IT professionals. Focused and relevant, they address the issues technology professionals face every day. They provide examples, practical solutions, and expert education in new technologies, all designed to help programmers do a better job.
Table of contents
- Copyright
- About the Authors
- Credits
- Acknowledgments
- Introduction
- 1. Introducing the Spring Framework
-
2. The Bean Factory and Application Context
- 2.1. Inversion of Control and Dependency Injection
-
2.2. The Container
- 2.2.1. The Bean Factory
- 2.2.2. The Application Context
- 2.2.3. Starting the Container
- 2.2.4. Using Beans from the Factory
- 2.2.5. XML Bean Configuration
- 2.2.6. The Basic Bean Definition
- 2.2.7. Specifying Bean Dependencies
- 2.2.8. Managing the Bean Lifecycle
- 2.2.9. Abstracting Access to Services and Resources
- 2.2.10. Reusing Bean Definitions
- 2.2.11. Using Post-Processors to Handle Customized Beans and Containers
- 2.3. Summary
-
3. Advanced Container Concepts
- 3.1. Abstractions for Low-Level Resources
- 3.2. Application Events
- 3.3. Managing the Container
- 3.4. Some Convenience Factory Beans
- 3.5. Property Editors Provided by Spring
- 3.6. Strategies for Testing
- 3.7. Alternatives to XML
- 3.8. References
- 3.9. Summary
-
4. Spring and AOP
- 4.1. Goals
- 4.2. Assumptions
- 4.3. Example
-
4.4. Spring's AOP Framework
- 4.4.1. The Interceptor Chain
- 4.4.2. Pros and Cons
- 4.4.3. Advice
- 4.4.4. Pointcuts
- 4.4.5. Advisors
- 4.4.6. Integration with the Spring IoC Container
- 4.4.7. Examining and Manipulating Proxy State at Runtime
- 4.4.8. Programmatic Proxy Creation
-
4.5. Using Advanced Features of Spring's AOP Framework
- 4.5.1. TargetSources
- 4.5.2. Terminating the Interceptor Chain Early
- 4.5.3. Using Introduction
- 4.5.4. Exposing the Current Proxy
- 4.5.5. Exposing the Current MethodInvocation
- 4.5.6. Understanding Proxy Types
- 4.5.7. Debugging and Testing
- 4.5.8. Miscellaneous
- 4.6. Integration with Other AOP Frameworks
- 4.7. References
- 4.8. Summary
-
5. DAO Support and JDBC Framework
- 5.1. The Data Access Object Pattern
- 5.2. Introducing Spring's JDBC Framework
- 5.3. Building the Data Access Layer for the Sample Application
- 5.4. Operations with JdbcTemplate
- 5.5. Using the RDBMS Operation Classes
- 5.6. Advanced Concepts
- 5.7. Additional Considerations
- 5.8. Summary
-
6. Transaction and Resource Management
- 6.1. Background
- 6.2. Transactions and J2EE
- 6.3. An Example of Spring's Transaction Support
-
6.4. Introducing Spring's Transaction Abstraction
- 6.4.1. Overview of Choices for Transaction Control
- 6.4.2. Transaction Definition
- 6.4.3. Transaction Status
- 6.4.4. Transaction Demarcation Strategies
- 6.4.5. Transaction Management Strategies
- 6.5. DataSource Declarations
- 6.6. Summary
-
7. Object/Relational Mapping
- 7.1. Background
- 7.2. O/R Mapping Support in Spring
- 7.3. iBATIS SQL Maps
- 7.4. Hibernate
- 7.5. JDO
- 7.6. Other O/R Mapping Tools
- 7.7. Summary
- 8. Lightweight Remoting
-
9. Supporting Services
- 9.1. JMS
- 9.2. Scheduling with Spring
- 9.3. Sending Email with Spring
- 9.4. Scripting
- 9.5. Summary
- 10. Acegi Security System for Spring
- 11. Spring and EJB
-
12. Web MVC Framework
- 12.1. A Simple Example
- 12.2. General Architecture
- 12.3. Infrastructural Components
- 12.4. Workflow Involved with Handling Requests
- 12.5. Common Layout of a Spring MVC Web Application
- 12.6. HandlerMappings
- 12.7. HandlerExecutionChain and Interceptors
- 12.8. Handlers and Their Adapters
- 12.9. ModelAndView and ViewResolvers
- 12.10. Locale Changing and Resolution
- 12.11. HandlerExceptionResolvers
- 12.12. Controllers
- 12.13. Data Binding
- 12.14. Real-World Examples of Using Controllers
- 12.15. Wizard Functionality
- 12.16. Extending Spring's Handler Infrastructure
- 12.17. Uploading Files
- 12.18. Testing Your Controllers
- 12.19. Summary
-
13. Web View Technologies
- 13.1. An Example
- 13.2. Considerations When Choosing a Technology
- 13.3. View Objects and Models
- 13.4. Features Offered by the AbstractView
- 13.5. JavaServer Pages
- 13.6. Velocity and FreeMarker
- 13.7. Tiles
- 13.8. Views Based on XML and XSLT
- 13.9. Excel and Other Document-Based Views
- 13.10. Implementing Custom Views
- 13.11. Summary
-
14. Integrating with Other Web Frameworks
- 14.1. Considerations When Choosing an MVC Framework
- 14.2. Integrating with Spring: Core Concepts
- 14.3. WebWork Integration
- 14.4. Struts Integration
- 14.5. Tapestry Integration
- 14.6. JavaServer Faces Integration
- 14.7. Summary
- 15. The Sample Application
-
16. Conclusion
- 16.1. Problems Solved by Spring
- 16.2. The Spring Solution
- 16.3. Guidelines for Spring Development
- 16.4. Related Projects
- 16.5. Spring in Non-J2EE Environments
- 16.6. To Find Out More
- 16.7. The Future
- A. Requirements for the Sample Application
Product information
- Title: Professional Java™ Development with the Spring Framework
- Author(s):
- Release date: July 2005
- Publisher(s): Wrox
- ISBN: 9780764574832
You might also like
video
Spring MVC for Java Developers
This screencast is designed to teach novice-level Java developers how to efficiently build well structured Java …
video
Spring Framework Essentials
This video's accompanying source code can be found in the eGitHub repository https://github.com/kousen/Spring-Framework-Essentials. Anyone who writes …
book
Modern API Development with Spring and Spring Boot
A developer's guide to designing, testing, and securing production-ready modern APIs with the help of practical …
book
Pro Spring 5: An In-Depth Guide to the Spring Framework and Its Tools
Master Spring basics and core topics, and share the authors’ insights and real–world experiences with remoting, …