[08/27/2010]Summary of Introduction to Spring MVC

–> original link <–

The Spring Framework is light-weight container, supporting multiple frameworks and libraries.

The Spring MVC:
–  Takes the advantage of Spring framework
–  Web development framework based on the MVC design pattern.
– Features: Pluggable View technology and Injection of services into controllers.

Pluggable View technology: view technologies such as JSP, Titles, Velocity,… Spring framework allows us to use these technologies.

Injection of services into controllers: IoC container provides the important functionality of the dependency injection. This helps the programmer to inject the dependency such as business service at runtime -> save a lot of code duplication and coding effort.

Spring’s MVC components:
Model:
———
The class org.springframework.ui.ModelMap is used to hold the data. It wraps the business data into rg.springframework.ui.ModelMap class and then pass it to the view.

View:
——-
Framework provides pluggable view, allow dev to create views using jsp, velocity, jasper templates. In Spring MVC Logical view and Model are represented in the object of the class org.springframework.web.servlet.ModelAndView.

Controller:
————-
The controller is responsible for handling all the requests from the user and then process the user request. Here are the list of controllers available in the Spring 2.5 framework:
1.SimpleFormController
2.AbstractController
3.AbstractCommandController
4.CancellableFormController
5.AbstractCommandController
6.MultiActionController
7.ParameterizableViewController
8.ServletForwardingController
9.ServletWrappingController
10.UrlFilenameViewController
11.AbstractController
12.AbstractCommandController
13.SimpleFormController
14.CancellableFormController.

Advertisements
By Cú mập cận Posted in Spring

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s