AJAX: Asynchronous Java + XML?
From a software architecture point of view, following are ways in which AJAX differs from today's Web application architecture by adding a client-side engine:
- Use of a client-side engine as an intermediate between the User Interface (UI) and the server;
- User activity leads to program calls to the client-side engine instead of a page request to the server;
- XML data transfer between server and the client-side engine.
The client engine is the key to the AJAX model. Without this engine, every user event must go back to the server for processing. User interaction is tightly coupled with server communications—the client engine unlocks this dependency. This engine, while running inside a Web browser, gives the browser the "extra" intelligence to perform a "partial screen update" instead of a "full page refresh." This engine also communicates with the server in the background, decoupling user interaction from server communications.
Figure 3: Classic Web Application Architecture
Figure 4: Ajax Architecture
Different Technology Options for AJAX
The Java approach ("Asynchronous Java + XML")
The Java approach typically uses a browser-based lightweight Java engine for client side processing, such as UI rendering, performing partial screen refresh and asynchronous server communication. In this approach, the UI can be defined using XML, whereas client-side application logic is programmed using standard Java.
Examples available over the Internet include:
- Artstor.org (http://www.artstor.org): a digital library of hundreds of thousands of pieces of art work and related tools.
- Map of the Market (http://www.smartmoney.com/marketmap/): an interactive map showing an aerial view of 1,000 U.S. and international stocks
The Flash approach ("Asynchrounous ActionScript + SWF")
The Flash approach typically uses a browser-based Flash engine with an ActionScript library for client side processing. In this approach, the UI is typically defined using SWF (a Macromedia proprietary binary format for defining Flash based movies) on the client side, and the client-side application logic is programmed using ActionScript.
Some examples include BroadMoor Hotel (http://www.broadmoor.com/), a Flash-based interactive hotel reservation system.
Strength and Weakness of Different Options
Each of the three AJAX options has its own strengths and weaknesses, making each one suitable for different applications. The following table summarizes their strengthes and weaknesses:
||Requires Java programming skills|
The Java approach is capable of delivering good performance and functionality due to binary execution, multi-threaded computing, and the industrial strength of Java Virtual Machine. Applications written in Java are easy to develop and maintain because of the object-oriented programming nature of Java. It is good for enterprise Java developers who have Java programming skills. On the other hand, the Java programming skills requirement is also its weakness, because developer skill set requirements are higher than scripting. Historically, JVM compatibility in various browsers has been a significant issue for this approach. However, there are solutions available for these problems. One solution is to utilize a lightweight, JDK 1.1-compatible Java engine that is guaranteed to run inside all browser-based JVMs. This Java engine would abstract developers away from the traditional problems, enabling the development and universal deployment of Web applications by leveraging the strength of Java.
Page 2 of 3