Kinky ColdFusion Calendar System Now Has An Application File

Posted September 4, 2007 at 8:30 AM

Tags: ColdFusion

A few people have asked me where my DSN information is being set in my Kink ColdFusion Calendar system. This is a totally valid question seeing as it is not set anywhere in my code. Right now, my entire testing sandbox lives under a single Application. Due to that, and the fact that I was trying to make my free ColdFusion calendar system as simple as possible, I wasn't doing any additional work to set the DSN - I was just inheriting the DSN information from the sandbox.

To make the system more clear, I have now added a new build that has a ColdFusion Application.cfc file. This file is a very simple file and defines the Application settings, the page request settings, and a single event method - OnRequestStart() - which defines the REQUEST.DSN structure. In general, this is NOT "best" practice. You shouldn't be setting your DSN information for every page request; instead, you should cache the DSN object in your APPLICATION scope or something to that effect. Again, I was just trying to keep my sub-application as simple as possible.

Hope this clears up some of the confusion.

Click here to view an online demo of the Kinky ColdFusion Calendar System.

Post Comment  |  Ask Ben  |  Permalink  |  Other Searches  |  Print Page





Reader Comments

Rob Rawlins
Sep 6, 2007 at 1:12 PM // reply »
54 Comments

Ben,

One thing I've always wondered about the whole REQUEST.Dsn thing is why choose the REQUEST scope over APPLICATION?

When I first started developing about 2 years back everyone seemed to opt for the APPLICATION.Dsn option, but gradualy over time I've seen people move over to the REQUEST scope for storing this information, is there any particular reason? or just a developer preference?

Thanks mate,

Rob


Sep 6, 2007 at 1:16 PM // reply »
6,371 Comments

@Rob,

Excellent question. It has more to do with the way my test environment is set up. All of my testing lives under one environment, so I didn't want to make anything tied to the application - my test environment has literally thousands of files in it :) It really makes no difference in my testing, but I just didn't want to store anything in the APP in the testing.

In hindsight, I should have stored it in the APPLICATION scope. It would be a better choice.


Matt Bogdanovich
Jul 25, 2008 at 4:17 PM // reply »
3 Comments

hello Ben,

Thanks tons for the app. I got a great leg up on my project and you showed me things I hadn't thought of yet. Appreciate your site and your work.

Matt


Jul 25, 2008 at 4:23 PM // reply »
6,371 Comments

@Matt,

Always glad to help :)


Sgamuk
Jul 29, 2009 at 4:05 PM // reply »
2 Comments

Excellent work Ben.

One thing I would like to see in your calendar are the Federal holidays higlighted and labeled. That would be nice spiced up an event calendar.

Thanks for your work.


Post Comment  |  Ask Ben

Recent Blog Comments
Nov 7, 2009 at 5:53 PM
Ask Ben: Javascript String Replace Method
You can find here an advanced function that prepared with javascript replace function. This can make the first letters of words, sentences, lines and whatever you define automatically: http://www.m ... read »
Andrew Neely
Nov 7, 2009 at 4:56 PM
A Moment That Touched Me - The Fountainhead
Ben, Glad you enjoyed the podcast. Yeah, the Tank Riot guys can get really chatty during the episodes, but that's part of the charm of it for me. They've covered everything from Nichola Tesla to Cha ... read »
Nov 7, 2009 at 4:43 PM
Building A Fixed-Position Bottom Menu Bar (ala FaceBook)
Is it possible to make some more MenĂ¼`s ? ... read »
Jill
Nov 7, 2009 at 11:40 AM
How To Unformat Your Code (Like A Pro)
Derek, I think you might be right - sweet! Thanks for the link :) ... read »
Nov 7, 2009 at 11:25 AM
How To Unformat Your Code (Like A Pro)
I think it would be way easier to just use this http://www.logichammer.com/html-formatter/ He just released v3 and it rocks. ... read »
Jill
Nov 7, 2009 at 7:58 AM
How To Unformat Your Code (Like A Pro)
LMAO - this was pretty funny! I have to admit - I also love to reformat code so I can read it. My boss used to tell me to leave my OCD at home. Now I don't feel so bad after reading everyone else' ... read »
Nov 6, 2009 at 10:10 PM
How To Unformat Your Code (Like A Pro)
The timing of this post is just uncanny. I spent the last 15-20 minutes manually un-formatting my "Ben Nadel" style code within a CFC of mine. I was really digging the readability a few weeks ago, bu ... read »
Roe
Nov 6, 2009 at 5:11 PM
Passing Arrays By Reference In ColdFusion - SWEEET!
ArraySort also reorders the results of these java obj's ... read »