Rob Gonda's Blog

IBM Releases Ajax Toolkit Framework

IBM has announced the release of their latest offering to the web development community today, an Ajax Toolkit Framework (ATF).

JAX Toolkit Framework (ATF) provides extensible tools for building IDEs for the many different AJAX (asynchronous JavaScript and XML) run-time environments (such as Dojo, Zimbra, etc.). This technology also contains features for developing, debugging, and testing AJAX applications. The framework provides enhanced JavaScript editing features such as edit-time syntax checking; an embedded Mozilla Web browser; an embedded DOM browser; and an embedded JavaScript debugger.


The framework is a part of the Emerging Technologies Toolkit (ETTK) and does require a Windows machine (2000 or XP) to run it. If you’d like to download this toolkit, head over to their download site and grab it.

source: "Ajaxian.com"

CFUnited Preconference Classes posted

CFUnited just posted the list of pre-conference classes. I will be teaching an Ajax Intensive For ColdFusion Developers. If you have a chance, do not miss this hot topic! The session will teach you to implement Ajax from the ground up, providing you all the fundations to successfully deploy secure and robust Ajax sites/components.

CU214 - Ajax intensive for ColdFusion Developers
Ajax, Web 2.0, RIAs, single-page-applications are just a few buzzwords that every developer needs to know in 2006. Learn the history of Ajax, what it means to you, why you should pay attention, who is using it, what is available, and how to implement it. This session will get you up to speed with Ajax, compare the different existing frameworks, and provide you helpful tips of do’s and do not’s with Ajax.

Learn how to enrich your users experience by the use of AJAX. Examples start at --hello world-- and build up all the way to object oriented MVC applications. By the end of this session, you will know how to enhance your site through simple AJAX widgets or build full AJAX application including enhanced security and debugging techniques. Learn common mistakes such as delegating business logic to the client side, and learn to avoid them by keeping your logic in the server and loading scripts on-demand.

Find below the full list of classes:

CU210
Leader of the Pack (strategies for building better software) - Simon Horwith - Monday 6/26
CU211 Fundamentals of Relational Database - Kurtis D. Leatham - Monday 6/26
CU212 ColdFusion Server Administration: JRun J2EE Deployment - Adam Wayne Lehman - Monday 6/26
CU213 Testing ColdFusion - John Paul Ashenfelter - Monday 6/26

CU214 Ajax intensive for ColdFusion Developers - Rob Gonda - Tuesday 6/27
CU215 XML, XPath, and XSLT for ColdFusion Developers - Jeff Peters - Tuesday 6/27
CU216 Domain Modeling - Hal Helms - Tuesday 6/27
CU217 Beyond Basic SQL for CF - Nate Nelson - Tuesday 6/27

ColdFusion Open Source list now using ajaxCFC

The ColdFusion community open source projects list is growing, and there are several individuals helping the cause. Brian Rinaldi put together a very nice list of open source projects. After I changed my license, he chose to incorporate it to the site and use it for category filtering, and as expected, it's much faster than page reloads. Read how difficult was the experience from download to deploy on a very useful beginner's review of ajaxCFC.

Ajax: XMLHttpRequest Vs. iFrames

In my resent presentation in the CFUG someone asked me why should he switch from using iframes to XHR and I stumbled a little. There is not better or worse when comparing these two techniques, but they are certainly different. While both of them allow you to communicate with the server in the background, you should choose the appropriate for your situation depending on a few questions: Do you want the back-forward buttons to work? Do you plan to perform more than one simultaneous request? Do you need cross-site calls? Do you need to monitor the status of your calls?

I'm pretty sure there are more differences, and way around the ones I will mention for either technique, but out of the box, here are the differences:

                            XHR           iFrame
Multithread:       yes             no
Back button      no               yes
Cross-site        no               yes
Statuses           yes             no

Some people use iframes because it's easier to monitor… all you have to do is to show the hidden iframe and voila, you see the responses. On the other hand, I use several http traffic sniffers that give me even more accurate information, and they're extremely easy to use. So that's not a plus for me.

Multithread is huge... you could achieve this with iframes if you create a framework that will create a new iframe using dom, use it for the call and delete it once it's completed. When using XHR, you can easily create a new remote request with simple scripting.

The back button breaks by default when using XHR. Sometimes it is actually good, f.e, if I populate a city and state using a zip code, or check if an email has been taken prior to submitting a form I wouldn't like to add a history step, so I'm glad the back button doesn't recognize that request. There are ways around it too if you do need it to work. I will post some solutions/possibilities soon.

Cross-site scripting ... while you would like this to work to use web services, they do not really work with iframes either. When scripting with iframe you need to explicitly call a function in the parent or top window, so unless you control both sites, this advantage is useless. You can implement a server side web service proxy relatively easy and I would suggest doing that if you need to use WS.

