WDDX
WDDX (Web Distributed Data eXchange) is a programming language-, platform- and transport-neutral data interchange mechanism designed to pass data between different environments and different computers.
History
WDDX was created by Simeon Simeonov of Allaire Corporation in 1998,<ref name="sim">Template:Cite web</ref> initially for the ColdFusion server environment. WDDX was open-sourced later that year.<ref name=itoi>Template:Cite news</ref>
Usage
WDDX is functionally comparable to XML-RPC and WIDL.<ref>Template:Cite news</ref> The specification supports simple data types such as number, string, boolean, etc., and complex aggregates of these in forms such as structures, arrays and recordsets (row/column data, typically coming from database queries).
The data is encoded into XML using an XML 1.0 DTD, producing a platform-independent but relatively bulky representation.<ref>Template:Cite web</ref> The XML-encoded data can then be sent to another computer using HTTP, FTP, or other transmission mechanism. The receiving computer must have WDDX-aware software to translate the encoded data into the receiver's native data representation. WDDX can also be used to serialize data structures to storage (file system or database). Many applications use WDDX to pass complex data to browsers where it can be manipulated with JavaScript, as an alternative to JSON.
Example from php.net:<ref>Template:Cite web</ref> <syntaxhighlight lang="xml"> <wddxPacket version='1.0'>
<header comment='PHP'/>
<struct>
<number>3.1415926</number>
<array length='3'>
<string>Austin</string>
<string>Novato</string>
<string>Seattle</string>
</array>
</struct>
</wddxPacket> </syntaxhighlight>
Adoption
WDDX is mainly used by ColdFusion and, as February 2022, still supported by Adobe.
Outside ColdFusion, libraries exist to read or write this format, Ruby,<ref>Template:Cite web</ref> Python,<ref>Using WDDX with Python</ref> PHP, Java, C++, .NET,<ref>.NET platform WDDX project</ref> ActionScript,<ref>Using WDDX with Flex and AS3</ref> lisp, Haskell, Perl.
PHP used to offer a comprehensive support for WDDX, which could be used as a format to store session information<ref>Andrew Stopford, PHP Programming for Windows, Landmark, New Riders, 2002.</ref> until the version 7.4. It has been removed since from the base language, but still available through PECL.<ref>Template:Cite web</ref> The rationale was a lack of standardization of the format, and new formats like JSON more mainstream.<ref>Template:Cite web</ref> A vulnerability was fixed in 2007.Template:Vague<ref>Template:Cite web</ref>