Rob Gonda's Blog

Ajax recording, slides, and source code

I did a Breeze Presentation on Ajax for ColdFusion Developers to the local Boston CFUG and the Online ColdFusion Meetup Group. The presentation was fast-pased, but I covered 60 slides, 10 examples, and Q&A in 60 minutes... I wanted to get an Ajax overview, talk about history, problems, alternatives, libraries, frameworks, design patterns, architectures, and provide code ready to go using prototype, dojo, spry, ajaxCFC, and more.

The main idea was to cover as much as possible and allow you to go back and review it in your own pace. Find below links to the

To use the code simply unzip in your web root.

Atlas renamed and works with ColdFusion

Scott Guthrie has announced the “Atlas” 1.0 Naming and Roadmap that as part of releasing “Atlas”, they have also finally locked on an official set of product names that they will begin using moving forward. What was formerly called “Atlas” will now have a few names:

  1. The client-side “Atlas” javascript library is going to be called the Microsoft AJAX Library. This will work with any browser, and also support any backend web server (read these blog posts to see how to run it on PHP and ColdFusion).
  2. The server-side “Atlas” functionality that nicely integrates with ASP.NET will be called the ASP.NET 2.0 AJAX Extensions. As part of this change the tag prefix for the “Atlas” controls will change from to . These controls will also be built-in to ASP.NET vNext.
  3. The “Atlas” Control Toolkit today is a set of free, shared source controls and components that help you get the most value from the ASP.NET AJAX Extensions. Going forward, the name of the project will change to be the ASP.NET AJAX Control Toolkit.
Microsoft demonstrated Atlas at CFUnited, and ... well, it wasn't pretty ... Anyways, you can't judge a technology by a bad presentation... I've seen it before, and Atlas is pretty powerful... it's a very well structured library and will probably get a large chunk of marketshare.... It's broken down into two pieces: server side and client side. The combination it's nice, but they're trying to push their JavaScript library and show how it can be used with any server side language... of course it can, so does Rico, Prototype, Dojo, DWR, and a few hundreds... If you wish to give it a try, Microsoft shared the code they used at CFUnited with ColdFusion...

ajaxCFC in Ajax Books

Oreilly's Ajax Design Patterns has a list of Ajax/ColdFusion frameworks on page 585 and it lists ajaxCFC. It says Restricted open source license (free to use in any context but not redistributable) by Rob Gonda. which used to be the case, but the license changed in February 2006. The book came out in June, so it is understandable that the information was a little outdated... this is what happens with every book on cutting-edge technology .. but the time it's published, some/most/any of the covered topics could have changed, or the is a new, better, or improved way of doing things.

Talking about books, my Real-World Ajax book should had come out a few months ago, but due to delays in x,y,z it will come out next month, during the AjaxWorld Conference. It's a nice book, but I wish it had come out a while back as planned... just like I said, it may be missing some of the new tendencies that came out in the last 6 months; nevertheless, it covers all the basics, intermediate, and many advanced topics, and includes many examples in many different languages...

ajaxCFC utils update

I just updated ajaxCFC with a massively refactored utils class, including highlight handler, improved form serialization, debugging, and the ability to use image loading indicators (brought to you by Rey Bango).

to use the image loading indicator use:

DWRUtil.useLoadingImage("/images/ajax-loader.gif");

You may find a bunch of indicators at http://www.ajaxload.info/

Ajax for ColdFusion Developers Breeze Presso next week

I'll be presenting Ajax for ColdFusion Developers to both the local Boston CFUG and also the Online ColdFusion Meetup Group.  The event detail for the OCFMG is:

http://coldfusion.meetup.com/17/events/5113555/

I was tempted to use the same pressos I have at the Ajax World Conference, but I think I may change it up a bit and add some opinions about Spry, Ajax Vs. Flex, ColdFusion Frameworks, and then some... I want this not to be another Ajax presentation, but something that clears up doubts in the community ... if you have any specific topics you want me to cover, there is still time...

See you all there.

ajaxCFC: more small fixes

just uploaded a new release of AjaxCFC with a couple of fixes:

  • backwards compatibility for single arguments with an object, provided by nathanael waite. You may add the setComplexInputStruct(boolean) to the top of your function to enable or disable allowing argumentCollections to be passed to ajaxCFC. If enabled and a single object is passed as an arguments, it will be threaded as a collection. This is enabled by default.
  • fix in the argumentCollection option mentioned above to allow passing a single array argument.
