> -----Original Message-----
> From: James Holmes [mailto:[EMAIL PROTECTED]
> Sent: Saturday, October 07, 2006 5:28 AM
> To: CF-Talk
> Subject: Re: Ajax and CF...*sigh*...again...
> 
> Eventually people are going to want to return more than a plain string
> or HTML to their page. To do that they will probalby want to use JSON
> (assuming XML is too much of PITA, which it is). So then they have to
> write code to get their CF data into JSON and back again.  In other
> words, they'll spend time rewriting the same thing that's been done
> multiple times before by people with more experience.

I don't agree that XML is "too much of a PITA" - at least not more or less
than anything else.

JSON is great - but has some marked limitations: it's hard to validate,
there's no data typing (no real difference between strings and dates for
example), and it's more difficult to deserialize (especially for languages
other than JS).

XML (depending on the dialect used) addresses most of those complaints at
the cost of a (sometimes much) larger packet size and more tedious code -
unless you use a pre-built parser.

The problem, as I see it, is that many of the libraries out there are
"larger" solutions - they often provide "end to end" solutions for problems.
For example they might have methods specifically for doing drop-down boxes,
or timers, or loading indicators or whatever.

This isn't at all "bad"... but for somebody just learning (or wanting more
control) they seem large and heavy.  They often (almost by necessity) force
potentially incompatible methodologies onto the developer.

For others this is a complete and utter God-send.  They simply use the
library/framework as a black-box tool and get their work done.

The other extreme is to "do it all yourself".  This is definitely much
slower, of course, and there definitely is a level of redundancy but the
benefits are a much more complete understanding and a toolset that matches
your style perfectly (or at least as closely as the underlying technologies
allow).

Personally I prefer the middle-ground: compact objects/services/components
that handle the "hard stuff" but exert very few dictates on the usage.
That's were things like pre-built XML/JSON parsers come in.

(Here come the plugs!)

I prefer, of course, YODEL (my very own XML dialect):

http://www.depressedpress.com/Content/Development/YODEL

The pre-built parsers try to completely abstract the activity of
XML-transfer but tries not to impose any development paradigms.  YODEL
attempts to address what's "bad" about XML and JSON while still providing
flexibility.  There are CF and JS parsers but they are connected only by the
standard.

For making HTTP requests in the browser I use another object I created to do
HTTP Request pooling:

http://www.depressedpress.com/Content/Development/JavaScript/Extensions/DP_H
TTPRequestPool

In both these cases I looked for simple, cut-down solutions to do the same
jobs... but I couldn't find any.  Most people either provide complete
frameworks or non-portable "snippets".

Again neither of these is bad - both can be insanely useful actually - but I
think their's another class of coder that really wants something in-between.

Jim Davis



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:255893
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to