Invented by Allaire Corp. (makers of the HomeSite HTML editor and the ColdFusion application development environment), WDDX is ". . . an XML-based technology that enables the exchange of complex data between web programming languages . . ." It was created in 1998 as an open standard designed specifically to simplify data exchange across different platforms, and it has quickly gained popularity with web developers for its elegance and ease of use. OpenWDDX.org: The Web Distributed Data Exchange. "Web Distributed Data Exchange FAQ." Available from the Internet: http://www.openwddx.org/faq/
WDDX works by converting language-specific data structures into their corresponding XML representations. These XML data structures are text-based, platform-independent entities, and, as such, can be transmitted between different systems over standard HTTP protocols with minimal difficulty. Any WDDX-friendly application can read these WDDX packets, and convert them back into their original form. For example, a Python list could be encoded into WDDX and transmitted across HTTP to a PHP script, which could decode it into a PHP array. Or a PHP associative array could be translated into WDDX, sent to a Perl script, and decoded into a Perl-compliant hash, for use within a Perl script.Perhaps an example would make this clearer. Consider Listing 5.1, a single-line PHP script that defines a variable and assigns it a value.
If this variable were to be converted (or, as the geeks say, "serialized" or "pickled") into its WDDX representation, it would look something like Listing 5.2.