Learning ColdFusion as a Service

Two weeks ago I was honored to give a presentation on ColdFusion as a Service (CFaaS) at RIAUnleashed. I chose that topic because I had not yet played with this new ColdFusion 9 feature and I thought it would be an excellent opportunity to ramp up quickly. I had a lot of fun, and made some cool demos (all of which I’ll be posting in the next few weeks) but I ran into a few issues actually learning how stuff works. I tend to attack docs in a shotgun, scattered approach so it may be just me, but I found that - as a whole - the feature was a bit fragmented doc wise. So in order to help others learn, here is what I discovered and how I recommend approaching CFaaS. 1) You want to begin with Using ColdFusion Web Services which is found in the Using Web Elements and External Objects section of the ColdFusion developer guide. This talks about CFaaS from a pure service perspective and discusses security. The examples are in other languages (PHP, Java, .Net) since it wouldn’t really make sense to demonstrate CFaaS with ColdFusion. There is one important thing you should note though. While the docs focus on the “web service” aspect, you can use CFaaS as a REST based service as well. I built a jQuery/AIR CFaaS demo that uses CFaaS over simple HTTP requests. It may be obvious to others, but it wasn’t to me. Maybe most folks will use Flex and AIR with CFaaS, but I like to build HTML AIR applications as well.

2) The previous documentation makes absolutely no mention of the Flex support for CFaaS. That was really confusing for me. Turns out - Adobe simply split up the documentation. You can find information about Flex and CFaaS in the Proxy ActionScript Classes for ColdFusion Services chapter within the Flex and AIR Integration in ColdFusion section. This chapter demonstrates how to add the CFaaS swc to your projects and demonstrates Flex-based CFaaS examples.

3) Now - while Flex Builder has real nice hinting, I wanted to know more about what the swc file added. I found the ActionScript docs here: Adobe ColdFusion 9 Language Reference. I forget where I found this link, but I can certainly say that the title would not have been obvious to me. Also note this documentation mentions LDAP support which did not ship with ColdFusion 9.

4) Lastly, and this kind of falls into the obvious category, but don’t forget that all CFaaS calls go through CFC files on your server. You can always open up the CFC in your browser and view the automatically generated documentation. Unfortunately you can’t view the source as these CFCs as encrypted, but the documentation provided out of the box by the files themselves proved helpful during my tests.

Raymond Camden's Picture

About Raymond Camden

Raymond is a developer advocate. He focuses on JavaScript, serverless and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA https://www.raymondcamden.com

Comments