The goal of Spring Web flow is to be the best solution for managing Web App page flows.
SWF integrates existing frameworks like spring MVC and JSPs for Servlets and porlet environments. If you have a business process that requires a conversational model rather than a simple request model, SWF might be the solution.
Spring's Web module contains a number of independent web support features:
Clear role-dividing. Each character--controller,validator,command object,form Object,model object, Dispatcherservlet,handler Mapping,view resolver , and so on can be implemented by specialized objects.
Powerful, straightforward framework and application classes configuration. Configuration capabilities include simple context references like from web controllers to business objects and validator.
adaptability, non-invasive, and resilient. Define any one controller method, you may only need to use a parameter annotation (like @requestparam, @RequestHeader, @PathValiable , etc.) in a particular scenario
Reusable business code that does not require duplicate replication. Use existing Business objects to act as command or form objects instead of replicating them to inherit a base class for a particular framework
Customizable bindings and validations. Type errors like application-level validation errors use provided values, localized dates, and number bindings, no longer manually binding form object conversions to business objects
Customizable handler mapping and view resolution. The Handler mapping and view resolution policies include a simple URL-based configuration to a complex, dedicated resolution strategy. Spring is more flexible than other web MVC frameworks that require the use of feature view technology.
Flexible model transfer. The model can be easily integrated with any kind of view technology through the Name/value map transfer
Customizable localization, time zone, and theme solutions, support for JSPs (using or not applicable to spring's tag library), support for JSTL, support for velocity no other build, etc.
The simple but powerful JSP tag library, the Spring tag library, provides features such as data binding and themes.
English Original:
Clear separation of roles. Each role?—? controller, Validator, Command object, Form object, model object, DispatcherServlet
handler mapping, view resolver, and S O on?—? can is fulfilled by a specialized object.
powerful and straightforward configuration of the both framework and application classes as JavaBeans. This configuration capability includes easy referencing across contexts, such as from the 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 mirroring them to extend a particular framework base C Lass.
17.1.1 Features of Spring Web MVCSpring Web Flow
Spring Web Flow (SWF) aims to be the best solution for the management of the Web application page flow.
SWF integrates with existing frameworks like Spring MVC and JSF, in both Servlet and Portlet environments. If you had a business process (or processes) that would benefit from a conversational model as opposed to a purely reques T model, then SWF could be the solution.
SWF allows you-to-capture logical page flows as self-contained modules that is reusable in different situations, and as S Uch is ideal for building Web Application modules This guide the user through controlled navigations this drive business p Rocesses.
For more information about SWF, consult the Spring Web Flow website.
Spring ' s Web module includes many unique web support features:
- Clear separation of roles. Each role?—? controller, Validator, Command object, Form object, model object,
DispatcherServlet
handler mapping, view resolver, and S O on?—? can is fulfilled by a specialized object.
- powerful and straightforward configuration of the both framework and application classes as JavaBeans. This configuration capability includes easy referencing across contexts, such as from the 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 mirroring them to extend a particular framework base C Lass.
- customizable binding and validation. Type mismatches as Application-level validation errors that keep the offending value, localized date and number binding, a nd 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 particular technique.
- Flexible model transfer. Model transfer with a name/value
Map
supports 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 This provides support for features such as data Binding and Themes. The custom tags allow for maximum flexibility in terms of markup code. For information in the tag library descriptor, see the appendix entitled Chapter, spring.tld
- A JSP Form Tag Library, introduced in Spring 2.0, this makes writing forms in JSP pages much easier. For information in the tag library descriptor, see the Appendix Entitledchapter Notoginseng, spring-form.tld
- Beans whose lifecycle is scoped to the current HTTP request or HTTP
Session
. This isn't a specific feature of spring MVC itself, but rather of the WebApplicationContext
container (s) that spring MVC uses. These bean scopes is 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 is fulfilled by a specialize D object.
powerful and straightforward configuration of the both framework and application classes as JavaBeans. This configuration capability includes easy referencing across contexts, such as from the 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 mirroring them to extend a particular framework base C Lass.
(Spring document translation) 17.1.1 Pring Web MVC features