Dwr design mode in atitit. php

Source: Internet
Author: User
Dwr design mode in atitit. php atitit. dwr design mode in php

1. Advantages of dwr compared with ajax .. 1

2. how DWR works 1

3. php dwr implementation 1

4. Reference 3

1. Advantages of dwr compared with ajax ..

Dwr is built on ajax .. More dsl-based ..

It greatly simplifies the workload of compiling ajax.

2. working principle of DWR

The Java class is generated as Javascript dynamically. Its code is like Ajax. you feel like calling occurs on the browser side, but actually code calling occurs on the server side. DWR is responsible for data transmission and conversion. This remote call function from Java to JavaScript enables DWR to use a common RPC mechanism like RMI or SOAP, the advantage of DWR is that it can run on a webpage without any web browser plug-ins.

Java is basically a synchronization mechanism, but AJAX is asynchronous. So when you call a remote method, when the data has been returned from the network, you need to provide DWR with the callback function.

DWR places an engine. js on the client as the client engine, and a dwr. jar on the Server as the Server engine.

Then, it can be described in RPC mode.

Author: old Wow's paw Attilax iron, EMAIL: 1466519819@qq.com

3. dwr implementation of php

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.