PHP
  Home arrow PHP arrow Page 2 - Data Exchange with XML, WDDX and PHP
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Mobile Linux 
App Generation ROI 
VPS Hosting 
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? 
PHP

Data Exchange with XML, WDDX and PHP
By: Vikram Vaswani, (c) Melonfire
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 4
    2001-09-13

    Table of Contents:
  • Data Exchange with XML, WDDX and PHP
  • The Wonderful World Of WDDX
  • Polly Wants A Cracker
  • Humbert Redfinch-Northbottom The Third, I Presume?
  • Old Friends And New
  • Hip To Be Square
  • The Truth Is Out There
  • Money Talks
  • Closing Time

  • 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


    Data Exchange with XML, WDDX and PHP - The Wonderful World Of WDDX


    (Page 2 of 9 )

    It's quite likely that you've never heard of WDDX before today - so allow me to enlighten you:

    WDXX, or Web Distributed Data Exchange, is a mechanism for representing and exchanging data structures (like strings and arrays) between different platforms and applications. It uses XML to create abstract representations of data, application-level components to convert the XML abstractions into native data structures, and standard Internet protocols like HTTP and FTP as the transport mechanism between applications.

    Still confused, huh?

    All right, let's try English for a change.

    WDDX is simply a way of representing data - strings, numbers, arrays, arrays of arrays - in a manner that can be easily read and understood by any application. To illustrate this, consider the following PHP variable:

    <? $colour = "tangerine"; ?>
    Here's how WDDX would represent this variable:

    <wddxPacket version='1.0'> <header/><data><struct><var name='colour'><string>tangerine</string></var></struct></data></wddxPacket>
    By creating an abstract representation of data, WDDX makes it possible to easily exchange data between different applications - even applications running on different platforms or written in different languages - so long as they all understand how to decode WDDX-encoded data. Applications which support WDDX will receive application-neutral WDDX data structures and convert them into an application-specific usable format.

    The implications of this are tremendous, especially for developers working on different platforms. It means that a PHP associative array could be encoded in WDDX and sent to a Perl script, which could decode it into a hash and use it for further processing, or that a Python list generated on one server could be represented as a WDDX structure and sent to another server, where a Perl, PHP or JSP script could decode it as an array and handle it appropriately. By maintaining the integrity of data structures across different environments, writing platform-independent code becomes much easier.

    With applications now able to talk to each other in a common language, a huge number of new business and technological opportunities arise. Data exchange between servers - for example, B2B applications like accounting, inventory management and order fulfillment - becomes more streamlined and intelligent, and data updates - for example, news headlines or stock prices - can be delivered to requesting clients without worries about inter-operability of different operating systems or platforms.

    Since WDDX abstractions are represented as text (technically, well-formed XML), they can be moved between applications using any protocol which supports transferring textual data - including HTTP and email. In fact, WDDX was written by Allaire Corporation specifically to solve the problem of data exchange in the anything-but-consistent world of the Web...and, as you'll see over the next few pages, it works beautifully.

    More PHP Articles
    More By Vikram Vaswani, (c) Melonfire


     

       

    PHP ARTICLES

    - Working With Different Namespaces in PHP 5
    - User Management Explained: Overview
    - Using Namespaces in PHP 5
    - Database Security: Guarding Against SQL Inje...
    - Building a Modular Exception Class in PHP 5
    - Database and Password Security for Web Appli...
    - Handling MySQL Data Set Failures in PHP 5
    - Building Site Registration for Web Applicati...
    - Intercepting Customized Exceptions in PHP 5
    - Securing Your Web Application Against Attacks
    - Sub Classing Exceptions in PHP 5
    - Authentication for Web Application Security
    - Building a Content Management System with Co...
    - Filters and Login Systems for Web Applicatio...
    - Working with the Email Class in Code Igniter





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