Finally, statuses... with an iframe you do not know in that status your call is. With XHR you have 5 different ones: 0 = uninitialized, 1 = loading, 2 = loaded, 3 = interactive, 4 = complete. They are useful to provide the user with more accurate information.

In conclusion, most of the times XHR is preferable over iframes, but there are cases and cases. Google maps uses iframes, while google suggest uses XHR.

CFUG Ajax Presentation Files

I really enjoyed speaking last night at the cfug, and I had a great audience. I met a couple of the attendees, which actually may incline me to attend to more meetings :)

As promised, I'm providing here the presentation files I used (enclosed). If you need me to elaborate on any slide, please do not hesitate to ask.

For those of you who didn't make it for any reason, the presentation covers ajax101; I kept it basic and universal. Starts with definition, story, advantages, who's using it, gets a little into the xmlHttpRequest, mention some available frameworks, and provide a simple example using ajaxCFC.

Enjoy.

p.s. I also emails the presentation to Ron, so it will get posted at the South Florida CFUG site too.

* updated. Download the PDF version here if you don't have PPT 2003 installed.

CFUG speech first followup

I received a few questions after my speech last night at the South Florida CFUG; some by email, some by comments so I decided to address them in a new post. This is the first post, but more will come. Yaron asks:

1. DWREngine._execute function sends the callback function the structure received from the component. Is it possible to pass an additional element to that function as well?
Example: Call back function ReportInventory(getInventory) receives a query structure, but I would also like to pass a form field (e.g. Form.Sizes) for further manipulation within that function. Is this possible?

2. You mentioned, but did not have enough time to show us, a tool you use for debugging. I believe you called it an HTTP spoofer…can you tell me a little bit about it.
1. It is a good question, but unfortunately, it is not possible to pass additional arguments to the call handler. That change could be quite complicated, because the framework manages unlimited simultaneous requests in a batch, so I would have to create an additional structure to support additional information, link it to the request ID, check for it in the callback handler, and invoke your function passing the additional arguments.... I can add that to my to-do list, but honestly it may take a while. For now you can overcome it in two different ways: 1) you can save a globally accessible var in JS, or 2) you can send the values you need to CF and have it send them back with the response. The project is open source, and I am receiving some nice add-ons lately, so I encourage anyone who wants to take this challenge to give it a try.

2. To debug AJAX requests I use what is called HTTP sniffers. There are a couple of good ones out there and it will require a full post to explain them all and how to use them. For now I will recommend using HTTP Live headers if you use FireFox, or Fiddler if you use IE. A third, more complicated, and more powerful tool is Ethereal, but it goes way beyond HTTP traffic. I recently started using FireBug for Firefox too. It's really nice, I just wish you could detach it from the main browser.

Some sniffers will follow the request and response and provide all information in a centralized place, others will just show you the request, but if you're using the 'get' verb (default on ajaxCFC), you can copy/paste that request in a browser and call it directly. Doing this way you will see ColdFusion errors too.

When you're really to deploy your app live, change a few settings in ajaxCFC: use 'post' verbs, make it check referrer, and check sessions.

** updated, added Firebug for the http traffic sniffers

ajaxCFC License change

ajaxCFC used to be licensed under a restricted open source variation, but I realized that I was allowing everyone to use it anyways. I decided to avoid complications and license it under Apache 2.0

Enjoy

Ajax Seminars multiplying like viruses

SYS-CON Events (www.events.sys-con.com) announced today the speaker line-up for the upcoming "Real-World AJAX" (www.ajaxseminar.com) one-day seminars, added new venues; April 24, 2006 San Jose, CA; June 5-6, 2006, New York City; and October 2-3, 2006, Santa Clara, CA. SYS-CON will announce four more dates in March for Toronto, Chicago, Washington, D.C., and Austin, Texas.

The March 13, New York, and April 24, San Jose events are exclusively sponsored by the world's leading AJAX technology providers: Adobe, telerik, Backbase, Tibco/Perficient, and Microsoft. The sponsorship opportunities for the upcoming seminars will be made available on March 13, 2006 during the New York City event.

Happy birth-day AJAX (a day late ;) )

It's been one year since Jesse James Garret wrote the first article on Ajax, which gave a name to the existing technology and helped it to boom and reach magnitudes and a buzz never imagined by anyone before. It's still taking off, with new magazines, seminars, and articles everywhere.

Sorry, those links were bias :) but it's out there... check out Technorati, iceRocket, and del.icio.us.

cfQuickDocs is officially using ajaxCFC

If you don’t have it bookmarked yet, visit http://www.techfeed.net/cfQuickDocs/ which I can assure you will replace your Macromedia / Adobe LiveDocs. You probably know LiveDocs is JavaScript based, with tons of redirects, slow, heavy … cfQuickDocs is a light-weight Ajax driven version with excellent structure and search abilities.

Thanks Jacob for this worderful tool, and check out his latest post about switching quickDocs from cfajax to ajaxCFC.

More Entries

This blog is running version 5.9.003. Contact Blog Owner