ColdFusion 8 Json Return Format and ExtJS

Yes, I am really enjoying getting back into JavaScript. The language really has changed since the days I was heavier into it (1998 thru 2001, maybe), so it's great to see how much it has grown. I feel like I've been ignoring an old friend.

[More]

Why Can't I Comment?...

I've been so head down, on several projects professional and personal, that I only just noticed a few weeks worth of error messages in Cutter's Crossing's email box. A very odd error about missing a captcha-hash-variable kinda thing (don't have one handy). So, I get my next door co-worker to pull up my blog and ask him to post a comment, any comment. Low and behold, in place of the captcha there was a broken image icon. That wonderful clear box with the red X going through it, that we all know and love. Simply reinitializing BlogCFC took care of the issue, but I realize I've missed out on valuable feedback.

If you're reading this, and you tried to comment earlier, please try again, and I'm sorry for the trouble. I'll try to keep a more vigilant eye.

In the meantime, I'm looking for some really outstanding (public) examples of a drag-and-drop page content editor interface. Some experimenting with some of the Ext (2.1) sample code says I should be able to do it, but I'm looking to see some clear cut, and tested, solutions. BTW, if you haven't looked at the extended examples that they put out with the 2.1 update, then you should. There's some very nice stuff in there, particularly dealing with layouts.

A Small Bug In AIR?

Well, maybe. One of my co-workers, Andy Matthews, has been working on a small app, integrating BlazeDS with ColdFusion to push messages to an HTML/AJAX based AIR application. He and I spent several days configuring the server integration and piecing out the ins-and-outs of how the messaging works (big thanks to Andy Powell on this too). Andy (Matthews), coming from a design background, created this beautiful chromeless HTML interface, with a little JQuery magic thrown in to work with the bridge. That's where this possible bug reared it's ugly head.

The question is whether the bug is in AIR, or within the Flex/AJAX Bridge itself. Basically, if you've defined your transparency setting to true, within your App.xml file, then the load() method of the bridge will not call the function reference.

Andy has submitted the bug to Adobe. He also dropped Christian Cantrell and Ben Forta (hey, it's who he knows...) the following email about the issue:

Christian/Ben...

I believe that I've discovered a bug in AIR and I'm not sure who else to send this to.

I've been working on an HTML/JS based AIR application for my company using BlazeDS. I'd finally gotten everything working in a test environment when I went to port the working code into my already working transparent, custom chrome AIR app. Then it stopped working.

After debugging, I found the reason, or at least part of it. It appears that an AIR app which uses the FDMSBridge.swf provided by Adobe WILL NOT work when the app has transparency.

In my sample app ----------------- 1) I opened my sample code (without transparency), and compiled it. 2) I pushed a message to the gateway and the message was successfully received in the app. 3) I then changed the transparency setting in the App.xml file from false to true and recompiled the app. 4) I pushed another message to the gateway and received nothing.

In the final app --------------------------------------------- 1) Transparency was already set to true, so I compiled the app 2) I pushed a message to the gateway, and received nothing. 3) I then changed transparency to false, recompiled the app 4) Pushed a message and successfully received it.

Further, when the app first loads, it correctly displays the alert window when transparency is set to false, but not when it's set to true. ------------------------ Here's a small code sample:

view plain print about
1FDMSLibrary.load("FDMSBridge.swf", initBlazeDSCode);
2
3function initBlazeDSCode() {
4 alert('why me');
5 var cs = new ChannelSet();
6 cs.addChannel(new AMFChannel("cf-polling-amf","http://domainname.com/flex2gateway/cfamfpolling"));
7 consumer = new Consumer();
8 consumer.setDestination("ColdFusionGateway");
9 consumer.addEventListener("message", messageHandler);
10 consumer.setChannelSet(cs);
11 consumer.subscribe();
12}
13
14function messageHandler(e) {
15 alert('got a message! I GOT A MESSAGE!');
16}

64-bit ColdFusion...On Windows

Yes, it has finally arrived. The ColdFusion 8.0.1 update was released this morning, which is huge news by itself. But, even more importantly, this also introduces a 64-bit version of ColdFusion for Windows, Mac and Linux in both the Enterprise and Developer editions of the server. This is huge, as 64-bit support was previously only available on Solaris. Now almost anyone can take advantage of the numerous advances in hardware technology that have occurred over the past few years, and finally be able to address the RAM capacity of these high powered systems.

