Expert Spring MVC and Web Flow

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Expert Spring MVC and Web Flow 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 new project that compliments 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, 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 are engineered with an important consideration 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.

From beginner to expert, this book is for anyone who wishes to write robust, modern, and useful web applications with the Spring Framework.

Table of Contents

  1. Introduction
  2. Spring Fundamentals
  3. Spring MVC Application Architecture
  4. Jump into Spring MVC
  5. The Processing Pipeline
  6. The Controller Menagerie
  7. The View Layer
  8. Supported View Types
  9. Validation
  10. Testing Spring MVC Applications
  11. Introduction to Spring Web Flow
  12. Advanced Spring Web Flow

Author(s): Colin Yates, Seth Ladd, Steven Devijver, Darren Davison
Edition: 1
Publisher: Apress
Year: 2006

Language: English
Pages: 424

Contents......Page 6
About the Authors......Page 13
About the Technical Reviewers......Page 15
Acknowledgments......Page 16
CHAPTER 1 Introduction......Page 17
Roadmap......Page 18
For More Information......Page 20
Spring 2.0......Page 21
Summary......Page 22
Inversion of Control......Page 23
IoC Example......Page 24
Summary......Page 26
Dependency Injection......Page 27
Service Locator......Page 28
Dependency Injection......Page 30
Spring ApplicationContexts......Page 33
The Return of the POJO......Page 34
Summary......Page 35
Layers of Abstractions......Page 36
Java Interface As Layer Contract......Page 38
Layers in a Spring MVC Application......Page 39
Options: There’s More Than One Way to Do It......Page 53
Summary......Page 54
Use Cases......Page 55
Use Case #1......Page 56
Use Case #2......Page 59
JAR Dependencies......Page 64
Views......Page 66
Spring MVC Components......Page 67
Web Application Configuration......Page 72
Request Handling Sequence......Page 77
Summary......Page 78
SimpleFormController......Page 79
SearchFlightsController......Page 81
Form View......Page 83
Spring JSP Tags......Page 86
Success View......Page 87
Summary......Page 88
Now Let’s Learn How to Swim......Page 89
Request Work Flow......Page 90
Functionality Overview......Page 91
Pieces of the Puzzle......Page 92
Summary......Page 127
Introduction......Page 128
A Look at Design......Page 129
AbstractController......Page 131
BaseCommandController......Page 135
Binding a Form to a Bean......Page 137
Summary......Page 161
SimpleFormController and Handling Forms......Page 162
Redirect After Submit Pattern......Page 177
MultiActionController......Page 181
AbstractWizardFormController......Page 189
ThrowawayController......Page 206
HandlerInterceptors......Page 209
HandlerInterceptor Example......Page 210
Summary......Page 211
Controllers Summary......Page 212
What’s in a View......Page 214
Spring’s View Interface......Page 215
Implementing View......Page 216
Views and Controllers: Happily Divorced......Page 220
ViewResolvers......Page 221
Putting View Resolution in Context......Page 222
Types of ViewResolver......Page 223
Making ViewResolvers Known to the Dispatcher......Page 226
A Word on Redirecting......Page 228
Themes......Page 229
ThemeSources......Page 230
Locale Resolution......Page 231
MessageSource Beans......Page 232
View Resolution......Page 233
Bind Support in View Templates......Page 234
Summary......Page 235
JSP and JSTL......Page 236
Exposing the Model As Request Attributes......Page 237
Displaying the Model......Page 238
JSP Tag Libraries......Page 240
Forms......Page 241
Tiles......Page 246
Templating Pros and Cons......Page 248
Basic Configuring for Template Engines......Page 249
The Template Language......Page 251
Advanced Configuration Options......Page 252
Forms and the SpringBind Macros......Page 254
Number and Date Tools......Page 260
Summary......Page 262
Defining an XSLT View......Page 263
Transforming the XML Source......Page 265
Other Noteworthy XSLT Features......Page 267
Summary......Page 268
PDF......Page 269
Template PDFs with FOP......Page 270
Creating the Template......Page 271
Coding the View......Page 272
JasperReports......Page 273
Multiformat View......Page 274
Populating the Report......Page 275
Creating New Views......Page 276
Summary......Page 277
Programmatic Validators......Page 278
Declarative Validators......Page 280
Message Sources......Page 291
Errors Interface......Page 292
Testing Validators......Page 294
Summary......Page 295
Unit Tests......Page 296
Integration Tests......Page 315
Testing Summary......Page 321
What Itch Does Spring Web Flow Scratch?......Page 322
The Problem with the Servlet Specification......Page 323
The Solution......Page 324
The Big Picture......Page 327
Inside the Spring Web Flow System......Page 328
Building Blocks......Page 329
Proposed Flow Directory Structure......Page 332
Transitions......Page 333
Actions......Page 334
Action Bean Definitions......Page 335
Extending AbstractFlowExecutionTests......Page 337
Decision States......Page 339
Action States......Page 340
End States......Page 341
The Purchase Product Flow: What’s Next......Page 342
FlowRegistry......Page 343
View Template Requirements......Page 344
Launching the Flow from the Browser......Page 345
Model Conversations......Page 346
Identifying Flows (Easy, Natural Language)......Page 347
Business Logic......Page 348
Subflows......Page 350
Inline Flows......Page 356
Summary......Page 358
Integration with Web Frameworks......Page 359
The FlowExecutionManager......Page 360
FlowExecutions......Page 361
FlowExecutionListener......Page 364
FlowExecution Repositories......Page 366
Continuations......Page 367
Stateful FlowExecution Repositories......Page 369
Stateless FlowExecution Repositories......Page 370
States and Transitions Revisited......Page 371
Action States......Page 372
POJO Actions......Page 375
Customizing View Selection with View States and End States......Page 376
Decision States......Page 378
Exception Handling......Page 380
Summary......Page 382
BeanDoc......Page 383
Installing and Building BeanDoc......Page 384
Running BeanDoc on Your Configuration Files......Page 385
Controlling the Output......Page 386
Summary......Page 387
Spring and DWR......Page 388
Configuration and Code Changes......Page 389
Presentation File Changes......Page 392
Accessibility......Page 398
Summary......Page 399
A......Page 400
C......Page 401
E......Page 403
F......Page 404
H......Page 405
J......Page 406
M......Page 407
O......Page 408
P......Page 409
S......Page 410
U......Page 413
V......Page 414
Y......Page 415