Enable back navigation in a Web application

Source: Internet
Author: User

Improve the user experience with the Webflow navigation Manager Framework

The navigation of Web applications differs greatly from static Web site navigation. When navigating in a static Web site, you can use the browser's back and Forward (Forward) buttons to jump from one page to another, or to save a favorite page as a bookmark so that you are ready to return to the page. The browser's Back button allows you to navigate back through the Web site, and the browser can safely cache the Web page because the displayed page does not have to reflect the current state of the server-side application.

However, when navigating in a WEB application, things are different. Using the back or forward buttons may result in incorrect server application state. Typically, a Web browser cannot cache a Web page because the page must reflect the current state of the server application. The browser's Back button is usually not the best way for users to navigate backwards in a WEB application. A better solution is to save navigation history on the server side. WebFlow Navigation Manager Framework can do this.

WebFlow Navigation Manager Framework

The WebFlow Navigation Manager framework (which I refer to as WFNM) is a WEB framework that focuses on current frameworks, such as Struts or JavaServer Faces issues that cannot be managed. The framework does not reinvent itself, it is complementary to other frameworks and can be used with them, and can even be used for applications based on servlet and JSP pages. WFNM is published under Lesser GNU public License, so binaries that contain WFNM code can be used in any commercial WEB application.

The WFNM framework provides the following two main features for your application:

Improve back navigation for WEB applications

Automatically clean up HTTP sessions

By introducing the concept of Webflow, a well-known sequence of visited Web pages, you can improve back navigation. In fact, back navigation has been improved at two different levels:

Page level: The framework holds the server-side history of visited Web pages to facilitate the development of server-side actions that bring users back to the previous page (or reload the current page).

Webflow level: This server-side navigation history also makes it easy for users to go back to the previous Webflow, or even return to the previously visited Webflow based on the name provided.

WFNM also leverages the above features to provide an automated session cleanup mechanism that enables developers to use HTTP sessions more securely. Improper use of HTTP sessions by code can result in improper consumption of applications and physical memory. The automatic session cleanup mechanism provided by WFNM enables developers to divide HTTP sessions into different scopes and introduce a mechanism for WEB applications that resembles the garbage collector mechanism of a Java virtual machine.

A programming language without a variable scope concept, or a Java virtual machine without a garbage collector, is unimaginable. However, most WEB applications that are developed today do not have that concept. In fact, the WFNM framework is trying to solve these problems. Now, I'll show you how it works in more detail.

Server-side navigation history for Web pages

To better understand the motives behind WFNM, take a look at the following examples. Suppose you have a WEB application with navigation as shown in Figure 1. The application consists of 4 pages: B1, B2, B3, and B4.

Figure 1. Pages B1, B2, B3, and B4

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.