Rob Gonda's Blog

AjaxCFC Source Control Repo Moved

Since I just moved AjaxCFC to its own homepage, I moved the SVN repository from RIAForge and created a Trac project. If you had RIAForge's SVN mapped, please update your records: . I maintained the same structure and history, though I plan to restructure it very soon.

Please file any bug and enhancement request into the new trac site.

AjaxCFC & jQuery need Rey Bango

We all know, and if you didn't, you do now ... Rey Bango is a jQuery evangelist, now part of, and long time user of AjaxCFC ... Rey and I have previously discussed adding him to the AjaxCFC team, so I'm proud to announce, he's in ... Rey's first task will be to add jQuery 1.1.4 to the AjaxCFC build, which will go into the RIAForge repo. Some people have updated it manually, but it belongs in the core distribution as well ... jQuery 1.1.4 has massive speed improvements over 1.1.3 and 1.1.2, which is the latest in AjaxCFC's distro. I'll fix a couple of memory leak problems with the DWR version and release it soon, hopefully next week. Welcome Rey and stay tuned.

jQuery and AjaxCFC News

jQuery 800%+ Faster, still 20KB

  1. Improved speeds, with DOM traversal over 800% faster than in 1.1.2.
  2. A re-written event system, with more graceful handling of keyboard events.
  3. A re-written effects system (with an accompanying fx test suite), featuring faster execution and better cross-platform support.
Guess who's getting an upgrade soon?

AjaxCFC fastSerialize example

Due to popular request, I added an example showing how to easily submit an entire form through Ajax with the fastSerialize jQuery plugin.

All you require to do is to include this plugin:


and use it to send them form:
onSubmit="return send( $(this).fastSerialize() );"

the send() function looks like this:
    function send(frmData) {
          url: "echoTest.cfc",
          method: "echo",
          data: frmData,
          success: function(data) {
    return false;

simple huh?

Again, I updated the SVN repo and project download files. Enjoy.

AjaxCFC for jQuery JSON Update

Jeff Borisch point out that the cfjson v1.6b that I was using for the jQuery AjaxCFC was buggy. I updated it to v1.7 in the SVN and the project download file... I strongly suggest you get this update.


IMified powered by ColdFusion and AjaxCFC

Imified is an instant messenger buddy that offers access to productivity tools like notes, reminders, and todo's. The site is powered by ColdFusion and their IM bot is done through CFMX7 Event Gateways. However, the most important business aspect is that their back-end / account management is all AjaxCFC! :->
The concept is great because it's simple, yet very handy... I wish them luck and hope they add many more features.

I also wrote a few bots before, but quickly ran into licensing issues with the networks. All networks restrict the amount of messages a single user can send/receive per day, and some networks charge up to $50,000 simply to allow your bot to live.

AjaxCFC for jQuery Alpha3 Release

I just updated the SVN with the 3rd alpha release of AjaxCFC for jQuery. For those of you not familiarized with source control repositories, I included the code into the main AjaxCFC download (thank Rey Bango for reminding me four times a day), available at RIAForge and my blog. You can also just click here.

This release includes several small fixes in the JavaScript and upgrade to the latest CFJSON. Thanks to Larry Reinhard for pointing it out.

The code seems to be really stable; I haven't got many bug reports, au contraire, Jacob Munson, from CFQuickDocs, said he dropped it into his code w/o any complications, maintaining all existing functionality.

I shall wrap up some documentation and officially release it for production.

AjaxCFC for jQuery Alpha2 Release

AjaxCFC for jQuery is almost ready and I just uploaded to RIAForge the new Alpha 2 release. You may sync up your SVN repository or if you don't use source control, use RIAForge's zip download utility to fetch the latest version. Once you download the zip file, the jQuery related code is located in the branches/jquery folder.

I am using the just released jQuery 1.1, so if you drop this code on an old site using jQuery, you probably want to download the back-compatibility plugin.

Like I mentioned in my alpha 1 post, I included a plugin to maintain DWR syntax compatibility, and to illustrate it, I updated a few examples to use this code instead of DWR. Thus far, the only significant different I found is when returning a query using JSON serialization method (default on this release). The syntax to access the query columns is a little different, as you will see in the examples and soon-to-come documentation.

Among some other changes, I updated logging, error trapping, security checks, constructor methods, serialization capabilities, and more.

Most of these changes affect the DWR and jQuery version since the Ajax.cfc core file is shared between them.

Constructor method: many of you tried to extend your existing domain model objects and provide remote methods inside them. Although I don't particularly agree with this practice, I don't want to restrict it. AjaxCFC used to rely on it's built-in init method constructor, which interfered with you own component once extended, so I renamed the AjaxCFC to allow your objects to contain an init() method.

Error trapping: AjaxCFC catches most errors in your components and by default, alert you with the error message. I added the file and line number since sometimes the message was not enough. I also added a method to optionally popup a window showing the error dump, which is extremely useful because you can see the full trace... to enable this just invoke the setPopupErrorDump(true) method inside your CFC.

Security Check (for jQuery version only): jQuery sends additional x-header data in the http request, so I added an option to check for it, to prevent access to the CFC if it's accessed by any method other than an XmlHttpRequest. To enable it just invoke the setCheckHttpRequestData(true) method inside your CFC. In fact, by default AjaxCFC ships with all the security methods turned off, for easier debugging. It is advisable to turn them on by calling: setAllowedVerbs('post'); setCheckHTTPReferer(true); setPopupErrorDump(false); setCheckHttpRequestData(true);

Serialization (for jQuery only): The new AjaxCFC is able to serialize using pure JS, JSON, or WDDX. I haven't fully benchmarked the performance differences, so for now just use the one you like the most.

Logging: I updated the log4javascript version, plus I added a little more information in the request logs.

Documentation will be included with the beta release.

Please note that despite some comments out there, this release does not mean that AjaxCFC switched to jQuery. This release is a branch using a different Ajax engine, and both versions will continue to be updated and supported.

That's it for now, please report any issues using RIAForge's bug tracker.


AjaxCFC for jQuery Alpha Release

I finished today the implementation of AjaxCFC for jQuery. It's the same Ajax <-> CF integration you already know, but using the jQuery Ajax engine. It supports full JSON and WDDX serialization, has improved error handling, improved log4javascript integration, still supports named and unnamed arguments, and just so you can use it right away, it's back compatible with the DWR syntax. The only incompatibility is the change of the $() function, which you can actually override if you wish, but I didn't on my release.

This is great news folks, because jQuery is extensible and allows for easily dropping plugins into your code...
I will work in documenting it for beta release, but those of you who wish to use the bleeding edge version just add a comment and I'll send you the code. I'd appreciate comments and suggestions from those who wish to check it out.

Public Beta release should come sometime next week.

CFQuickDocs updated

The CFQuickDocs site was updated today. The only noticeable change is that now there's a single search box, combining tags and functions. If you need to search for a tag, you must include the CF prefix.

Here's my next request: add back, forward, and bookmarking support. I know bookmarking is already there by copying the 'link to this page' href, but modifying the URL state using the # hash would be much nicer. (I will try to release soon a new AjaxCFC/jQuery branch with built-in support for this).

Nevertheless, me, and my entire team use this site on a daily basis, so thanks a lot for it.

More Entries

This blog is running version 5.9.003. Contact Blog Owner