« May 2007 | Main | July 2007 »

June 2007 Archives

June 15, 2007

How do you get Google Analytics to track AJAX requests?

An interesting question came up in conversation during my ride to work this morning: can Google Analytics track users if a site's registration process consists of AJAX calls instead of multiple page requests?

Continue reading "How do you get Google Analytics to track AJAX requests?" »

June 13, 2007

Icon-based and tree-format dialog boxes with CFTREE and CFLAYOUT

As a follow-up from my earlier posting on tabbed dialog boxes using ColdFusion 8's new cflayout and cflayoutarea tags, I'll explain how you can also use those same tags to create dialog boxes with expandable/collapsible trees or icon lists in the left-hand pane and forms in the right-hand pane. These kinds of interfaces will be readily recognizable by users since they're almost exactly the same as you'd find in a desktop application.

Continue reading "Icon-based and tree-format dialog boxes with CFTREE and CFLAYOUT" »

Tabbed dialog boxes with CFLAYOUT

With ColdFusion 8's new cflayout and cflayoutarea tags, you can now create tabbed dialog boxes like you'd find in any desktop application, complete with Save, Cancel, and Apply buttons. Users will instantly be familar with the interface.

Continue reading "Tabbed dialog boxes with CFLAYOUT" »

June 11, 2007

CF through a command-line interface part 2: programmatic calls

In a previous post, I noted Ashwin Matthew's technique of calling CF from a command-line interface with the use of cURL. This idea got me thinking. Using cURL to pass URL parameters to a script is well and good if you are manually typing the calls, but... what if you want to automate the process and and pass dynamic data whenever a certain event happens on your server?

For instance, I often write PHP scripts to automatically handle responses to certain emails that have been sent in to our company. Emails containing unsubscribe requests are processed so that the corresponding email is removed from our newsletter list; support requests get an autoresponse and are passed on to certain personnel; and I've even written a script for a web-based project management site that redistributed any email it received to a dynamic list of project members. All of these tasks happened automatically, as soon as our mail server received an email. Now I've figured out how to do the same thing with ColdFusion-- and this will work without event gateways and even if your mail server is separate from your web server.

Continue reading "CF through a command-line interface part 2: programmatic calls" »

June 7, 2007

A note to French waiters

A note to French waiters on how to correctly translate the menu item "petite friture" for your English-speaking customers: it's not as helpful to say "fried fish" as it is to say "fried fishes", or perhaps even "little fried fishies".

Imagine my suprise at having the dish below set in front of me at a cafe in Cassis, France, when I was expecting something more like a whole filet:

Petite friture, or fried fishes
"Petite friture". Click for a larger view.

I ordered this dish during a trip in France this May for our 10th wedding anniversary. While petite friture doesn't exactly look appetizing, at least to me, I have to admit that it didn't taste so bad. Nor did any of our waitstaff fit the stereotype of the rude French waiter-- they were all very friendly, and considerably patient with my poor attempts to converse in French.

June 4, 2007

What do you show users while you're upgrading a site?

If you're lucky enough to be performing a major site upgrade by switching to a new server, then your migration path is pretty simple: develop on the new server, test until the new application is stable, and then switch over to the new IP address. But if you don't have the luxury of a new server, you're probably going to have some downtime on the site while you upgrade to new code. So what code do you show your users in the meantime?

Since there could always be application-level problems during an upgrade (perhaps you're altering database tables, changing session defaults, or site-wide layouts), you probably want to stick with a static HTML page to show your message. So what I do is create a redirect in the application code, practically in the first few lines, which sends all users to a static HTML page. That page tells the user that the site us undergoing planned maintenance and will be back up shortly. The page also contains a 10-minute refresh back to the application. If you are still upgrading or testing and have the application redirect in place, users will be returned to the static page for another 10 minutes; if you're done upgrading and testing and have removed the application redirect, users will see your new, upgraded application.

June 1, 2007

Using CFTHREAD to create real-time "Loading..." animation pages

After reading Ben Nadel's piece on using ColdFusion 8's new cfthread tag, I started to wonder if threads could be used to create real-time loading pages (real time meaning that you see an animated loading page for as long as the background processing is going on, not for some arbitrary amount of time set by a web developer). For instance, travel sites such as Travelocity give you a real time loading page which reads "Searching for the best fares..." for as long as it takes to search on fares for your itinerary. And now thanks to the new cfthread tag, I believe I've found a way to do it the way that they do.

Continue reading "Using CFTHREAD to create real-time "Loading..." animation pages" »