I didn't realize my MT template didn't have a navigation for the pages I had created. So, they are there now. The column spacing at the top is weird but whatever. :-)

I'll add some more here soon.

I spoke with Delmore and Adam Lehman this weekend about the use of multiple javascript libraries. Ext 1.1 didn't have everything Ext 2.0 has so they had use multiple libraries. Makes sense.

For CF9...PLEASE GET RID OF YUI! The UI components are absolutely flakey. I've been able to reproduce tons of issues with cflayout tabs (I mean really horrible one's; haven't spent time debugging the JS though) and cftooltip (fix here).

So...no code suggestions or anything...just please nix YUI and fully integrate Ext 2 or whatever the current version is when CF9 comes out.

This is one I really want to see happen as it is HIGHLY useful, at least to me.

Idea
When querying a database I want to return a query but a query of a cfc instances (a value object [or bean...pending your terminology]). I don't want to return an Array of Structs though.

Code Proposal
On cfquery, add a resultType attribute. This attribute would take a path to a CFC. The resultType CFC should be nothing more than a value object (bean) based on the spec required by Adobe.

**Code Example **
[cfquery.cfm]
<cfquery name="mydata" resultType="cfcs.Product">
SELECT productID, name
FROM products
</cfquery>

<cfoutput>
#mydata.getProductName()[1]#
</cfoutput>

[cfcs/Product.cfc]
<cfcomponent>
<cfscript>
variables.productID = 0;
variables.name = "";
</cfscript>

<cffunction name="init" access="public" returntype="string">
<cfreturn this />
</cffunction>

<cffunction name="getProductID" access="public" returntype="numeric">
<cfreturn variables.productID />
</cffunction>

<cffunction name="setProductID" access="public" returntype="void">
<cfargument name="productID" type="numeric" required="yes" />
<cfset variables.productID = arguments.productID />
</cffunction>

<cffunction name="getName" access="public" returntype="string">
<cfreturn variables.name />
</cffunction>

<cffunction name="setName" access="public" returntype="void">
<cfargument name="name" type="numeric" required="yes" />
<cfset variables.name = arguments.name />
</cffunction>

<cffunction name="getDisplayName" access="public" returntype="string">
<cfreturn variables.name & " (" & variables.productID & ")" />
</cffunction>
</cfcomponent>

Time Saving Tip
This could be annoying to some (having to write extra code) but a query would still be a query if you didn't specify the resultType. You also could use onMissingMethod to get/set your variables instead of writing every single one of the getters/setters. Another option is to use or write a code generator.

Let's go Adobe...what'cha think?

I saw this online and thought it was pretty clever as well as useful.

Monday I ordered pizza from Domino's Pizza online. I finished my order and it went to the normal confirmation page. I was on another tab while it completed the order and I saw the tab title change to "Order Confirmation" so I ALMOST did a ctrl+tab (to go to the tab) then a ctrl+w (to close it). That was my initial desire but when I went to the tab I saw a lot of color which made me look twice and pause. What I saw was pretty interesting.

DominosPizzaTracker.JPG

The image above shows the current status of my pizza order as well as a message letting me know who is working on my pizza. The FACT-O-MATIC widget slides in different facts here/there to keep me interested while my order is processed.

I thought this was very clever and have been waiting for a long time to see more restaurants integrate their in-store system with their web site.

Go ahead...order some pizza from Domino's and take a looksy...I'm sure your inner-geek will like it too. ;-)

PS - It's built on the Flash Platform. ;-)

Alan, manager of the Phoenix ColdFusion User Group, asked me to give my cf.Objective() preso for the UG. I happily accepted. :-) So, here are the details.

When: May 28, 2008 @ 6:30
What: CF8 .NET Integration
Where: UAT (possibly via Adobe Connect as well but we'll see)

Description:
ColdFusion 8 adds a hot new level of .NET integration allowing ColdFusion developers access to the .NET Framework. Learn how to integrate ColdFusion 8 and the .NET Framework regardless of previous .NET knowledge.

See you there.

I try to stay away from the typical "Person X posted about Subject Y" posts but this seems relevant.

So...here goes..."Ben just posted about Adobe Feeds":http://www.forta.com/blog/index.cfm/2008/5/5/Goodbye-MXNA-Hello-Feeds. There...you have the big news. :-) I, for one, like the change in URL/name.

Check it out here.

What's up folks? I haven't blogged in a week or so due to the cf.Objective() '08 conference. I put a lot of prep into it and it seemingly paid off. I'll wait for the preso reviews to know for sure. :-)

Conference
The conference was fun. I put my face to my name for a good number of folks (Corfield, Camden, Steven Hauer, etc). They were folks I speak to via email/IM but we hadn't met in person. That was a good thing.

As for the conference sessions, I REALLY enjoyed Laura's preso on Mate (pronounced: mah-tay). I'm more on the side of Maxim Porges (no framework required) but Mate was really nice. It is a framework but your app can just use the event routing without coding it specifically for use with Mate, meaning you could easily nix Mate when you choose to roll your own (not so easy in Cairngorm and others).

Maxim Porges had a good preso on not using a framework. He just showed how to roll your own MVC. I prefer not using frameworks (in CF and AS) so the session rocked for me because he had really GREAT reasons why you don't have to use a framework.

Of course Tom Jordahl had a good BlazeDS preso. He knows that product intimately so hearing from him is always a good thing.

Nothing against the other presenters...there were other good presos but my wrists are hurting and I still need to code today so I'll stop here. :-)

My preso
As promised, here are my preso files (including PowerPoint). The C# and CF code is there. Fair warning...I'm using Visual Studio 2008 for the C# projects.

Enjoy!

