Rob Gonda's Blog

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.

CFunited Marriott sold-out, and alternatives

I already booked my CFUnited room, but for those who haven't check the following information that was provided by Joshua Cyr

It turns out that Marriott is booked solid. Doh! I just did some research. There is a very close hotell called Park Inn Rockville, but it is being closed permenantly next week.

The two others that seem within walking distance are the DoubleTree and Ramada Inn. The Ramada in is only $125 a night (give or take), where the Doubletree was about $225.
Joshua, thanks for looking out.

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

ColdFusion, sql, and time zones

so I was researching globalization the other day, more specifically, timezones.... and let tell you something, it gets complicated. All this different timezones, day time saving, more savings are 1h, some are 2h, countries change from DTS to not in different dates... It seems like one of the best ways is to use the timeZone classes built-in the JVM. BTW, I found that some of the provided info is wrong and I reported it to Sun.

I actually wanted to find a solution built in SQL because I'd like to be able to query for specific times for different user profiles without having to update them to UTC every so often ... does anyone have any better solution?

I built a database table with all the different timezones, pointed them to countries, added DST and offset hours... but I'm 100% convinced that it is the best approach. Suggestions?

I found a few good links:

Macromedia Talks about it
Blog dedicated to globalization
CFC providing nice funcionality

P.S. I do not want to rely on external web services.

This blog is running version 5.9.003. Contact Blog Owner