Pro Spring MVC: With Web Flow

Book description

Pro Spring MVC provides in-depth coverage of Spring MVC and Spring Web Flow, two highly customizable and powerful web frameworks brought to you by the developers and community of the Spring Framework.

Spring MVC is a modern web application framework built upon the Spring Framework, and Spring Web Flow is a project that complements Spring MVC for building reusable web controller modules that encapsulate rich page navigation rules. Along with detailed analysis of the code and functionality, plus the first published coverage of Spring Web Flow 2.x, this book includes numerous tips and tricks to help you get the most out of Spring MVC, Spring Web Flow, and web development in general.

Spring MVC and Spring Web Flow have been upgraded in the new Spring Framework 3.1 and are engineered with important considerations for design patterns and expert object-oriented programming techniques. This book explains not only the design decisions of the frameworks, but also how you can apply similar designs and techniques to your own code.

This book takes great care in covering every inch of Spring MVC and Spring Web Flow to give you the complete picture. Along with all the best known features of these frameworks, you'll discover some new hidden treasures. You'll also learn how to correctly and safely extend the frameworks to create customized solutions. This book is for anyone who wishes to write robust, modern, and useful web applications with the Spring Framework.

Table of contents

  1. Title
  2. Dedication
  3. Contents at a Glance
  4. Contents
  5. Foreword
  6. About the Authors
  7. About the Technical Reviewer
  8. Acknowledgments
  9. Introduction
  10. CHAPTER 1: Configuring a Spring Development Environment
    1. Prerequisites
    2. The Sample Application
    3. SpringSource Tool Suite (STS)
    4. Summary
  11. CHAPTER 2: Spring Framework Fundamentals
    1. The Spring Framework
    2. Dependency Injection
    3. ApplicationContexts
    4. Web Applications
    5. Summary
  12. CHAPTER 3: Web Application Architecture
    1. The MVC Pattern
    2. Application Layering
    3. Separation of Concerns
    4. Spring MVC Application Layers
    5. More Roads to Rome
    6. Summary
  13. CHAPTER 4: Spring MVC Architecture
    1. DispatcherServlet Request Processing Workflow
    2. The DispatcherServlet
    3. The Spring MVC Components
    4. Summary
  14. CHAPTER 5: Implementing Controllers
    1. Introducing Controllers
    2. Request-Handling Methods
    3. Writing Annotation-based Controllers
    4. Data Binding
    5. Internationalization
    6. Summary
  15. CHAPTER 6: Implementing Controllers — Advanced
    1. Using Scoped Beans
    2. Crosscutting Concerns
    3. Extending Spring @MVC
    4. Summary
  16. CHAPTER 7: REST and AJAX
    1. Representational State Transfer (REST)
    2. Asynchronous JavaScript and XML (AJAX)
    3. Handling File Uploads
    4. Summary
  17. CHAPTER 8: Resolving and Implementing Views
    1. View Resolvers and Views
    2. View Resolvers
    3. View Technologies
    4. Summary
  18. CHAPTER 9: Testing Spring MVC Applications
    1. Introducing Testing
    2. Setting Up a Basic Unit Test
    3. Testing Code Coverage
    4. Using Spring’s Test Support
    5. Using Mock Objects
    6. Testing Your MVC Logic
    7. Automated Front-End Testing
    8. Running the Front-End Tests via Gradle
    9. Summary
  19. CHAPTER 10: Spring Web Flow
    1. Why Web Flow
    2. The Basic Ingredients of a Flow
    3. Configuration
    4. Building Your First Flow
    5. Summary
  20. CHAPTER 11: Building Applications with Spring Web Flow
    1. Important Web Flow Concepts
    2. Enhancing the Bookstore
    3. Setting Variables and Accessing Scopes
    4. Controlling Action Execution
    5. Global Transitions
    6. Subflows
    7. Further Enhancing the Bookstore
    8. Subflow Input/Output Mapping
    9. Creating the Order Process as a Subflow
    10. End State
    11. Summary
  21. CHAPTER 12: Advanced Spring Web Flow
    1. Inheritance
    2. Web Flow Configuration Customizations
    3. Web Flow 1 Migration
    4. Exception Handling
    5. Explicit Form Binding
    6. Web Flow AJAX Support
    7. Flow Execution Listeners
    8. Flow Managed Persistence Context
    9. Summary
  22. CHAPTER 13: Spring Security
    1. Introducing Security
    2. Preparing the Example Application
    3. Securing Our Bookstore
    4. Going to the Database
    5. Securing Our Flows, the Right Way
    6. Transport Security
    7. Localization
    8. Role-Based Access Control
    9. Authorizing Access
    10. Summary
  23. APPENDIX A: Cloud Foundry: Deploying to the Cloud
    1. Cloud Computing
    2. Cloud Foundry
    3. Deploying Our Application
    4. Debugging with Cloud Foundry
    5. Summary
  24. Index

Product information

  • Title: Pro Spring MVC: With Web Flow
  • Author(s):
  • Release date: June 2012
  • Publisher(s): Apress
  • ISBN: 9781430241553