Ok, I've been working on an article regarding LCDS + AIR and offline sync. I had everything pretty much done EXCEPT saving offline data back to the server (which I haven't tested with 2.6 B2 yet but will). Yesterday I installed LCDS 2.DS ES 2.6 and today I decided to toy with it. I jumped into the Dev Guide and looked at what they said was needed to do online/offline.

So I'm a skeptic at times when I see a little bit of code doing a lot but DANG! This time I was proved wrong.

airfds.swc, I'm assuming, handles creating a sqlite database and updating it. I won't spill the beans on all of the goods (my article will cover it more) but peep how flippin' simple this is:

contactsDS.saveCache(contacts);

Yep, that's it. contactsDS is my DataService and contacts is an ArrayCollection loaded from LCDS. There are other things to do for loading data from the cache and your LCDS implementation, as well as saving data back, but for the most part...WOW!

I'm loving it and keep rockin' Adobe/LCDS/Flex team!!

More to come...

cftooltip ignores attributes. Good thing is, I spent tonight figuring out what was up with it and have fixed it.

Background
cftooltip uses YUI (the Yahoo! UI Ajax library). CF actually uses the YUI Tooltip widget along with the YUI Event Utility to show/hide a tooltip on mouseover/mouseout.

Initial Code
I created a custom tag to encapsulate our tooltip functionality. The 'tag took just a few attributes (source, color, hideDelay). The issue was hideDelay WOULD NOT WORK! Here's the cftooltip code.

<cftooltip autodismissdelay="5000" showDelay="2000" hideDelay="#attributes.hideDelay#" sourcefortooltip="#attributes.source#">
<img src="/images/#attributes.color#.gif" width="16" height="16" />
</cftooltip>

No sweat, right? Wrong!

How does cftooltip work?
If you View Source on a page with a cftooltip, you'll see ColdFusion wraps your content in a span tag then assigns a listener. Well, granted...I'm using an img tag so maybe a div in the content of cftooltip wouldn't result in wrapping it with a span but I haven't tested that thought. Anyways...back to the post at hand. :-)

YAHOO.util.Event.addListener("cf_tooltip_1208158360141","mouseover",ColdFusion.Tooltip.getToolTip,{"_cf_url" : "/sometooltip.cfm","_cf_query" : "","context" : "cf_tooltip_1208158360141","hidedelay" : "15000","showdelay" : "2000","autodismissdelay" : "5000","preventoverlap" : "true"});

(**Update** Ignore extra spaces before the colon. MT is rendering it as a URL.)

That's the YUI code created for my tooltip which points to a file called /sometooltip.cfm and is supposed to show after 2 seconds, auto-hide after 5 seconds and if the user mouses off the image hide the tip 5 seconds later.

Sidebar: JS Coding
Ok, I'm a stickler for code and my first look at this, Friday, threw me slightly. Why in the world did the config object (last parameter inside the curley braces) have quotes around the property name and value? That seemed weird. Maybe it is so it works in an older browser version or something. Oh well...not sweat...it worked.

Back to "How it works..."
ColdFusion now has a ColdFusion javascript package named...(take a big guess)..._ColdFusion_. :-) I won't paste the cfajax.js file but it is located here: /CFIDE/scripts/ajax/package/cftooltip.js. There are two functions in this file. ColdFusion.Tooltip.getToolTip is the event handler for the addListener call (see above). The other one is ColdFusion.Tooltip.setToolTipOut which is called after a new listener is added to the tip for the mouseout event.

ColdFusion.Tooltip.getToolTip is where the problem resides.

The Fix
All of the code is legit and works. Don't be afraid by the variables with numbers for names. The 349 argument is the one to focus your attention on. If you do a _for...in loop you will see all of the parameters you passed into the config argument (see above). Everthing goes in perfectly fine but it seems YUI ignores all parameters. Why? Well, I haven't gone through the YUI code but I found a reason why it happens and here's how to take care of the problem.

Jump in your cftooltip.js and right before...

_34a=new YAHOO.widget.Tooltip(_349.context+"_cf_tooltip",_349);

...copy and paste the following:

if(_349.hidedelay != undefined) _349.hidedelay = Number(_349.hidedelay);
if(_349.autodismissdelay != undefined) _349.autodismissdelay = Number(_349.autodismissdelay);
if(_349.showdelay != undefined) _349.showdelay = Number(_349.showdelay);

Solution Explained
The problem is ColdFusion isn't casting the Number parameters as actual Number's. So either YUI validates those config params as Number's and if they aren't it ignores them as config params. It seems like the only valid reason but YUI has obfuscated their code and minimized it which I don't want to mess with.

So, to fix it we check to make sure the parameter of the 349 object exists then resets the value to the same value but casted as a _Number.

You can open your cftooltip.js and make the change above for your entire server (or that server instance if you're using a multiserver setup). If you use cfajaximport and set the scriptsrc to a local file you have BE SURE TO KNOW this is a change for ALL scripts on your site. So, you could get all CF Javascript files and put them in your site directory, set them with cfajaximport and only edit it for your site (how you'd probably have to do it with a shared site).

One other thing you could do is use <cfajaximport tags="tooltip" /> then directly use the YAHOO package but nix the call to ColdFusion.Tooltip.getToolTip and have the mouseover listener call your own custom function.

Anyways...I hope this helps because I looked all over and couldn't find 1 blog post about cftooltip not working. I had a business partner check and he found nothing either.

Adobe...please validate this fix and get it out there asap so the community is aware.

Our very own Robert Hoekman, Jr.'s newest book Designing the Moment; is on the shelves.

You can read Robert's thoughts on the book and his excitement to have his copy.

BUY YOUR COPY TODAY;. My order is in already.