Rob Gonda's Blog

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.

Advanced CF/Flex Contest Announced

Ray Camden announced today yet another contest. After the success of the beginner and intermediate coldfusion contest, this one deviated to another direction: you must use flex 2.0.

If I have time I'll get it this one, but I was expecting it to by ColdFusion.

Best Practices

I found these links, and both are very useful
ColdFusion Best Practices
ActionScript Best Practices
I also enclosed a print version of the CF one.

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

CFUnited is one step closer

CFUnited here I come! Just made my reservation at the lovely Bethesda North Marriott Hotel & Conference Center; well, assuming ;) I’ve never been there.
I’ll be staying 5 nights to make it to Tuesday’s pre-conf classes... If you plan to be there early, drop me a line so we can meet at the bar.

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.

Need opinions: FlashCom Vs. XML Socket

I'm researching the world of gaming and thus far I have to candidates: Flash Communication Server (1.5, or 2.0 Media Server), and XML Sockets.

I successfully deployed XML Gateways using a modified version of the default ColdFusion XML Gateway. For my purposes, both are working fine.

I'd like to hear comments on why I should decide on one or another… here're some queue points: price, scalability, reliability, and deployment time just to name a few.

FlashCom is way more expensive; even paying CF enterprise licenses. On the other hand, FlashCom has built in HTTP tunneling, allowing XML sockets to penetrate large corporation's packet filtering.

Both can be easily clustered. I have no benchmarks at all, but I could guess that FlashCom will handle load better.

Please provide your opinions; I'm hiring consultants on this topic, so expect to see more on this topic soon.

Spring < br /> Conference 2006

I'll be speaking at a rather large Macromedia UserGroup Conference (Ohio MUG). It's a full day with four different tracks, which some unfortunately I'll miss while I'm speaking :) I'll present two sessions, one on Ajax basics, and the second one will be for ColdFusion users.

The conference is extremely inexpensive too, but do not be fooled by the price; if you're in the area, do not miss this for anything.

Stop cfmail messages being flagged as spam

This is being an issue for me for a while: it seems like all cfmail emails are being caught as spam. Perhaps not by bldns, but outlook for example.

I found this post a few months ago that I think I should share.

In summary, do the following:

1) Change the cfmail from atrribute to '"#mailoutSender#" <#mailoutSenderEmail#>'
Apparently this makes the sender look more like a real account.

2) Add headers that cfmail doesn't include by default:
•    <cfmailparam name="Message-Id" value="<#createUUID()#@yourdomain.com>">
•    <cfmailparam name="Reply-To" value="#get_mailout.mailoutSenderEmail#">
•    <cfmailparam name="MIME-Version" value="1.0">

For more info, check out the original post.

More Entries

This blog is running version 5.9.003. Contact Blog Owner