Does Ajax have a future?

Source: Internet
Author: User
Tags object model

"IT168" Ajax is a combination of several sophisticated technologies designed to give users a more satisfying user experience from Web applications. This paper reviews the evolution of enterprise application architecture and tries to expound that Ajax is the inevitable product of B/s architecture development, but Ajax seems to have a bleak future because of the congenitally deficient JavaScript programming language that Ajax relies on for survival. From the perspective of middleware, the author of this paper makes his own predictions about the future of Ajax.

1. What is Ajax

The full name of Ajax is asynchronous JavaScript and XML, which is asynchronous JavaScript and XML. This is a combination of a number of mature technologies designed to give Web applications the ability to interact quickly and instantaneously with users. The technologies that Ajax combines, including:
Javascript,java scripting Language (note that this Java non-sun company Java)
dhtml,dynamic HTML, Dynamic HTML
xml,extensible Markup Language, Extensible Markup Language
css,cascading style Sheets, cascading style sheets
Dom,document object model, document objects
• Microsoft's object, called XMLHttpRequest

With Ajax technology, users will feel that a Web page is as responsive as a normal desktop application, rather than as a traditional web page, and that any operation needs to wait for the page to refresh. How does Ajax do that? There are two secrets: First, Ajax will also refresh the page, except that Ajax can only refresh part of the page, rather than the entire page; second, the Ajax page refresh is asynchronous, that is, the user can continue his other operations without waiting for the refresh to complete.

When a user browses to an AJAX-based Web application, the user's request is submitted to a proxy called the Ajax Engine (Ajax Engine), which is responsible for receiving user requests, getting responses from the Web server, and updating the browser content. Figuratively speaking, in traditional Web applications, browsers are directly dealing with the Web server, and in AJAX applications, browsers and Web servers appear between the "intermediary", and the "intermediary" is quite diligent, so that the browser can provide better service, So that users can obtain a more satisfactory application experience.

Examples of AJAX applications, Google map is a typical. Open the Google Map site (http://maps.google.com), you will see a map, zoom in on the map, zoom in and drag, and so on, the response of the Web page is very fast, it looks like the browser loaded the whole map in advance. In fact, the browser just according to your operation, to the server to request you see the data, and asynchronously update your browser content, all this, thanks to Ajax.

JavaScript and Microsoft's XMLHttpRequest object are the two legs of the Ajax engine. When interacting with the browser, the Ajax engine uses the JavaScript language, and when interacting with the Web server, the Microsoft XMLHttpRequest object is used. Because Ajax engines rely on Microsoft's XMLHttpRequest object technology, only Microsoft's IE browsers supported Ajax in the early days. Now, with the advent of AJAX-enabled Web apps, all the mainstream browsers, such as Firefox, Netscape, Opera, and Safari, also support Ajax.

2. The evolutionary process of enterprise application architecture

In the author's opinion, the advent of Ajax is not accidental. To illustrate this point, let's review the history of computer Application architecture, which may help us uncover the origins of Ajax.

The earliest computer application, is a stand-alone program, running on a computer, then there is no communication between computers and computers concept, because stand-alone applications are enough to meet the needs of people. Therefore, the two computers even in the same laboratory, but also "machine" dog smell, ways.

People's desire is never satisfied, stand-alone applications did not last long, the need for exchanging data between the two computers, with the expansion of the scope of computer applications appeared. In the PC field, the initial computer data interaction form is serial communication, and later, with Novell's famous NetWare network technology launched, running on two different machines, the program has more convenient interaction channels, so there are clients and servers, that is, the so-called client/ Server structure, referred to as C/s structure. The C/s structure is also known as the "two-terminal" architecture because it divides the application into two parts.

After several years, the C/s structure is popular it has been found that just dividing the two roles of "Client" and "server" is not enough, because as the application complexity increases, the client and server become larger, so the three-terminal architecture comes out and adds a call between the server and the client. "End" of middleware (middleware). In the three-terminal architecture, some of the functions (primarily application logic) that were spread over the "client" and "server" were slowly shifted to the middleware, which effectively reduced the burden of "client" and "Server", and the system's architecture was rebalanced.

The three-terminal architecture is now the de facto standard for enterprise applications, which is determined by the adaptability of the three-terminal architecture. Three, middleware is the most flexible, on the one hand can assume a part of the client tasks, to help build Low-cost "thin" client; On the other hand, some common services can be moved from the server to the middleware, so that the server's function more single-minded to improve performance. Middleware technology, as the core technology of the three-terminal architecture, has spawned many software companies with middleware as the main product, and the fierce competition makes the middleware technology become more and more mature.

Since then, although there is a so-called multi-terminal (Ntier) architecture, is essentially a three-port, the difference is only an application contains more than one middleware and server, but more than one middleware, multiple servers, or even a variety of clients.

3. Ajax is a B/s structure to the three-terminal system structure of the product of evolution

In the process of evolving the client/server architecture to the client/middleware/server architecture, a simpler architecture emerges with the wide application of Internet technology, which is called the "browser/server (browser/server)" architecture, referred to as B/s. Once the B/s structure appears, because it does not need to develop the client, can greatly reduce the enterprise application of client deployment and maintenance of the cost of the advantages of rapid access to software enterprises and their customers of all ages. Now, b/s structure is the most popular application architecture, whether it is a large enterprise application or small personal application, b/s structure is the preferred architecture, almost become the "default" choice of IT industry, even when we talk about a certain application, do not need to specify what the architecture is.

If the B/s structure as a variant of C/s structure (some people may not agree, hehe, just the author's personal opinion), then, we can find that B/s structure is not a three-terminal architecture. In the B/s structure, as a "client" browser and as a "server" Web servers, is directly interactive, and no middleware intervention, enterprise application business logic, either resides in the server (including Web servers, database servers, etc.), or browser as a container, there is no other place. Therefore, from the "end" point of view, b/s structure is actually "two-terminal", like C/s structure.

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.