Wednesday, January 22, 2003

Great 2nd step to getting started with CF/Flash integration

What's the second step to getting started with CF/Flash integration, for those with no prior Flash experience? Check out chapter 23 of the latest CFWACK. Nate Weiss has done a fabulous job, explaining much more in 30-some pages than many articles combined. Of course, that's the advantage of having a whole chapter. Like my recommendation earlier today in my previous posting, where I commended a recent CFDJ article by Ben on the subject, Nate's chapter in the ColdFusion MX Web Application Construction Kit is hands down the best intro I've seen. Again, the point is that he doesn't presume any prior Flash experience.

I hate to indirectly knock those who've done other such articles and even books, but they invariably seem to forget that total newcomers to Flash (while perhaps very experienced programmers in CF and other languages) just get flummoxed when they open Flash for the first time. And if they try to follow the typical "getting started in flash" resources, such as the product's manual, or the help files/samples/tutorials that come with the product, or nearly every Flash book out there, those all suffer from presuming that the reader is interested in learning about drawing/animation/sound/video, etc. These are clearly its benefits over other graphics tools, but they're not what float our boat.

Having to wade through several chapters just to learn the most basic interface fundamentals is a real turn-off for many, but the average remoting books again presume that foundational experience. It was enough to motivate me to start working on the book I described previously, and as much as I might be well-served by keeping my mouth shut about Ben's article and Nate's chapter and just getting my book done, I'm instead using this opportunity to spread the word.

There is a lot of discontent and doubt, as well as downright disdain and misinformation about the prospects of integrating Flash for front-ends (in whole or in part) for CF (and other server) apps. The sooner people get started with seeing just how easy it really can be, the sooner perhaps we'll quell all those ill-formed opinions. There's certainly a lot more to learn than just what's covered in these two resources--which is why I want to do a book to pull more together. But again, if you get these two under your belt, you'll be well-served to take on all the other great resources spread out there in various forms.

As I say in my user group talk, learning this Flash/CF integration is like getting up on a 12 foot wall. It's so cool up here, but you just need a little hand to get up. These two resources do that, and the rest, as they say, is "bud-duh" (or, butter, meaning simple).

Anyway, to get back to Nate's chapter, what's cool is that he not only shows you how to use remoting with CFCs, he also shows it with the new Flash variables scope, as well as also including some sample code doing things "the old way" without remoting, so that one can apply the same techniques to non-remoting servers (including CF5, PHP, perl, you name it). No, it's not new news, but the point is that those who haven't been able to get into Flash have likely not learned that news. Nate even offers a nifty example of using some practical and easy animation. Again, all in all, a quite complete introductory discussion of the topic of Flash/CF integration.

I daresay that even if you've ignored buying the CFWACK because you already have a couple previous issues, this chapter alone may justify the cost (less then $35 at buy.com as of yesterday). Check it out! :-)

Great first article for folks considering Flash/CF Integration

If you've been annoyed by Flash Remoting articles that presume you already understand Flash, there's a great article that quickly walks you through the basics without expecting any prior experience with the Flash interface. A hearty congrats to good ole' Ben Forta for his November CFDJ article, Data Entry ReFORMed. In my mind these are the best 2300 words I can recommend to someone looking to get started with integrate Flash and CF, especially if you already appreciate the power but have looked at various samples and said, "yeah sure, but I can't do that".

Now, don't get me wrong. The various remoting articles at the DesDev, as well as other recent articles in the CFDJ and those at sites like flashcfm.com and mxdev.com are all also fine for showing how to do remoting, but they all presume some Flash experience. As soon as an article says something like "place this actionscript in the actions panel for the first frame", they've lost anyone who doesn't yet know what that means. And while some offer a pre-built flash file to get the reader started, that's no good if the reader isn't shown how to get the file to that point. Ben's article walks you through the bare minimum needed to get started.

And the really cool news is that if you read Ben's article, you'll have enough to be motivated and capable of then enjoying all those fine resources.


Flash/server integration is something I've really come around to after my own painful exploration in the past several months of dozens of books and many more articles. I plan to start sharing more and more. In fact, I've already got a new user group presentation, "Flash for CFers: Getting Over the Hump", available for presentation to any groups that would like me to present it. You can see the PDF of the slides at my site. I'm also exploring being able to present it remotely, whether live or recorded. Let me know if you're interested.

I'm also working on a day-long seminar of the same title to be available soon, and possibly a 3 day class, and also a book. Look for my site and this blog to offer many resources and lessons learned.

Finally, an HTML-only CF PetMarket

A new article on the Macromedia DesDev center announced that there's an HTML-only version of the demonstration PetMarket application. The Flash one was impressive, but for an apples to apples comparison with the Java PetStore and .NET Pet Shop, this is the one I've longed for.

And great news: the CF version takes just 20 templates and about 1500 lines. The J2EE one is a staggering 14,273 lines and even the .NET one is 3,484. Put that in folks pipes to smoke! Of course, some will complain that lines of code is no way to measure the efficacy of an application, yadda yadda yadda. Hey, we all know that CF can just kick butt when it comes to doing things in fewer lines of code, and anyone who's created J2EE apps or even just tried to get started is not surprised by this nearly 10:1 ratio.

Learn more at http://www.macromedia.com/desdev/mx/coldfusion/articles/petmarket.html and get it at http://www.macromedia.com/desdev/mx/blueprint/instructions_cfhtml.html.