PHP中AJAX比较(转)
PHP AJAX 除了??人知的 SAJAX、JPSPAN (原名?ScriptServer) 之外,Sourceforge 近期可下?的 PHP AJAX 又多了 xajax 、AJASON、flxAJAX、AjaxAC。
?些都有供乘法?例程式(好像?成 AJAX 的 Hello world!) ,?然乘法?例只能??考,但至少可看出大致的架?。
[xajax]
xajax 最大的特色是支援 UTF-8 及 Smarty。而且 xajax ??站都是 AJAX,乘法?例?直接到?站的 Example 看。
(??太慢?可能??致 Javascript ?入不完全,以致於?站?法??)
在乘法?例中可以看出最大的特色是 client 端不用自己? callback。client 端送出?算?求? Server 端後,Server 端可以直接把?算?果?送到??元素上。
至於 Smarty 支援的部份,因? Client 端只需一行 $xajax->printJavascript(); 就可以?生 AJAX 所需的 Javascript,所以??大部份的 Template engine 也都支援。
[AJASON]
AJASON 只能在 PHP 5 的?境?行,?站上提供的?例?的相?清楚,乘法?例中提供了 function 、class 二?不同的使用方式,另外?有???理展示。至於?典的autocomplete 也值得一看。
[Flexible Ajax] (flxajax)
flxajax 主要是以 PHP5 ?的,有另外提供 PHP 4 的版本。?例只有提供乘法?例可看,而且 client 端的程式?切的不如前二者完整。
[AjaxAC]
AjaxAC 提供了四??算的?例。看?原始?後????相?的?,Client 端?要?程式告知哪些??元素要?成 widgets 才能交由 Server 端控制。而 Server 端竟然?有 Javascript Code (Callback),?然看起? event 部份??的很好,但是前後端的??根本完全混在一起,?在太?了。
??:
以乘法?例比?起?,我?人比?偏好 xajax ,最主要原因是??跟?面分的相?清楚。(?然 UTF-8 也是原因之一)
xajax ? Server 端程式握有的??元素有??的主控?,在架?程式?可以很清楚的把??完全放在 Server 端,Client 端只要??正?的?示?面及?送?求,?也是? ASP.Net 程式?所使用的方式。
在??? PHP AJAX 之中,xajax 比 flxajax、AjaxAC 更有?格?? Framework,可是 xajax 在 Sourceforge 上也只自?? library:

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Long URLs, often cluttered with keywords and tracking parameters, can deter visitors. A URL shortening script offers a solution, creating concise links ideal for social media and other platforms. These scripts are valuable for individual websites a

Following its high-profile acquisition by Facebook in 2012, Instagram adopted two sets of APIs for third-party use. These are the Instagram Graph API and the Instagram Basic Display API.As a developer building an app that requires information from a

Laravel simplifies handling temporary session data using its intuitive flash methods. This is perfect for displaying brief messages, alerts, or notifications within your application. Data persists only for the subsequent request by default: $request-

This is the second and final part of the series on building a React application with a Laravel back-end. In the first part of the series, we created a RESTful API using Laravel for a basic product-listing application. In this tutorial, we will be dev

Laravel provides concise HTTP response simulation syntax, simplifying HTTP interaction testing. This approach significantly reduces code redundancy while making your test simulation more intuitive. The basic implementation provides a variety of response type shortcuts: use Illuminate\Support\Facades\Http; Http::fake([ 'google.com' => 'Hello World', 'github.com' => ['foo' => 'bar'], 'forge.laravel.com' =>

The PHP Client URL (cURL) extension is a powerful tool for developers, enabling seamless interaction with remote servers and REST APIs. By leveraging libcurl, a well-respected multi-protocol file transfer library, PHP cURL facilitates efficient execution of various network protocols, including HTTP, HTTPS, and FTP. This extension offers granular control over HTTP requests, supports multiple concurrent operations, and provides built-in security features.

Do you want to provide real-time, instant solutions to your customers' most pressing problems? Live chat lets you have real-time conversations with customers and resolve their problems instantly. It allows you to provide faster service to your custom

The 2025 PHP Landscape Survey investigates current PHP development trends. It explores framework usage, deployment methods, and challenges, aiming to provide insights for developers and businesses. The survey anticipates growth in modern PHP versio
