Build Web applications with spring Web flow and terracotta

Source: Internet
Author: User

Spring Web Flow introduces several stateful data fields: request, flash, flow, and conversation, which allows you to develop stateful WEB applications in new ways. It also provides an extension point for customizing application state management.

Terracotta for spring is a runtime that provides high availability for spring based applications across multiple JVM clusters. It provides transparent declarative cluster services for all domains of the spring Web flows (common spring beans also applies).

In this article we will first give you a general introduction to spring Web flow and terracotta for spring. Then show you how to use these technologies together to get into a new area of building stateful, conversational, scalable, and highly available Web applications.

What is spring Web flow?

Spring Web flow is a Web application component in the spring framework that provides an easy way to write stateful and web-based applications that are conversational. Spring Web flow makes logical processes a first-class citizen in WEB applications, allowing you to define self-contained modules to be configured and reused independently of other parts of the application. It does not rely on the framework to make it easy to use with an optional Web application framework, such as spring MVC, struts, or JSF.

Page flow is configured using a Domain definition language (DSL), which is specifically developed to define and combine page flows. The current implementation approach is XML and Java.

Spring Web Flow introduces several stateful data domains that meet a variety of user cases and requirements: request, flash, flow, and conversation, which gives you a lot of flexibility and ability to develop stateful Web applications.

Here is a quick summary of the most interesting features in 1.0 release. (from release Notes on InfoQ):

In a place instead of scattering logic in many places to define all the control logic of an application task, such as a search process.

Combine simple flows together to create a rich-control module.

Define strict user navigation rules using natural and object-oriented linear programming models, rather than lengthy if/else blocks.

But automatically clears the memory that you allocate in the flow execution when the flow ends or expires.

Deploy an executable flow in a servlet environment that uses the underlying web framework of your choice.

Change the web framework (such as struts, Spring MVC, JSF, and others) without modifying the flow definition.

Change with the environment without having to modify your flow definitions, such as testing from JUnit to portlets.

Develop your application navigation rules continuously without restarting the container.

Automatically responds correctly to browser buttons (back, forward, refresh) without the need for custom programming.

Store task data in 4 managed domains: request, flash, flow, and, conversation, each with its own unique semantics.

Separate test flow from container. Be able to ensure application control logic works before deployment.

Visualize editing your flow navigation logic diagram with Spring IDE 2.0

Sounds interesting? So far it is only a concept and a theory, but we will soon see that these can be applied in practice. So please wait a little while.

Enterprise requirements for scalability and high availability

Clusters are becoming more and more important in enterprise application development, and developers often encounter problems such as:

How do we expand on one node to improve the scalability of the application?

How can we ensure that we meet the customer's SLAs (Service level agreement) if high availability and single point of failure are ensured?

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.