internet.com

Go to WebDeveloper Home


hm-v6-139x61.gif

Database Journal: The Knowledge Center for Database Professionals

find a web host with:
CGI Access
DB Support
NT Servers
UNIX Servers
Telnet Access

advanced search
jobs

Get FREE Development Info via your Email!

The Webdeveloper channel
FlashKit
GIF.com
HiermenusCentral
webdeveloper Jobs
Java Boutique
JavaScript.com
JavaScript Source
ScriptSearch
StreamingMedia World
WDJ
WDVL
WebDeveloper.com
WebReference.com
XMLFiles.com

internet.com
Internet News
Internet Investing
Internet Technology
Windows Internet Tech.
Linux/Open Source
Web Developer
ECommerce/Marketing
ISP Resources
ASP Resources
Wireless Internet
Downloads
Internet Resources
Internet Lists
International
EarthWeb
Career Resources

Search internet.com
Advertise
Corporate Info
Newsletters
E-mail Offers

internet.commerce
Be a Commerce Partner










 
THE XML FILES
A WebDeveloper.com Feature

WDDX: A Deeper Look

by Nate Zelnick

Any standard is better than nothing at all

Last time we looked at the underlying reasons why Allaire created its XML-based inter-application data transmission standard called Web Distributed Data eXchange (WDDX). As I said this is a system that is designed to move data generically between different applications so they are available with their context intact.

The key to this is stripping the task down to its most basic form. The reason for taking this approach is to solve the problem pragmatically without trying to provide a totalistic solution that solves all problems forever. Avoiding the "golden hammer" approach, according to Allaire's Simeon Simeonov, gets WDDX out and into the hands of developers faster so that it can be put to use quickly to solve real problems today.

Eventually, when all of the ancillary services and pieces of the full XML framework are finished, approved by their respective standards bodies and consortia, Sim thinks that WDDX will be superceded by a completely XML native solution. In the meantime, though, WDDX provides a way for many developers to experiment with some of the opportunities that XML opens up without having to wait and without having to make expensive investments in new frameworks based on unfinished specifications.

WDDX: Macro View

Just as there are different operating systems because there are different problems that need to be addressed in different manners, there are different frameworks for developing different applications.

One of the problems that XML will eventually solve in this heterogeneous world is to provide the means for classes of related applications built with different tools on different systems to exchange any information arbitrarily. It is these services, all built on top of the basic XML grammar and parsing rules, that are still being hashed out. So WDDX had to find a way to bridge frameworks without these dependencies.

To build a bridge, you have to find a point on either side of a divide from which to extend a link. This is what Allaire did.

Lowest Common Denominator

WDDX had to define structures that would be common to all of the frameworks that would need to share data. Originally this had just meant ColdFusion, but as Sim and others thought about it, it became clear that this could also mean Active Server Pages, Perl, JavaScript, Java, Python, PHP or anything else. What would be required is a way to translate from one framework's way of representing data to any of the others, without knowing which other framework would be the target.

Since the internal representation of a data structure is necessarily different for each, Sim went to the radical root of the problem and defined what could be said to be similar about each system. What he came up with is a few simple and a few complex data types that were generic to most (but not all) of these different languages and frameworks.

Essentially, the simple types are strings, numbers, Boolean and dates. Complex types are arrays, structures, associative arrays (multidimensional arrays of arbitrary complexity) and recordsets. Recordsets are a special case of associative arrays used to represent ColdFusion and ASP recordset objects. By taking this approach, WDDX provides building blocks for data structures that are neither efficient nor compact nor elegant. But they work. And they work in ways that are quite surprising.

[ Click here to move to the next part of this article ]

Fast Jump to Anywhere on WebDeveloper.com®: