Twin Cities ColdFusion User Group Meeting - My Preso and Fred Anderson's SparklineCFC

I just finished my presentation at the Twin Cities ColdFusion User Group and I think it went swimmingly. I presented "Application.cfm to Application.cfc". It was my first public ColdFusion presentation, but I think it went very well. I did not make any horribly embarrassing mistakes (I think) and no one threw anything at me. We had a pretty good turn out (about 30), and I think most people stayed until the end.

Fred Anderson also presented this evening on data visualization with cfimage and SparklineCFC. It was an impressive presentation with some great examples of how these tools can be used to present data. I certainly like the results that I saw and the practicalness of using his methods for large amounts of data, versus using cfchart (which is a little bloated if you want dozens of charts on a single page). I will definitely be spending some quality time with SparklineCFC in the future.

I would like to thank Troy Pullis, the user group manager, for having me there to present. I had a great time and I really hope he will have me back again. And, of course, thank you to everyone that attended.

Comments
Jason Dean's Gravatar I forgot to mention, my presentation is attached as an enclosure to this post. Click on the "Download" link at the bottom of this post to download the zip file.
# Posted By Jason Dean | 6/4/08 11:54 PM
Laura Norris's Gravatar Nice PowerPoint! A great intro to Application.cfc!

A quick question...

Each application on our site has its own application.cfm which includes the root app.cfm to set global request variables for the entire web site. When I convert the site to using app.cfcs, would I create a custom function for these global variables in the root app.cfc to be called by the sub app.cfcs in onRequestStart()?
# Posted By Laura Norris | 6/12/08 12:45 PM
Jason Dean's Gravatar @Laura, thanks for the comments

You could set all of your global vars in the root application.cfc and then create (in the web root with your root App.cfc) and ApplicationProxy.cfc that uses the "extend" attribute to extend Application.cfc. Then your sub applications could extend then ApplicationProxy.cfc.

If you do this, be aware that everything gets extended, so if there are pieces you do not want extended to the sub apps, then you may, instead, want to create a base.cfc that contains all of your global vars and then have all of your Application.cfc's extand that.

Also, keep in mind, thet if you were creating global vars in your Application.cfm without scopeing them and then using them like this: datasource="#dsn#", you will be surprised to find out that it doesn;t work that way in Application.cfc. If you set a variable without scoping it, it will place it in the local scope of the Application.cfc object and will be inaccessible.

The work around for this is to place those global variables into an onRequest method in your Application.cfc. But I do not recommend this. You can see more abouyt it at this post:

http://www.12robots.com/index.cfm/2008/5/27/onRequ...

Personally, i think you are better off placing all of your Global variables into the request scope in your onRequestStart(0 method and then doing a find and replace to scope all of those variables with request.



The you could call it inside of each of the sub application.cfc with the systax:
# Posted By Jason Dean | 6/12/08 1:10 PM
BlogCFC was created by Raymond Camden. This blog is running version 5.9.1. Contact Blog Owner