> -----Original Message-----
> From: Micha Schopman [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, August 16, 2005 10:50 AM
> To: CF-Talk
> Subject: RE: Ajax and CFCs
> 
> What type of structured data? The only thing you need to pass is XML. A
> CFML
> Struct can be serialized into a XMLDocument, and the same counts for
> Arrays, Lists, Queries, etc. you name it.

Of course they can - and everybody does it differently.  "XML" isn't a
panacea - used as it is by many today it's no better than a delimited list -
in other words a one-off solution.

WDDX has one method, JSON (tho' not XML) has another, SOAP a third (actually
SOAP has at least nine or 10 ways to pass things if you leave the CF world).

Of course you're also forgetting the client-side.  Even tho' most of these
methods use XML to send data TO the client they nearly all fall back on
hackneyed manual parsing to send data FROM the client.

We've got pipe-delimited lists, comma-delimited lists, underscore-delimited
lists and every other kind of delimited list you could want.   We've got
hordes of special form fields and quasi XML.

And none of this works with any of the rest of it even tho' every single one
is solving the EXACT same problem of passing structured over a text
transport.

I really think for AJAX to truly take off there needs to be a standard
method for this.  SOAP was the promise - but it's bogged down in complexity.
JSON has the right idea but is really too simple.

In short I think we need:

1) A standard which, at the very least, defines text representations of
arrays, objects, strings, nulls, dates, numbers and Booleans.  It should, of
course, allow for complex nesting of these types when applicable.

2) A method for validating such conversions.  Unlike SOAP I think the
standard should be locked down and define EXACTLY what it means when it says
"object" or "Array" to prevent splintering.  This is where JSON fails, in my
opinion: it supports only JS literals (so there's no data typing beyond
"object" and "array")

3) A purely client-side (JavaScript) library for BOTH serializing and
deserializing this standard.  You should be able to convert any JS object to
this with no help from the server.  The SAME transport mechanism should be
used for communication both TO and FROM the server - not XML down and
delimited form-field content up as we see with most solutions today.

4) Support for the standard for major server-side packages.

There's nothing that I've found that does this yet.

Jim Davis





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:215227
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to