The role of the server under Ajax (1)

Source: Internet
Author: User

In the "Ajax in Action" book, the section of the role of the "server" is seen as the core of Ajax technology to introduce, to show its importance. What is the role of server in Ajax eyes?

From the top down, the answer is: the role of the server is responsible for sending application to the browser; role two is interacting with the client, accepting requests, and returning the requested result data to the client.

If you think of such a concise answer as the top of the pyramid, what is the bottom part of the prop top? Let's take a look at several forms of the server architecture in the Web:

1. The simplest way is to have no structure. Browser each page request is processed directly, no intermediate layer exists, data processing is directly and the database occurs.

2. Architecture based on Model2 workflow. It should be said that this is a more hierarchical, better structure than the 1th. The business process is organized into a workflow form, while the workflow processing engine is assumed by a controller. Controller does not directly access the database, but it is a business data middle tier to do the interface. The design pattern of this architecture is one of MVC, when controller receives requests, processes requests, and returns results, the page content is generated by a dedicated view/pages module.

3. component-based architecture. On the server side, the application is divided into components, each representing a different business component module on the browser. Under this framework, the server side also has a centeral controller that unifies the interface browser and distributes the request to the corresponding component controller. Here, each component has its own controller to handle the business logic it is responsible for, such as database access, resulting page generation. After the request has been processed, the respective component is responsible for returning the resulting page to browser.

4. Service Oriented architecture. This architecture is service-oriented, and browser interaction with the data center, rather than content, in this framework, the Ajax client is more like a application, with the general application all the independence. Service-oriented, the reusability of business implementation, coupled to do better, and the above framework, with greater flexibility, this framework is also the most suitable for Ajax to play its characteristics.

adjourned

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.