Create an AJAX-style architecture with the IBM WEB 2.0 Feature Pack

Source: Internet
Author: User
Tags pack dojo toolkit websphere application server

This article shows how to use the Ibm®websphere®application Server Feature Pack for WEB 2.0 to enhance java™2 Platform with Ajax-style architecture, Enterprise Edition (Java EE) application. Learn how to combine Ajax-style architectures with existing applications without rewriting the entire WEB application. In addition, you will learn how to apply the WEB 2.0 Feature Pack to a Java EE application that targets IBM WebSphere application Server.

The Plants by WebSphere application is one of many sample programs that are available with IBM WebSphere application Server Feature Pack for Web 2.0. This application demonstrates a typical Java EE application and how to enhance it with an Ajax-style architecture without rewriting the entire application. This sample application is virtual with an online plant store where customers can order and purchase flowers, trees, plants, and other accessories. Figure 1 shows the home page for this WEB application:

Figure 1:plants by WebSphere Web application

Figure 2 shows the original architecture of this application before adding Ajax style features. The architecture was designed to represent a typical Java EE application that runs on a WebSphere application Server. At the high level, this application follows a Model-view-controller (MVC) design pattern, which is a pattern that many WEB applications use in varying degrees. The browser accesses the URL of the application and returns an HTML page rendered by the JSP. The browser makes an extra request to the application, which is used to control the process that the user buys the request-driven. Enterprise JavaBeans (EJB) is used to service model data that is available on the database.

Figure 2: A typical WEB architecture

Figure 3 below shows how the original architecture of the application was extended using Ajax. The goal is to not rewrite the application, using only the technology in the IBM Feature Pack to improve and create a more interactive, rich user experience.

On the browser side, the application uses the widgets provided by the JavaScript Dojo Toolkit. In addition, the custom user interface widget is created to improve the interactivity of Plants by WebSphere without overwriting it. Custom user interface widgets are asynchronous, which means that they communicate using the XHR mechanism of browsers supported by the Dojo Toolkit. These widgets use an XML Interchange format to Exchange data with the server. On the server side, the rpcadapter provided with the Feature Pack is used to convert the EJB data into an XML interchange format, which is easily used by newly created widgets on the browser.

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.