(Spring document translation) 17.1.1 pring Web MVC features

Source: Internet
Author: User
Tags tld

(Spring document translation) 17.1.1 pring Web MVC features

Spring Web Flow aims to become the best solution for managing web application webpage streams.

SWF integrates existing frameworks such as Spring MVC and JSP, and is applicable to Servlet and Porlet environments. If you have a business flow that requires a conversational model instead of a simple request model, SWF may be the solution.

Spring's web module contains many independent web support features:

  • Clear roles. Each role-controller, validator, command object, form object, model object, DispatcherServlet, handler mapping, view resolver, and so on can be implemented by specialized objects.
  • Powerful and direct framework and application classes configuration. Configuration capabilities include simple context references from web controller to Business Objects and validator.
  • Adaptability, non-adequacy, and elasticity. Define any controller method. In a specific scenario, you may only need to use a parameter annotation (such as @ RequestParam, @ RequestHeader, @ PathValiable, etc)
  • Reusable business code, which does not need to be duplicated. Use existing business objects to act as command or form objects instead of copying them to inherit the base class of a specific framework
  • Customizable binding and verification. Type errors such as application-level verification errors use provided values, localization dates, and numbers, instead of manually converting form objects to business objects.
  • Customizable handler mapping and view resolution. Handler mapping and view resolution policies include simple URL-based configuration and complex dedicated solutions. Spring is more flexible than other web MVC frameworks that require feature view technology.
  • Flexible Model transmission. The model is transmitted through Map of name/value, which can be easily integrated with any view technology.
  • Customizable localization, time zone, and topic solutions, supporting JSP (use or not applicable to Spring tag library), JSTL, and Velocity without additional setup.
  • Simple but powerful JSP tag library, Spring tag library, provides features such as data binding and themes.


    Original English:

  • Clear separation of roles. Each role? -? Controller, validator, command object, form object, model object,DispatcherServlet, Handler mapping, view resolver, and so on? -? Can be fulfilled by a specialized object.
  • Powerful and straightforward configuration of both framework and application classes as JavaBeans. This configuration capability extends des easy referencing extends SS contexts, such as from web controllers to business objects and validators.
  • Adaptability, non-intrusiveness, and flexibility.Define any controller method signature you need, possibly using one of the parameter annotations (such as @ RequestParam, @ RequestHeader, @ PathVariable, and more) for a given scenario.
  • Reusable business code, no need for duplication. Use existing business objects as command or form objects instead of using ing them to extend a particle framework base class.
    17.1.1 Features of Spring Web MVC

    Spring Web Flow

    Spring Web Flow (SWF) aims to be the best solution for the management of web application page flow.

    SWF integrates with existing frameworks like Spring MVC and JSF, in both Servlet and Portlet environments. if you have a business process (or processes) that wowould benefit from a conversational model as opposed to a purely request model, then SWF may be the solution.

    SWF allows you to capture logical page flows as self-contained modules that are reusable in different situations, and as such is ideal for building web application modules that guide the user through controlled navigations that drive business processes.

    For more information about SWF, consult the Spring Web Flow website.

    Spring's web module includes incluunique web support features:

    • Clear separation of roles. Each role? -? Controller, validator, command object, form object, model object,DispatcherServlet, Handler mapping, view resolver, and so on? -? Can be fulfilled by a specialized object.
    • Powerful and straightforward configuration of both framework and application classes as JavaBeans. This configuration capability extends des easy referencing extends SS contexts, such as from web controllers to business objects and validators.
    • Adaptability, non-intrusiveness, and flexibility.Define any controller method signature you need, possibly using one of the parameter annotations (such as @ RequestParam, @ RequestHeader, @ PathVariable, and more) for a given scenario.
    • Reusable business code, no need for duplication. Use existing business objects as command or form objects instead of using ing them to extend a particle framework base class.
    • Customizable binding and validation. Type mismatches as application-level validation errors that keep the offending value, localized date and number binding, and so on instead of String-only form objects with manual parsing and conversion to business objects.
    • Customizable handler mapping and view resolution. Handler mapping and view resolution strategies range from simple URL-based configuration, to sophisticated, purpose-built resolution strategies. Spring is more flexible than web MVC frameworks that mandate a participant technique.
    • Flexible model transfer. Model transfer with a name/valueMapSupports easy integration with any view technology.
    • Customizable locale, time zone and theme resolution, support for JSPs with or without Spring tag library, support for JSTL, support for Velocity without the need for extra bridges, and so on.
    • A simple yet powerful JSP tag library known as the Spring tag library that provides support for features such as data binding and themes. The custom tags allow for maximum flexibility in terms of markup code. For information on the tag library descriptor, see the appendix entitled Chapter 36,Spring. tld
    • A jsp form tag library, introduced in Spring 2.0, that makes writing forms in JSP pages much easier.For information on the tag library descriptor, see the appendix entitledChapter 37,Spring-form.tld
    • Beans whose lifecycle is scoped to the current HTTP request or HTTPSession.This is not a specific feature of Spring MVC itself, but rather ofWebApplicationContextContainer (s) that Spring MVC uses. These bean scopes are described in Section 5.5.4, "Request, session, and global session scopes" 17.1.2 Pluggability of other MVC implem

    • Clear separation of roles. Each role? -? Controller, validator, command object, form object, model object,DispatcherServlet, Handler mapping, view resolver, and so on? -? Can be fulfilled by a specialized object.
    • Powerful and straightforward configuration of both framework and application classes as JavaBeans. This configuration capability extends des easy referencing extends SS contexts, such as from web controllers to business objects and validators.
    • Adaptability, non-intrusiveness, and flexibility.Define any controller method signature you need, possibly using one of the parameter annotations (such as @ RequestParam, @ RequestHeader, @ PathVariable, and more) for a given scenario.
    • Reusable business code, no need for duplication. Use existing business objects as command or form objects instead of using ing them to extend a particle framework base class.

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.