Aside from the many advantages and updates that 8.0.1 brings to the platform, Adobe has also release updates to the Report Builder and the Developer Tools.

Code For Scalability

So, a guy by the name of Kyle Neath recently posted a disturbing observation from SXSW. His "most interesting bit" was the idea that Scaling is for nerds. Basically, while listening to some side chatter from Jakob Heuser, a speaker at the conference, he (Kyle) came away with the idea "...don't worry about scaling -- scaling is for nerds. By the time you hit pain points, you can bring in someone who really knows what they're doing. Most importantly, by the time you hit pain points, you should be profitable enough to not worry about bringing in someone who knows what they're doing." Now, something is a little out of context, as Jakob's topic, "Scalability Boot Camp," is on horizontal scalability, according to a recent post to his blog.

My first thought is "I hope this guy Kyle never writes anything in ColdFusion." It's not that we couldn't use some developers, my phone is ringing constantly with recruiters looking for good talent. No, I just think that ColdFusion developers need to have a better mindset than this guy. Part of being a good developer is thinking about your application's scalability, performance, and extensability. To blatantly ignore any of these during your development is to invite future disaster, creating a lot of additional work somewhere along the way. Even if your application might start off with only 10 users on initial product launch, you should attempt to design it as if it will be used by thousands, or more, at a time. This also helps to avoid utilizing the Big Ball of Mud design pattern, because eventually it won't stick to the wall anymore.

The scary thing is, this guy has been around a while. He's been working on the web for some time, he has a seemingly well trafficed site, and some N00b out there will read what he's said and take it to heart. To write an application, knowing that someone else will probably have to rewrite it down the line because you were to lazy to do it right the first time, is wrong. Not knowing any better is one thing, we all learn and grow every day. Doing it with full knowledge, on the other hand, is just irresponsible.

I hope I've read it wrong, and I hope you, dear reader, know better.

Last Call For The WebManiacs Early Bird Pricing

Today is the last day for Early Bird Pricing for the WebManiacs conference in Washington, D.C. at the end of May. They have a truly impressive list of sessions on ColdFusion, Flex, and AIR development, including a small presentation from yours truly on the second day. Sign up today while you can still get the Early Bird Pricing!

ColdFusion 8 Gotcha: The Decrypt() Function

So, at the office we've been developing on top of ColdFusion 8 for a while now, testing our code so that we know we'll be safe to officially migrate to 8 when we migrate to our new datacenter. Last week we actually set up one ColdFusion 8 instance within production, to place inside our load balanced environment, to judge true application performance under load. During the setup, and before placing it into the mix, I use the localhost hosts file to direct specific sites to the localhost for testing. This has always been helpful in the past, and this time was no exception. We fired up the services, hit one of the sites, and it all promptly broke.

[More]

30onair: Why ColdFusion?

At last night's Flex and AIR release celebration, Aaron brought out his new, 30onair branded, video camera for us all to record a 30onair segment. Mine was on ColdFusion (go figure;) The light was bad, and I had just gotten back from the dentist prior to the celebration, but I put my point across.

[More]

Guidelines: Code Readability - Pt1

At work I (with heavy input from the rest of the team) am writing these guidelines for our development practices, so that everyone is working 'on the same page.' I will share this series here for others who may want to know how some folks do it.

In everything there must be balance, two sides to every coin. A debate goes on about code "structure". To indent? Or not indent? One argument persists that unnecessary spaces/tabs within code increase the bandwidth used by our systems, serving up 'empty' content. The other argument is that this cost is minimal, in comparison to the time savings with relation to maintaining 'readable' code.

[More]

SQL Tricks: What's an Upsert?

So, despite the debate on utilizing an Active Record (sometimes called Table Row) design pattern, there are times when it can be incredibly useful. Especially when dealing with simple forms that deal with a single record within a table (go figure). It's also really handy if you're utilizing something like The Illudium PU-36 Code Generator to auto-generate your data modeling. But, occasionally, you hit a glitch and need to rethink.

[More]

Previous Entries / More Entries