Rob Gonda's Blog

Let's welcome the Ajax Developer Magazine

You probably know how I love sys-con magazines, especially the CFDJ… now there’s a new player that you can’t miss: ADJ! There’s a new magazine out specialized on AJAX! How cool is that? The first issue will be out soon, but for now you can check out all the latest news at http://ajax.sys-con.com/

Enjoy.

Yahoo's JavaScript Developer Center

Yahoo put up a page dedicated to JavaScript / AJAX developers: JavaScript™ Developer Center... it focuses on AJAX, XMLHttpRequest, JSON, Web Services, and some other gadgets. It is a little bias of course, it only focuses and includes in tools you need to integrate with Yahoo's AJAX API's, but it's still a nice resource with plenty of examples to expand your mind.

ajaxCFC with security and debugging released

I just uploaded a new release of ajaxCFC with some really nice additions.

ajaxCFC now supports built-in improve security, enforcing get or posts verbs, and also optionally checks for the http-referer to match your site. These two checks will prevent a third party to monitor http packets and try to call them manually by pasting the full ajax request to a browser.

I personally always Firefox and Live HTTP headers debug my ajax applications and I recommend using get methods and allow blank referers for development environments; but you need to be able to lock it down for production.

And talking about development, don't you hate when you think you're doing everything right, but there is no way to see what the server is getting out of your ajax request? I added some debugging abilities too that write into a debug file.

More details on the implementation of these updates are available in the documentation inside the download.

Real World Ajax Seminar

Web 2.0 is the future, and AJAX is the core element for Web 2.0 … you may be wondering what it is, how can you use it, or where is it going.

I was honored to be invited to speak at the first ‘Real World Ajax Seminar’ in NY, next to many other AJAX authorities including Jesse James Garrett, aka the Father of AJAX.

For more information, please click the image below.

week full of releases

There two main JavaScript frameworks used for Web 2.0 and Ajax are Prototype and DRW.

This was a week full of releases; Prototype 1.4 final was released today (although they haven’t updated their site yet) and it’s required to script.aculo.us 1.5, which was also released today. Script.aculo.us is used to Ruby on Rails, which was released this week.

A new version of ajaxCFC with increased built in security will be released next week.

ajax portal example

I just came across a really nice ajax portal example … Its an open source (LGPL) server designed for creating ajax web apps via servlets, Python server pages, or XML-RPC.

You can check out the demo here, login with demo/demo. I really like the preloaders, and the ability to natually right-click anything just like a desktop application.

ajaxCFC small fixes

I just updated the project files to include the following fixes:
 

  • replaced the /exec/method after the CFC call with get or post vars because it was being misinterpreted by some web servers
  • Forced ColdFusion debugging to stay off for ajax calls because they were breaking the JavaScript response.
Thank you Steve and Tony for your help.

ajaxCFC documentation added

I just updated the ajaxCFC download with initial documentation. I’ll keep improving as there is always room for improvement, but it has the minimal explanations and instructions to install and use.

If I’m missing something please do not hesitate to contact me, I will appreciate it.

ajaxCFC synchronous form validation

Now for the synchronous advantages, I created an example that shows one of the advantages for synchronous ajax. Upon form submission, a simple JavaScript code check for required fields and alerts a single message with the errors summary (try submitting a blank form).

If the email is provided, an ajax call makes sure the user doesn't already exist. Emails are stored in the session, if you try to create the same email more than once, the JavaScript alert will inform you that the email already exists. The advantage of the call being synchronous is that is can be incorporated with the rest of the form validation.

This process is doable with asynchronous ajax, but the only way to do it is for the form validation to always return false, and the call back function re-submit the form if appropriate. This process start becoming tedious if you need to validate several fields, such as address, email, captcha, username, and any other you may think of. The only way would be that each ajax call had to be initiated in the call-back from the previous call, in a cascade fashion… then also storing all the different results if you wanted to display a single error alert summary.

by the way, I added the multithreaded example and this one to the ajaxCFC download.

ajaxCFC multithreaded example

For all those who still have doubts about multithreaded ajax, I built an example that illustrates the differences between ordered and unordered batches, as well as synchronous and asynchronous.

Ordered batches will force the batch length to remain at (1) at all times, waiting for a response to come back before sending the next call.

Synchronous batches will halt the batch until the callback function has been resolved, making the entire process single threaded.

Note that the synchronous process will take a few seconds… this process in not meant to be used like this, but I wanted to illustrate the consequences. There are extremely handy uses of the synchronous process, which I'll show in a different example.

More Entries

This blog is running version 5.9.003. Contact Blog Owner