Chapter 12: Web MVC Framework


Overview

Spring provides a web framework based on the Model-View-Controller (MVC) paradigm. Although it is similar in some ways to other popular MVC frameworks such as Struts and WebWork, we believe that Spring Web MVC provides significant advantages over those frameworks. Spring MVC provides out-of-the-box implementations of workflow typical to web applications. It is highly flexible, allowing you to use a variety of different view technologies. It also enables you to fully integrate with your Spring-based, middle-tier logic through the use of the Dependency Injection features you've already seen.

You can use Spring Web MVC to make services created with other parts of Spring available to your users by implementing web interfaces. This chapter gives you an overview of the architecture of Spring's Web MVC framework as well as the implementation of concepts such as model, view, and controller. After studying some of the most important infrastructural components, we'll continue to guide you through a couple of practical scenarios in which we'll use most of the components explained earlier.

After reading this chapter you will have learned the basics about workflow in a Spring-based web application. You'll be able to implement your own controllers handling common tasks such as form submissions, validation, data binding, and uploading files. You will also have an overall insight into all of Spring's web-related functionality, including the way Spring MVC enforces best practices when using JavaServer Pages and how it can be used along with appropriate third-party libraries to generate Excel spreadsheets, PDF documents, and other content types.



Professional Java Development with the Spring Framework
Professional Java Development with the Spring Framework
ISBN: 0764574833
EAN: 2147483647
Year: 2003
Pages: 188

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net