SpringMVC advantage

Why use SpringMVC

1. Ease and the Spring framework

2. Support restful style request

3. Provide a powerful configuration is greater than the agreed contract programming support

Clear separation of roles:

The controller (controller), the validator (validator), command object (command obect), form object (form object), the object model (model object), Servlet distributor (DispatcherServlet), the mapping processor (handler mapping), trying to parse device (view resoler) and so on. Each role can be implemented by a special object.

Powerful and straightforward configuration:

Both framework and application classes as JavaBean configuration can support context across multiple references, for example, references to the controller in the web business objects and validators Validator) a.

Adaptable, non-invasive:

According to different application scenarios, the selection controller anything subclass (simple type, command type, from type, Wizard type, multi-action or a custom type), instead of a single controller (such as Action / ActionForm) inheritance.

Business can code reuse:

Existing business objects can be used as a command or form objects, without the need to extend the base class for a particular frame.

Customizable binding (binding) and validation (validation):

Type mismatches such as application-level validation errors, which can ensure the error value. Another example is localized date and number binding, etc. In some other framework, you can only use the string form objects with manual parsing and conversion to business objects.

Guess you like

Origin blog.csdn.net/Rm_and_Rf/article/details/90411279