Posts Tagged ‘ColdFusion’

Using Tropo WebAPI with ColdFusion

Thursday, June 14th, 2012

Tropo makes it excruciatingly easy to build voice and text applications in just about any programming language.  In fact, every time I do a live coding demo at an event or hackathon, I pick a new language to build a sample app…I try my best not to pick favorites.  But I’ve always had a dark skeleton in my closet that generates snickers and scorn anytime it’s revealed.

I started building E-commerce websites in 1996.  Back then there were only a few options if you wanted to build dynamic web pages that integrated with a database.  Microsoft’s ASP was still years away from being released. PHP was starting to gain popularity but was still very much in its infancy.  Many developers were still writing custom CGI or Perl scripts.  But there was one other option…

In 1995, brothers Jeremy and J.J. Allaire invented a new programming language called ColdFusion (CFML).  By the end of 1996, ColdFusion had already graduated to version 2.0 and had become a full platform that included an IDE in addition to a full scripting language.  I was instantly attracted to CFML because the tag syntax was very similar to HTML (which I already knew), and it integrated seamlessly into Microsoft Access and SQL Server databases (which I already knew as well).  And the ColdFusion Server application ran on Windows, which was my preferred OS.

In very short order, I was spitting out ecommerce sites and dynamically generated content.  Allaire kept adding features and built a very robust community of CFML developers.  When we launched Voxeo in 1999, the very first account management tool, the one that allowed the very first web developers to map phone numbers to a URL, I wrote in ColdFusion.   Jeremy Allaire found the idea of making phones ring with CFML so intriguing that not only did he demo a Voxeo phone app during his keynote at the ColdFusion Developer’s Conference in 2000, he was one of  Voxeo’s earliest Angel investors…along with Eric Schmidt (of Google fame) and  Jeff Pulver (of Voice on the Net, Vonage and 140 Characters Conference)…among others.

As you can see from the above chart, after PHP, ASP.NET and Java, ColdFusion still beats out Perl, Ruby and Python in global server-side programming language usage.  And, despite its historical ties to the ColdFusion community, Tropo has never had any documentation or examples showing how to build Tropo apps using ColdFusion…until now :)

I’m pleased to present the first ColdFusion tools and sample app for building Tropo WebAPI applications.  The first is a CFTropoJSON parser that takes Tropo JSON and converts it to something easily digestible by ColdFusion Code.  You can download the source here:  ColdFusion Tropo JSON

The second is a sample app complete with debugging logger.  The sample app uses CFTropoJSON to play a prompt asking for the caller’s year of birth.   The caller can either say or type the response, and then the code will simply play back the response.  It uses the Tropo “ask” and “say” methods, and also has the ability to capture and store the JSON that your ColdFusion app receives from Tropo (especially helpful when building and debugging apps).   The sample app is located here:  Tropo WebAPI ColdFusion Sample.

Both of these are located in this Tropo WebAPI ColdFusion Github repository.  If you’re a ColdFusion developer and like this kind of stuff I encourage you to test it, fork it, commit new things and make it CFAwesome.

My name is Diggz, and I’m a ColdFusion Developer.  ;)

Special thanks to Shane Smith, who coded the excellent CFTropoJSON parser and pretty much did all the heavy lifting here.