Enhancing PHP Programming with the ASP.NET AJAX Framework - Introducing PHP for Microsoft AJAX Library
(Page 2 of 4 )
In January 2007, Steve Marx of Microsoft released an open source project on Codeplex (http://www.codeplex.com/phpmsajax) that tried to introduce the Microsoft AJAX Library of the ASP.NET AJAX framework into the PHP scenario.
First of all, let's dissect the basic implementation principle of the PHP for Microsoft AJAX Library project.
Up to now, PHP for Microsoft AJAX Library only contains two PHP files: MSAjaxProxyGenerator.php (5K) and MSAjaxService.php (4K). In MSAjaxService.php, there's a PHP class that is defined-MSAjaxService-from which we can further derive custom PHP classes to simulate web service and related web method definitions using PHP skills. Within the other file, MSAjaxProxyGenerator.php, there's another PHP class that is defined-MSAjaxProxyGenerator-through whose generateClientProxy() method (and recurring to Microsoft AJAX Library) the JavaScript proxy of the above-mentioned simulated web service can be implemented without any difficulty.
Before delving into the related sample applications, let's first take a quick look at how to set up the required test circumstances.
Download and set up PHP for Microsoft AJAX Library
Launch your browser and navigate to http://www.codeplex.com/phpmsajax. This is the supporting site for the open source project, PHP for Microsoft AJAX Library. It has the introduction of the project, the latest project version (3 Alpha for downloading), running environment guidance, as well as a basic sample to use the project.
When you click the hyperlink "3 Alpha," you will be redirected to this page: http://www.codeplex.com/phpmsajax/Release/ProjectReleases.aspx?ReleaseId=1692. Figure 1 gives the most interesting information associated with downloading the project on the page.
Figure 1-download the open source project, PHP for Microsoft AJAX Library
_html_44c2a9ee.png)
As is shown in Figure 1, there are two choices for you to download: phpmsajax.zip or phpmsajax-NoSource.zip. Note that the latter merely provides two related PHP files for PHP for Microsoft AJAX Library: MSAjaxProxyGenerator.php and MSAjaxService.php. The former also ships with two sample applications (HelloWorld and ClassSerialization) along with the other two files in order to demonstrate the basic use of the project.
To gain a quicker and better understanding of the project, you are highly advised to download the former. However, after you've looked through the two samples and taken a quick glimpse at the two related project files, you may find out that the whole thing is still in its early stages.
Next: Download and set up PHP and the related web server >>
More ASP.NET Articles
More By Xianzhong Zhu