Ray, Don't take this wrong as I know that you're a very big fan of jQuery. I'll preface this question by stating that it truly is a question and not an argument. As someone who has pretty much mastered the ColdFusion AJAX stuff I am compelled to ask - What is the draw of jQuery and what does it do that CF8 out of the box cannot do?. What is the advantage of using jQuery over CF8's AJAX tools?
Good question, and let me say, I don't mind a good argument. While in some ways I can be as sensitive as my 7 year old daughter, I don't mind arguing about this, so let's start a little
argumentdiscussion, shall we?
That being said, let's first talk a bit about what we mean when we say 'CF8 Ajax' (and to make it simpler, I'll simply use 'CFAjax' to refer to Ajax support in ColdFusion 8). I look at CFAjax as four main areas of support:
I don't talk much about debugging because, well, Firebug won the war a long time ago. I have written about ColdFusion 8's security support in terms of Ajax control before. It's ok, but really meant to be used within the context of a full suite of security rules and settings. Most people focus on the plumbing and UI widgets.
By plumbing I mean the low level things ColdFusion 8 does to support Ajax. This includes things like JSON support, cfajaxproxy, and probably the most useful change of all - the simple returnFormat argument. These additions are very helpful and you should not ignore them if you are using another framework. They are - for all intents and purposes - framework agnostic and will work with CFAjax, jQuery, Spry, Ext, etc.
What does that leave? Well, widgets for one, but we also have a whole other area that CFAjax doesn't really cover - manipulation. jQuery is definitely the winner here. Period. If you want to work with the DOM in any way, then jQuery has you covered.
<cfwindow source="some.cfm" />
The flip side of this is customization. I haven't always had luck with customizing the look and feel, or behavior, of the CFAjax widgets, while there seems to be a much greater level of support on the jQuery side, both in the 'official' widget side and in the plugins.
What other comparisons can we make? CFAjax has no native animation support... but to be honest, I find most animations incredibly annoying. I'm willing to admit that I'm in the minority though and jQuery's support of this is rather nice. I like how they recognized that for common UI features like show, hide, that it made sense to easily tie these to animations. CF has forms validation built in... but... well... most people I know don't use it. I know I don't. jQuery gets the point here even though it's not native but available via a plugin.
Another facet of CFAjax is the binding support. Borrowing from Forta's post, consider this:
While I can certainly do this in jQuery and other frameworks, you have to admit that that syntax is pretty darn powerful, especially when you consider the developer who has 0 JS experience. (Note to self - how would one even do bindings in jQuery?)
So I rambled on a bit. Let me try to come to some sort of conclusion here that makes a bit of sense.
You always want to use the tools that make you the most productive. Using myself as an example, I was most productive with just the CFAjax stuff at first. It took me a while, but now I'm more productive with jQuery. If I were to join some new team of developers, I'd have to work with them to find the best tool we can use together. Using jQuery though (or Spry, or Ext) doesn't mean you can't use the other facets of ColdFusion 8's Ajax support.
Make sense? Discuss please.