TerrenceRyan.com

I'm a 35 year old redhead geek from Philly.
I'm currently a Developer Evangelist for Adobe.
Also the author of Driving Technical Change

Entries for month: February 2009

ColdFusion Makes Hard Things Very Easy

This is not the first time I've made the claim that ColdFusion makes things easy. This has been my chief reason for loving ColdFusion from day one. I'm going to take a few tasks, and show you how easy ColdFusion makes them.

Get some data out of a database and display it on a page:

<cfquery name="results" datasource="cfartgallery">
   SELECT    firstName, lastname
   FROM    app.artists
</cfquery>

<cfoutput query="results">
#FirstName# #lastName#<br />   
</cfoutput>

Querying from a database using CFQuery just feels natural and easy. I personally hate saving SQL to a string, then attaching it to query object that I then execute. Looping over the results of query is also simple and straightforward. I don't have to worry about addressing the query in a collection or other structure, CFoutput handles looping over the results and pointing my call of "firstname" to the firstname column in the current row of the results.

Send a short email to someone:

<cfmail to="terry@terrrenceryan.com" from="terry@terrenceryan.com" subject="A test mail">
   This is a test message
</cfmail>

Similar to the database query, sending mail from ColdFusion is just drop dead simple. More than that, it's pretty intuitive. It's hard to not understand what is going on here.

These are pretty standard, and most tools have patterns written for them to make this sort of basic functionality easy to write. So let's take on some harder tasks.

Create a PDF from some content:

<cfdocument format="PDF">
   <p>Hello World</p>
</cfdocument>

I contend that printing a document to the PDF Print driver takes more effort than doing it in ColdFusion. Feel free to disagree.

Create an image for use in CAPTCHA testing:

<cfimage action="captcha" text="rEadMe">

Notwithstanding everyone's hatred for CAPTCHA, that's shockingly easy to create a CAPTCHA image.

Okay, again nothing we did was too crazy but you have to admit that is some really easy, concise, easy to comprehend code. Let's do something a little harder.

Pull all appointments named "Lunch" from your Exchange Server:

<cfexchangeconnection action="open" connection="exConn"
      server="#mailhost#" mailboxName="#mailbox#"
      username = "#username#" password = "#password#" />


<cfexchangecalendar action = "get" name = "calendar1" connection = "exConn">
   <cfexchangefilter name="subject" value="Lunch" />
</cfexchangecalendar>

I've said it before, the only way of working with Exchange that is easier than ColdFusion is Outlook.

Pass a result generated from .Net to a Java string for use by a custom Java Library:

<cfset pwd = CreateObject(".Net", "System.IO.Directory").getCurrentDirectory() />
<cfset jString = CreateObject("java", "java.lang.String").init(pwd) />

Interoperability between .Net and Java, in two lines of code? That's kinda ridiculous.

Now, to be clear here, I'm not saying you can't do all of this in other languages, I'm saying this is the easiest I've ever seen it done. The team behind ColdFusion has done a great job of balancing between encapsulating the difficult, but making it easy to go beyond what they enabled. All of the tags used in the examples have many more attributes that you can use to fine to the behavior show off here.

This was a overview of how easy ColdFusion makes it to do hard things, in the next series post I will talk more about what you can do with ColdFusion when ColdFusion can't do what you want it to do. (That's not a typo.)

ColdFusion's Advantage

Jeff Porten commented on my post about Getting Started Developing in ColdFusion and challenged me to show him how "does [ColdFusion] blow the doors off my existing toolset." So I figured I would talk in greater length about the features of ColdFusion that made me a loyal customer and makes me believe in it enough to base my livelihood on it.

I think there are 3 major areas where ColdFusion blows away other toolsets that solve similar issues:

Instead of turning this post into a huge treatise on ColdFusion, I'm going to run a short series on these entries over the next week.

New AIR Marketplace

The Adobe AIR Marketplace has been updated. If you are not familiar with it, the market place serves two roles:

New features include:

Link: http://airmarketplace.adobe.com

How to Get Started Developing in ColdFusion

I've seen a couple of tweets around this, and instead of trying to answer every one in 140 characters, I'm instead going to point people to this article.

Get the Developer's Version of ColdFusion

The developer's version of ColdFusion is free. It's not a trial version; it is just free, but with a few restrictions. It is limited in the number of IP addresses it will answer to, and certain featured like cfdocument and cfchart get watermarks placed in their generated content. If you purchase a licensed copy, this version can be upgraded without a reinstall.

In addition to the Developer's Version a Full trial version is available. It is not limited in ability, but will only run for only 30 days. If you purchase a licensed copy, this version can also be upgraded without a reinstall.