More to come soon.

ajaxCFC quick patch

I just uploaded a small patch into ajaxCFC for the Model-Glue examples to work on the CFMX DevNet Edition. I had the core examples already patched, but I found that the MG were not.

I will release a major engine update within the next few days.

Ajax Debugging Tip

Rey Bango posted a nice entry to help debug Ajax calls. The problem people usually run into is that Ajax triggers a remote call in the background and they have no idea to see why it failed. ajaxCFC will show you the ColdFusion error, if any, but if the problem breaks to communication for some reason it will just say invalid reply from the server... but why?! I always tell people to install a nice http sniffer, and Rey confirms it.
The moral of the story is: use Firefox, use FireBug.

Script.aculo.us 1.6.2 Released

Script.aculo.us V1.6.2 (2006-08-15): Bug fix galore! was released yesterday. 

  • Fix a problem in the drag and drop logic if an reverting/drag ending draggable was initialized for a new drag (for example by clicking repeatedly) for all cases where the default start/revert/end-effects are used, fixes #4706 [thx tecM0]
  • Fix possible memory leaks with Draggables, fixes #3436 [thx aal]
  • Throw nicer errors when requires script.aculo.us libraries are not loaded, fixes #5339
  • Make slider handles work when not displayed initially by using CSS width/height, fixes #4011 [thx foysavas]
  • Update sortable functional test with onUpdate counter
  • Make more Element extensions unit tests work on Safari
  • Add the assertMatch unit test assertion for asserts with RegExps [thx Ian Tyndall]
  • Fix a problem with Effect.Move causing “jumping” elements because of very low float numbers in some situations
  • Fix a missing semicolon in dragdrop.js, fixes #5569 [thx mackalicious]
  • Fix a slight inaccuracy with Effect.Scale that could lead the scaling to be one pixel off
  • Be more prototypish with Effect.Transitions.linear
  • Make Effect.Scale recognize font sizes that use the pt unit, fixes #4136 [thx aljoscha]
  • Fix IE hack in Effect.Opacity, fixes #5444 [thx nicholas]
  • Fix IFRAME layout fix for IE and Autocompleter, fixes #5192 [thx tommy skaue]
  • Fix only option in onEmptyHover, fiex #5348 [thx glenn nilsson]
  • Fix Effect.BlindDown and SwitchOff handling of supplied callbacks, fixes #5089 [thx martinstrom]
  • Fix a problem with field focus on Ajax.InPlaceEditor and loading external text, fixes #4988, #5244 [thx rob]
  • Do not attempt to scroll if scrollspeed is 0/0, fixes #5035 [thx tomg]
  • Fix a problem with Sortable Tree serialization, fixes #4939, #4688, #4767 [thx Sammi Williams]
  • Fix an endless loop with sliders, fixes #3226, #4051, #4765 [thx jeff]
  • Make autocompleter work with update DIVs that have scrollbars, fixes #4782 [thx Tommy Skaue]
  • Corrected options parsing on switchoff effect, fixes #4710 [thx haldini]

Yet Another ColdFusion Ajax Library

Brian pointed me today to mxAjax, yet another ColdFusion Ajax Library. After over a year of hiding in the dark, Arjun, the creator of CFAjax decided to discontinue that framework and start  a new project. "It is inspired from CFAjax but is build from grounds up", which actually means that there is a ColdFusion back end for prototype, scriptaculous, and rico front end. It must says, it's nicer than CFAjax, especially because of the similarity to AjaxCFC :) ... it posts to a CFC, that extends a base components that handles some core functionality like complex object translation. It uses the exact same code I do to get metadata from functions and invoke them using argument collection and named arguments.... Well, I chose to license it under Apache 2.0, so what the hell, hehe.

mxAjax uses JSON as the standard complex object notation, and the cfjson udfs to serialize/deserialize. It's only version 1, and I would suggest a couple of improvements like ALWAYS VAR SCOPE, and don't throw unnecessary debugging information in the screen to later reset the content... it's a misuse of resources... in addition, it's forcing to abort the request after the JS is displayed, but what if I had additional cleanups and logging?

anyways, Arjun, great improvement from CFAjax... nicely done ... btw, if you're reading this, please tell us why you chose prototype... I hope it wasn't bcuz of RoR :)

More Entries

This blog is running version 5.9.003. Contact Blog Owner