Second ColdFusion Tutorial for Web Designer Magazine

I've only just managed to pick up March's edition of Web Designer, and it has the second of my ColdFusion tutorials; The Basics of ColdFusion Coding.

Not very interesting for the seasoned ColdFusion developer, but then these tutorials aren't for you (though be sure to pick up the mag anyway, and give it support. If we want ColdFusion to have more exposure in the non-CF press, then we as a community need to increase their sales. No, I wasn't paid to say that heh).

These tutorials will hopefully tap into some of the other development communities, and at the very least, offer some exposure of ColdFusion to them. If a few decide to give ColdFusion a go - not to necessarily dump their existing skills in favour, but more to give them another tool in their belt - then it's a job well done.

My third tutorial, due April, exposes some of the new features of ColdFusion 8 including; PDF Interaction, Image Manupulation and Presentations on Demand.

Oh yeah, CFEclipse also gets a good deal of exposure in the tutorial.


Snip... snip... snip

Snip-a-thon 2007 is underway, and there's plenty of prizes up for grabs if you join in.

It's quite simple, just head over to Todd Sharp's blog entry and follow the instructions to get involved.

I use quite a few snippets so hopefully I'll sneak in front of Scott Stroz...


Using SVN to assist in commenting your code

I'm quite heavy handed when it comes to commenting my code.

As well as inline comments, I always have a config comment at the top of every file.

In addition to basic information such as Author, Filename, when the file was created, I use Subversion to get information such as: the current revision, when was the file last updated, who updated the last file.

To automate the process, I have a CFEclipse snippet that is saved as a template (require separate ones for both CFM and CFC files). So when I create a new file, I create it from the template, and this runs the snippet automatically, prompting me to fill in certain information. You can see the snippet below.

<!---
Filename: $${CURRENTFILE}
Creation Date: $${DAYOFMONTH}/$${MONTH}/$${YEAR}
Original Author: $${author}
Revision: $Rev$
$LastChangedBy$
$LastChangedDate$
Description:
$${description}

Methods:

$${methods}

--->

Once I commit this file to Subversion, the Subversion properties are populated, meaning I end up with something like below.

<!---
Filename: weatherProxy.cfc
Creation Date: 18/July/2007
Original Author: Andy Allan
Revision: $Rev: 45 $
$LastChangedBy: allana $
$LastChangedDate: 2007-07-18 12:24:59 +0100 (Wed, 18 Jul 2007) $
Description:
This is our proxy CFC, which in turn calls the Yahoo weather CFC as part of Ray Camden's Yahoo API package.

The component works by first being init'd, recieving a list of towns to which we have to retireve weather. At the moment this is passed in, but in time we will retrieve this information from a database as it will match all the locations for the company.

On init, we call getWeather() passing it the list of towns, and this method loops through the towns returning the weather data for each and storing in an Application
variable structure.

We then use getMyWeather() which accepts a town as an argument to return the weather data specfic to that town.

Methods:

init: This is our constructor method, which MUST be called before any other method. It takes a single
argument "datasource" and returns itself.

getWeather: private function that loops through all the companies locations, getting their weather data and storing the data in an Application structure.

getMyWeather: method which returns the weather for a specific town.

--->

To get Subversion to actually populate your comments you need to assign a new property to every file/folder in your application.

You can either do this by running the following command:

propset -R svn:keywords "Rev LastChangedDate LastChangedBy" /pathToFiles/trunk

Or from within CFEclipse, simply right click your Project folder and choose "Team" > "Set property" and then add the new property as indicated in the image below.

New SVN Property

With every commit, you'll now see the most up to date Subversion information directly in your comments.


CFEclipse 1.3.x Goodness

A wee bit late I know, but make sure you get a hold of CFEclipse 1.3.1.1 before your teeth fall out.

It's chock full of codey goodness.

Oh, and if you downloaded v1.3.1 after Mark's initial announcement, he quickly fired another release out the door after a wee bug was found.


CFEclipse and Fusion Debug

This hasn't picked up much coverage yet (other than on Mark Drew's blog), but the latest release of CFEclipse is being bundled with the recently announced Fusion Debug 2.

Update

Looks like I wasn't clear, but yeah, just to confirm, if you buy Fusion Debug then you get Eclipse 3.2 and CFEclipse 1.3 as part of the installer.

Of course, if you download the 30 day trial, you still get Eclipse and CFEclipse and FD will expire after the 30 days.


CFE: The infection is spreading

Yes, no doubts by now you have seen the rapid blabbering of madman spew forth tales of destruction as CFEclipse 1.3 hits the streets.

Along with the new website (which will expand greatly over the next week) it's a most splendid day.

Kudos to Mark ...


The wait is almost over ...

Coffee For Everyone.


Something Wicked This Way Comes ...

%63%68%65%63%6b%20%69%6e%20%2f%63%6f%6e%73%6f%6c%65


Scotch on the Rocks 2008