国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

Home php教程 php手冊 用PHP for Microsoft AJAX Library增強PHP編程

用PHP for Microsoft AJAX Library增強PHP編程

Jun 06, 2016 pm 07:56 PM
ajax for library microsoft php

一、引言 眾所周知,ASP.NET AJAX框架由三個子框架組成:ASP.NET 2.0 AJAX Extensions,ASP.NET AJAX Control Toolkit以及ASP.NET Futures CTP.其中,前二者極大地依賴于ASP.NET 2.0服務器端技術。實際上,這兩部分的主要設計目的正是在于擴展ASP.NET 2.0(

??? 一、引言

??? 眾所周知,ASP.NET AJAX框架由三個子框架組成:ASP.NET 2.0 AJAX Extensions,ASP.NET AJAX Control Toolkit以及ASP.NET Futures CTP.其中,前二者極大地依賴于ASP.NET 2.0服務器端技術。實際上,這兩部分的主要設計目的正是在于擴展ASP.NET 2.0(及以后版本)程序的Ajax特征。對比之下,ASP.NET Futures CTP(之前的代碼稱為“ASP.NET AJAX Futures CTP”)與ASP.NET服務器端的耦合性非常小,但也主要是服務于ASP.NET程序的開發(fā),只是由于這時的主要業(yè)務邏輯由服務器轉移到了客戶端,從而能夠極大地改善客戶端用戶體驗并進而提高系統(tǒng)的整體性能。

??? 但是,另一方面,我們也應該看到上述三個部分中都提供了大量現(xiàn)成的JavaScript源碼,其中大部分集中在ASP.NET 2.0 AJAX Extensions和ASP.NET Futures CTP.最重要的是,其中絕大部分的JavaScript代碼完全可以輕易地分離出來并進一步應用于其他類型的web開發(fā)平臺上。這些JavaScript源碼庫主要包括MicrosoftAjax.js,MicrosoftAjaxTimer.js和MicrosoftAjaxWebForms.js,還有ASP.NET Futures CTP中的PreviewScript.js,PreviewGlitz.js和PreviewDragDrop.js等。通過進一步分析來看,我們可以輕易發(fā)現(xiàn)其實它們都是一些獨立的JavaScript代碼,僅僅是其相應的一個副本以嵌入式資源方式存在于程序集System.Web.Extensions.dll及Microsoft.Web.Preview.dll中罷了。也就是說,它們中的絕大部分是獨立于ASP.NET服務器端的。因此,我們完全有可能把這些腳本移植到其他服務器端web開發(fā)平臺上,例如JSP,PHP及Perl等。于是,在基于這些服務器平臺開發(fā)web應用的過程中,我們可以盡情地應用ASP.NET AJAX框架的客戶端技術,其中包括大量的ASP.NET AJAX腳本特征,甚至是更高級的ASP.NET AJAX客戶端框架編程技巧。

??? 然而,我們也應該清醒地認識到,要成功實現(xiàn)ASP.NET AJAX框架功能,特別是ASP.NET AJAX服務器控件ScriptManager及UpdatePanel控件等所具備的強大功能還有待于利用其他的非ASP.NET技術作深入的模仿性開發(fā)。

??? 在本文中,我們主要想探討如何利用開源工程PHP for Microsoft AJAX Library把ASP.NET AJAX客戶端框架所提供的簡易的Web服務技術引入到PHP Web開發(fā)環(huán)境下。盡管目前的開源工程PHP for Microsoft AJAX Library還未真正成熟起來,但是我們可以早一步領略如何在PHP平臺上引入Microsoft AJAX Library并為其增加流行的Ajax特征。

??? 二、開源工程PHP for Microsoft AJAX Library簡介

??? 2007年1月,微軟的Steve Marx在網(wǎng)站Codeplex(http://www.codeplex.com/phpmsajax)上發(fā)布了一個開源工程。他試圖把微軟ASP.NET AJAX框架中的Microsoft AJAX Library引入到PHP開發(fā)領域。

??? 下面,讓我們簡單地分析一下工程PHP for Microsoft AJAX Library的實現(xiàn)原理。

??? 到目前為止,工程PHP for Microsoft AJAX Library中僅包含了兩個PHP文件:MSAjaxProxyGenerator.php和MSAjaxService.php.其中,在文件MSAjaxService.php中定義了一個PHP類MSAjaxService.我們可以由這個類進一步派生自己的定制類以便使用PHP編程模擬實現(xiàn)Web服務并實現(xiàn)相應的Web方法定義。在另一個文件MSAjaxProxyGenerator.php中定義了另一個PHP類MSAjaxProxyGenerator,通過這個類的generateClientProxy()方法并借助于Microsoft AJAX Library便可以輕松實現(xiàn)生成Web服務的客戶端JavaScript代理。

??? 在正式分析本文示例之前,還是讓我們先來了解一下本實驗所需要的測試環(huán)境及有關安裝。

??? 三、下載與安裝PHP for Microsoft AJAX Library

[1]?[2]?[3]?[4]?[5]?

用PHP for Microsoft AJAX Library增強PHP編程

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undress AI Tool

Undress AI Tool

Undress images for free

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Why We Comment: A PHP Guide Why We Comment: A PHP Guide Jul 15, 2025 am 02:48 AM

PHPhasthreecommentstyles://,#forsingle-lineand/.../formulti-line.Usecommentstoexplainwhycodeexists,notwhatitdoes.MarkTODO/FIXMEitemsanddisablecodetemporarilyduringdebugging.Avoidover-commentingsimplelogic.Writeconcise,grammaticallycorrectcommentsandu

How to Install PHP on Windows How to Install PHP on Windows Jul 15, 2025 am 02:46 AM

The key steps to install PHP on Windows include: 1. Download the appropriate PHP version and decompress it. It is recommended to use ThreadSafe version with Apache or NonThreadSafe version with Nginx; 2. Configure the php.ini file and rename php.ini-development or php.ini-production to php.ini; 3. Add the PHP path to the system environment variable Path for command line use; 4. Test whether PHP is installed successfully, execute php-v through the command line and run the built-in server to test the parsing capabilities; 5. If you use Apache, you need to configure P in httpd.conf

PHP Syntax: The Basics PHP Syntax: The Basics Jul 15, 2025 am 02:46 AM

The basic syntax of PHP includes four key points: 1. The PHP tag must be ended, and the use of complete tags is recommended; 2. Echo and print are commonly used for output content, among which echo supports multiple parameters and is more efficient; 3. The annotation methods include //, # and //, to improve code readability; 4. Each statement must end with a semicolon, and spaces and line breaks do not affect execution but affect readability. Mastering these basic rules can help write clear and stable PHP code.

python if else example python if else example Jul 15, 2025 am 02:55 AM

The key to writing Python's ifelse statements is to understand the logical structure and details. 1. The infrastructure is to execute a piece of code if conditions are established, otherwise the else part is executed, else is optional; 2. Multi-condition judgment is implemented with elif, and it is executed sequentially and stopped once it is met; 3. Nested if is used for further subdivision judgment, it is recommended not to exceed two layers; 4. A ternary expression can be used to replace simple ifelse in a simple scenario. Only by paying attention to indentation, conditional order and logical integrity can we write clear and stable judgment codes.

PHP 8 Installation Guide PHP 8 Installation Guide Jul 16, 2025 am 03:41 AM

The steps to install PHP8 on Ubuntu are: 1. Update the software package list; 2. Install PHP8 and basic components; 3. Check the version to confirm that the installation is successful; 4. Install additional modules as needed. Windows users can download and decompress the ZIP package, then modify the configuration file, enable extensions, and add the path to environment variables. macOS users recommend using Homebrew to install, and perform steps such as adding tap, installing PHP8, setting the default version and verifying the version. Although the installation methods are different under different systems, the process is clear, so you can choose the right method according to the purpose.

Your First PHP Script: A Practical Introduction Your First PHP Script: A Practical Introduction Jul 16, 2025 am 03:42 AM

How to start writing your first PHP script? First, set up the local development environment, install XAMPP/MAMP/LAMP, and use a text editor to understand the server's running principle. Secondly, create a file called hello.php, enter the basic code and run the test. Third, learn to use PHP and HTML to achieve dynamic content output. Finally, pay attention to common errors such as missing semicolons, citation issues, and file extension errors, and enable error reports for debugging.

What is PHP and What is it Used For? What is PHP and What is it Used For? Jul 16, 2025 am 03:45 AM

PHPisaserver-sidescriptinglanguageusedforwebdevelopment,especiallyfordynamicwebsitesandCMSplatformslikeWordPress.Itrunsontheserver,processesdata,interactswithdatabases,andsendsHTMLtobrowsers.Commonusesincludeuserauthentication,e-commerceplatforms,for

How Do You Handle File Operations (Reading/Writing) in PHP? How Do You Handle File Operations (Reading/Writing) in PHP? Jul 16, 2025 am 03:48 AM

TohandlefileoperationsinPHP,useappropriatefunctionsandmodes.1.Toreadafile,usefile_get_contents()forsmallfilesorfgets()inaloopforline-by-lineprocessing.2.Towritetoafile,usefile_put_contents()forsimplewritesorappendingwiththeFILE_APPENDflag,orfwrite()w

See all articles