ASP.NET
  Home arrow ASP.NET arrow Page 2 - Enhancing PHP Via the ASP.NET AJAX Framewo...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Mobile Linux 
App Generation ROI 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ASP.NET

Enhancing PHP Via the ASP.NET AJAX Framework: A Second Look
By: Xianzhong Zhu
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 3
    2008-06-30

    Table of Contents:
  • Enhancing PHP Via the ASP.NET AJAX Framework: A Second Look
  • Code Examination
  • Post Code Examination
  • Watch the result of asynchronously invoking the PHP web service

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Enhancing PHP Via the ASP.NET AJAX Framework: A Second Look - Code Examination


    (Page 2 of 4 )

    First of all, under the new PHP environment, it's impossible for us to fall back on the ASP.NET AJAX server-side control-ScriptManager. We have no choice but to refer to the ASP.NET AJAX client-side scripts and the formerly-defined PHP web service via manually programming them.

    Second of all, please pay attention to the following line:

    <script type="text/javascript"
    src=" AnimalService.php/js"></script>


    Herein, we must append a /js suffix to the PHP file in which the custom web service class is defined. This will notify the web server to tell the relevant PHP code and, with the help of Microsoft AJAX Library, to generate the appropriate client-side proxy for the PHP-styled web service and download it to the browser.

    As a matter of fact, you can enter the above /js-suffixed line of code directly to the address bar of your browser and press ENTER to watch the interesting client-side proxy for the web service, which is shown in Figure 4.

    Figure 4-the automatically generated web service proxy on the client side


    Examine this carefully and you will find out that the client-side proxy is quite similar to those generated and discussed under the ASP.NET environment. And since our main interests do not lie herein, we will not dwell on it.

    Next, notice that for a rather typical sample we painstakingly introduced one of the ASP.NET AJAX Futures CTP (the newest name is called 'ASP.NET Futures') scripts-PreviewScript.debug.js (you can use the release version, PreviewScript.js, instead of the debug version).

    According to my shallow study, you can leverage most of the code inside PreviewScript.debug.js. However, there is apparently one deficiency in PHP for Microsoft AJAX Library (currently still in its '3 Alpha' version): we can not utilize the 'great' DataSource component as in the ASP.NET scenario. To some degree, we can say that the DataSource component is a marvelous invention under the ASP.NET environment that greatly simplifies the client-side data binding to the corresponding server side.

    What we need to do is refer to a DataSource component in the xml-script programming and configure a few parameters. Then the client-side ListView/ItemView control can employ the server-side data as easily as on the client side. But, the DataSource component is designed to rely on the special ASP.NET server-side component-DataService. In other words, it may be a long time before the PHP for Microsoft AJAX Library project to becomes mature.

    More ASP.NET Articles
    More By Xianzhong Zhu


     

    ASP.NET ARTICLES

    - Developing a Mini ASP.NET AJAX Server Centri...
    - Disadvantages of the ASP.NET MVC Framework
    - Advantages of the ASP.NET MVC Approach
    - ASP.NET Web Forms Weaknesses
    - ASP.NET Web Forms Meets ASP.NET MVC
    - Source Code for Saving and Retrieving Data w...
    - Using GridView to Save and Retrieve Data wit...
    - Handling Dynamic Images in ASP.NET 3.5 AJAX ...
    - Retrieving Data with AJAX and the GridView C...
    - Playing with Images in ASP.NET 3.5 AJAX Appl...
    - Saving and Retrieving Data with AJAX
    - Enhancing PHP Via the ASP.NET AJAX Framework...
    - Enhancing PHP Programming with the ASP.NET A...
    - Classes and ASP.NET AJAX
    - Using ASP.NET AJAX

     
    Best Practices for Windows Vista Migration Presentation
    Dell and Microsoft recently held a series of face-to-face seminars entitled, &qu....

     
    Creating a Culture for Code Reuse
    If you oversee development teams you know that like it or not proprietary and ex....

     
    Keys to Web Application Acceleration: Advances in Delivery Systems
    Accelerate Web apps by up to 5x. Ensure significantly faster access to the Web a....

     
    Optimizing Application Monitoring
    Tired of finding out from your customers that you're offline? This white paper e....

     
    Solaris to Solaris Migration -- Migrating applications from Sun SPARC to Dell PowerEdge R900
    This comprehensive Migration Guide reviews the approach that Principled Technolo....

     




    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
    Stay green...Green IT