Professional Documents
Culture Documents
3
Have we Achieved World Peace?
• One big assumption does not hold true
– Network nodes leverage peers’ data and
services
– A Web system must be a data and service
portal, not just an outward facing end-user
application
• Web applications are not so designed
– Most view web applications as having a fixed
end-user base working through web browsers
– The combination of HTML + script provides no
separation of data and processing 4
Case: FedEx Package Tracking
• Individuals track packages via browsers, but...
• FedEx’s real customers are corporations
– They want to integrate their order tracking
systems with FedEx’s package tracking system
– They cannot do this using the existing system
• Redesign requires “public data interfaces”
– Requires exchange of structured data between
browsers and servers and in between servers
5
The Crisis of Web Applications
• Structured data exchange is not happening
– HTTP is a flat text-based protocol
– Browsers are data-starved; despite ever
increasing processing capabilities, they do little
more than user-interface related work
– Servers are separated by the walls imposed by
under-powered data exchange
• Solution
– Break these walls down; let web applications
execute on the entire network
– We know XML can help! But, how? 6
Native XML Approach
• DTD design
• XML data generation
• XML parsing and processing
– SAX, DOM, …
• XML transformation
– CSS, DSSSL, XSL, …
7
Sounds Great, But…
• Solution
– A mechanism for exchanging structured data
that hides the details of XML processing
• What is required?
– The Web is simple, pragmatic, and ubiquitous
– Page-based web applications that run on web
application servers (Perl scripts, Active Server
Pages, ColdFusion) rule the field
9
How should it be done?
• Work directly with application data
– Developers never see XML, but they benefit from it
• Cross platform
– Different OSs: Windows, Mac, Unix
– Different languages: ColdFusion Markup Language
(CFML), VBScript, JavaScript, Java, C/C++,
COM, CORBA, Frontier, Perl, PHP, Python
• Open and flexible
– Easy to contribute to
– Can track evolving W3C standards
• Free! 10
How should it work?
Application Data
Platform X Serialization
The
Net
Platform Y
Deserialization
Application Data
11
Web Distributed Data Exchange
• WDDX DTD
– Language and platform neutral representation of
common application data structures: strings,
numbers, booleans, date-time values, arrays,
associative arrays, and recordsets
• WDDX platform modules
– Serialization/deserialization modules for CFML,
COM (C/C++, ASP, and all Windows apps),
JavaScript (browser), Perl, and Java
• WDDX datatypes
– Common API uses native datatypes when possible
12
Technology Comparisons
• XML DTDs
– WDDX abstracts the process of DTD creation, XML
generation, and XML parsing for app data
• DOM
– WDDX is an API built on top of DOM
• SOAP and WebBroker
– WDDX is about data, not object method requests
• WIDL
– WDDX has no notion of a service or an interface
• RDF and DCD
– WDDX is not about meta-data
13
WDDX Evolution
• WDDX DTD is versionable
– Multiple versions of WDDX can interoperate
– WDDX can track evolving W3C standards
• Source code is open
– Encourages involvement and participation
– Lowers the cost of WDDX-enabling a platform
– Allaire is working together with third parties
• It’s free!
– The more nodes speak WDDX, the better
14
When Should One Use WDDX?
• Point-to-point data exchange
– No pre-existing XML/SGML content
– Application-level data is ‘produced’
– Applications ‘consume’ the data
– Only one use for the XML data representation
• Multiple ad hoc data exchanges
– Little or no benefit from custom vocabularies
– Example: per page browser-server data
exchange
15
WDDX Scenarios
ColdFusion WDDX
Server XML
The
Net
CF Server
XML
WDDX
JavaScript Browser
16
Web Technology Adoption Path
• XMLless Web
– Structure, where art thou?
• XML middleware
– Browsers and servers exchange structured data
– Developers can benefit from WDDX now
– Proof of XML benefits to the enterprise
• XML-enabled Web
– A better place for all
17
Call to Action
• Want to see WDDX in action?
– Download ColdFusion: www.macromedia.com
– Visit the WDDX site: www.openwddx.org
• Want to try WDDX out?
– download Software Development Kit (SDK)
from www.openwddx.com
– Send email to beta@allaire.com. It’s free!
18
the WDDX SDK
20
Java Implementation
21
JavaScript Implementation
• The JavaScript implementation is distributed as
three JavaScript (.js) files. The "core" file is
wddx.js, which defines the WddxRecordset and
WddxSerializer objects.
• Additionally, the archive includes wddxDes.js,
which defines the WddxDeserializer object, and
wddxRsEx.js, which provides additional
functionality for recordset objects.
22
Perl Implementation
24
Cold Fusion Implementation
26
Basic concepts
Take a native object; serialize it into a WDDX packet
Send it across the network
Deserialize it back into a native object
Serializing the native objects into WDDX packets gives us al way of of moving
environment specific (Java, CF,Perl…) objects around the network and
delivering them to the same environment or another other environment
27
example
select FirstName,LastName,Email from Employees
produces a ColdFusion record set, serialixing the recordset produces a WDDX packet
<wddxPacket version='0.9'>
<header></header>
<data>
<recordset rowCount='5' fieldNames='FIRSTNAME,LASTNAME,EMAIL'>
<field name='FIRSTNAME'>
<string>Carolynn</string>
<string>Dave</string>
<string>Linda</string>
<string>Aaron</string>
<string>Peter</string>
</field>
<field name='LASTNAME'>
<string>Peterson</string>
<string>Heartsdale</string>
<string>Stewart</string>
<string>Smith</string>
<string>Barken</string>
</field>
<field name='EMAIL'>
<string>CPETERSON</string>
<string>FHEARTSDALE</string>
<string>LSTEWART</string>
<string>ASMITH</string>
<string>PBARKEN</string>
</field>
28
</recordset>
deserialized into Javascript
EmployeeData=new WddxRecordset();_t2=newArray();_t2[0]="Carolynn";_t2[1]="Dave";_t2[2]="Linda";
_t2[3]="Aaron";_t2[4]="Peter";EmployeeData.firstname=_t2;_t2=newArray();_t2[0]="Peterson";
_t2[1]="Heartsdale";_t2[2]="Stewart";_t2[3]="Smith";_t2[4]="Barken";EmployeeData.lastname=_t2;
_t2=newArray();_t2[0]="CPETERSON";_t2[1]="FHEARTSDALE";_t2[2]="LSTEWART";_t2[3]="ASMITH";
_t2[4]="PBARKEN";EmployeeData.email=_t2;_t0=null;_t1=null;_t2=null;
29