Advertise here!

New Rails templates for AJAX

Those of you who are doing some heavy AJAX with Rails should check out Cody Fauser's post about the new RJS templates supported by Rails. This allows you to extract all the javascript actions that should take place (effects, insertions, changing HTML dynamically) into a single template file. The concept is a bit different for those used to current templates. The current notion for templates is to produce some XML or HTML to present to the user. These templates allow you to define methods in the controller (that are called by AJAX calls, like link_to_remote) which handle traversing your model, just like in normal actions, but instead of placing your javascript code inside the RHTML template, you place the intended AJAX effects into an RJS template with the same name as the AJAX method/action in the controller. This may sound rather complicated, but it is actually easier to handle complex interactions with AJAX. The current helper methods tended to limit you to updating a single element as a result of various callbacks in the lifecycle of the AJAX method invokation. These templates will make it easy to define all the intended AJAX effects and results into a single place. Please note that this is in Edge Rails - the trunk of the subversion repository for now, so those wanting to try this out will need to download the trunk.

Posted at 7pm on 11/29/05 | Posted in , , , | no responses | read on

Gmail slowly, silently improves

I'm really struck by Google's slow and silent evolution of Gmail. They are evolving their apps constantly and seem to do so in the easiest and least obtrusive ways. I was composing some email replies today and was struck after some time by something that looked different about my email. Aha! Google has rolled out auto-save on writing new entries! If I'm Microsoft, I'm starting to wonder just how much longer we can retain our deathgrip on the office suite if the new versions of offerings from Google can start out with basic functionality and slowly evolve themselves into full-featured web applications that can compete on a similar level to the desktop apps, only with snappier response times, redundant offsite backup and full portability. So where's my new AJAX office suite?

Posted at 7pm on 10/04/05 | Posted in , | no responses | read on