Download the free developer's version or trial version of ColdFusion

Also I will point out that if you are a member of the Faculty, Student Body, or Staff at a Higher Education institution using ColdFusion for academic purposes, then you are eligible for a free license.

Apply for a free license of ColdFusion for Education.

Pick an Editor/IDE

There are a few options to choose from for editing ColdFusion. Obviously any text editor will work, but there are a few choices if you are looking for an editor with language support for ColdFusion.

Dreamweaver has color coding, language reference and RDS integration with ColdFusion. It is an especially attractive option if you are coming from another web technology and already working with it. If not you can also try it out its demo version.

Download the trial version of Dreamweaver

CFEclipse is a pretty full featured editor for ColdFusion. It is an especially attractive option if you are working with Eclipse already as a Java developer, or using Flex Builder.

Getting started with CFEclipse

Finally, although it is not available today, the Adobe project currently named "Bolt" is a ColdFusion IDE. I'd bet on it becoming the standard tool for ColdFusion development when it comes out.

Learn more about Bolt

Learn about ColdFusion

Pretty much everyone will point you to the Adobe ColdFusion Web Application Construction Kit, Volumes 1, 2, and 3. Combined they are pretty daunting, but you are just getting started, so buy volume 1 for now. Disclaimer: the first author of the book is Ben Forta, for whom I work. I would still recommend it even if I didn't.

Get the book at Amazon

Also available is community member John Farrar's book ColdFusion 8 Developer Tutorial. I haven't read it, but check it out and see if it is more your style.

Get the book at Amazon

In addition to the book route, there is a ton of information available on the Adobe Developer Center. The include simple how to's and higher level articles like theory behind high availability.

Connect with Other ColdFusion Developers

There are several ways to tap into the ColdFusion Community. Here are just a few:

Also deserving special mention is ColdFusionBloggers.org. This site was setup by Ray Camden, and is a ColdFusion only blog aggregator. Ray's pretty aggressive about policing the list (and publicizing the site ;) ) so in many ways it's a better resource than AXNA.

ColdFusionBloggers.org

Get Open Source ColdFusion Code

A few years back Ray Camden started RIAForge as a place to store Open Source applications written for ColdFusion and Flex. Currently it has over 600 projects. Check it out before you try and reinvent the wheel.

RIAForge open source code for Adobe technologies

Online Video Presentations

There are a few collections of ColdFusion audio and video presentations by some of the best voices in the community.

I'll add more to this as I find new ones, or people point out to me which obvious ones I've forgotten or not explained enough.

Congrats, Adam

Early today, Adam Lehman officially announced that he was taking the role of Product Manager for ColdFusion.

I can tell from my own personal experience with Adam, especially during the past few days, that there are very few people on the planet that are as intensely passionate about ColdFusion as Adam. I'm thrilled to continue working with him in his new role.

Life on the Inside

I'm in a weird place. Last week I was an Adobe community member, now I am an employee. Last week I thought I knew hidden unspoken motivations behind Adobe's actions, now I know I didn't even come close to guessing them. Last week Ben Forta was that guy on the stage giving keynotes, now he's my boss' boss.

Mind you, I'm not complaining, it's as awesome a gig as I've imagined, but it's still a shock to the system. But I figured, while I'm still fluent in being a community member, I'd share some observations before they slipped away.

Things I Expected:

Things that surprised me:

All in all, I'm in awe that I get to work here. I can't wait to see what I learn next week.

Name This Product

I'm going to do a little exercise. I am going to describe a product. Tell me what technology product I am talking about:

So... What am I talking about?

Apple, what product did you think I was talking about?

I guess I'm trying to point out, that I've been thinking a lot about a particular product's place in the collective common wisdom, and perhaps we need to change it. But before we change it externally, we need to make sure internally in the community, we know what we offer.

Categories

Monthly Archives

Tag Cloud

coldfusion web development flex coldfusion builder appearances squidhead coldfusion builder extensions higher ed flash builder air mobile android adobe apptacular html5 driving technical change running a coldfusion shop adobemax06 movable type flash catalyst flash blackberry adobemax07 adobemax08 hero finicky css adobemax09 holy crap i’m a mobile developer centaur basecamp cfc unfuddle motorola metablog irrational characters ios git evangelism devices code reviews ant wharton subversion security phonegap philly philadelphia multidevice knowledge@wharton jobs browserlab adobemax10 adobe tv unfuddlecfc svnauth.cfc semantic html semantic html responsive web design qnx nlb linux jquery mobile java it github flexorg fireworks edge eclipse dreamweaver apps apple adobemax11