Kinky ColdFusion Calendar System Now Has An Application File

Posted September 4, 2007 at 8:30 AM by Ben Nadel

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.




Reader Comments

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 »
11,314 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.


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 »
11,314 Comments

@Matt,

Always glad to help :)


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.


Nov 9, 2009 at 3:34 PM // reply »
14 Comments

Hi Ben,

I might be a little bit dumb on this, but how do I run the SQL to install the tables and columns etc? I've never worked with an SQL file before.

I'm using MySQL on my local machine via the query browser and administrator tools.

When I try and run the script, it gives me the following error:

Script line: 1 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[dbo].[event] (
[id] [int] IDENTITY (1, 1) NOT NULL ,
[name] [varchar] (100)' at line 1

Any ideas?

Thanks,
Mikey.


Nov 15, 2009 at 11:02 PM // reply »
11,314 Comments

@Unibands,

As I have started working with MySQL lately, one of the *biggest* differences that I have seen is that MySQL does not use the bracket notation to escape values, as in [somevalue].

There's probably more to it than that, but trying removing the brackets.

Honestly, though, you'll probably just have an easier time to just manually build the tables. From what I recall, there are only like 2 or 3 tables.


Nov 29, 2009 at 7:20 PM // reply »
2 Comments

Hi Ben,

I downloaded your calendar application a while back and have learned much from it, specifically, how to efficiently deal with event recurrence patterns in a CFML calendar application. I'm just stopping by here to say "Thanks!" This is another great time-saving and learning contribution.


Jan 9, 2010 at 10:50 PM // reply »
11,314 Comments

@Kevin,

Awesome my man - glad to help out.


Post A Comment

Comment Etiquette: Please do not post spam. Please keep the comments on-topic. Please do not post unrelated questions or large chunks of code. And, above all, please be nice to each other - we're trying to have a good conversation here.

Please review the following issues:

Author Name:


Author Email:

Author Website:

Comment:

Supported HTML tags for formatting: <strong>bold</strong>   <em>italic</em>   <code>code</code>







  • Help Wanted - Find Your Next ColdFusion Job
Ben Nadel's Company - Epicenter Consulting Recent Blog Comments
Jun 19, 2013 at 2:01 PM
Experimenting With The Amazon Simple Storage Service (S3) API Using ColdFusion
I have coincidentally been beating my head against the S3 API for the last week or so. One big "gotcha" I had to work around was file names and paths containing spaces. Remember to URL Enco ... read »
Jun 19, 2013 at 1:27 PM
Using Slice(), Substring(), And Substr() In Javascript
very good article. By the way IE supports negative values in substr or slice in verson 10. ... read »
Jun 19, 2013 at 11:33 AM
Filter vs. ngHide With ngRepeat In AngularJS
In your assessment, is it correct to say that given a list of say 500 items its more performant to use the `ngHide` method over the `filter` method? ... read »
Jun 19, 2013 at 10:18 AM
ColdFusion Path Usage And Manipulation Overview
Anyone happen to know if the file created by getTempFile will be automatically removed at any point? Nothing mentioned in the docs, and restarting CF doesn't remove them, so it seems it needs manu ... read »
Jun 19, 2013 at 9:41 AM
Working With Inherited Collections In AngularJS
I actually just ran into this same situation with a demo I was putting together. Your implementation of multi-lvl $scope's > Mine :) ... read »
Jun 19, 2013 at 8:17 AM
My Experience With AngularJS - The Super-heroic JavaScript MVW Framework
@Prateek, to match a word or text you should use .toContain('word') that's a jasmine reference. website is : http://pivotal.github.io/jasmine/ ... read »
Jun 19, 2013 at 8:10 AM
My Experience With AngularJS - The Super-heroic JavaScript MVW Framework
Hi Guys, Actually i am doing e2e test of angular js of my project but i am not getting one thing that is how to press enter key through the test when my form is filled as i am not using a button but ... read »
Jun 18, 2013 at 9:20 PM
Mapping AngularJS Routes Onto URL Parameters And Client-Side Events
I couldn't find examples of passing multiple arguments using the when() routing statement so figured out through trial and error that you can pass multiple arguments using the following format: .whe ... read »
InVision App - Prototyping Made Beautiful With Prototyping Tools