Exercise List: ColdFusion Site Skeleton

Posted October 26, 2007 at 2:45 PM

Tags: ColdFusion, Exercise List

Click here to view the current Online Demo

Click here to view / download the current Code Base

Now that I have built a generic HTML template, I have taken that template and broken it out into a simple ColdFusion site skeleton. I am not using any framework here; I am really not putting in a lot of stuff. The only noticeable pattern is the front-controller pattern in which all requests are directed through the ColdFusion index.cfm page.

I am trying to keep this as simple as possible. I don't want to get distracted by all the glitz and glam of a framework. I am here to learn object oriented principles, and that's all. This is not journey into the practices of optimal site design - this is project aimed at the understanding of data access and modification. To me, the two subjects can benefit from each other, but the are not tied together by law. I don't want to waste time trying to understand object oriented program (OOP) in the context of a framework, I want to put all my effort into understanding the OOP alone.

I have tried to put in place holders for every file that I think I will need. None of them function in any way, but none of the links are breaking. Here is a very rudimentary schematic of how the site functions:


 
 
 

 
 Exercise List: ColdFusion Site Skeleton  
 
 
 

Now, time to start fleshing out the pages. Each page consists of a query file followed by a display file. I guess this is some what FuseBox'ian, but very simple. The query files will do both the page queries and the form processing. Again, I am not worried about page flow, I am worried about data access.

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



Learning ColdFusion 9 - ColdFusion 9 tutorials, samples, examples, demos

Reader Comments

Oct 27, 2007 at 4:44 AM // reply »
2 Comments

And If can error be in a search, add, delete, and why error stands separately?


Oct 27, 2007 at 4:11 PM // reply »
6,516 Comments

Error stands sepperately because it is handled by the Application.cfc directly in the OnError() event method. The index file cannot display an error page.


Oct 28, 2007 at 11:29 PM // reply »
1 Comments

What do you think of using the onRequest function in application.cfc to handle the control of the application instead of the index.cfm?


Oct 29, 2007 at 7:23 AM // reply »
6,516 Comments

@raZorTT,

While I think logistically, it would do the same thing, you still need to call a .CFM page for the ColdFusion Application Server to work. Since you cannot call the Application.cfc directly, the index.cfm is required. And, as long as it is required, you might as well put your page controller logic in there.

I think it is actually nice to have it in the index.cfm since it separates the controller logic from the application / request initialization logic. You know which file contains which data for faster access and less clutter.


Post Comment  |  Ask Ben

Recent Blog Comments
Nov 21, 2009 at 5:15 PM
Using ColdFusion Structures To Remove Duplicate List Values
@Jose Galdamez, Oh heh yeah I didn't paste the whole code. I should have defined the vars -- my bad. It's fixed thou. Thanks. ... read »
Nov 21, 2009 at 4:49 PM
Styling The ColdFusion 8 WriteToBrowser CFImage Output
Great work yet again Ben! Whilst I didn't use this whole code, I copied some of your regex code for a similar problem with the lack of an alt attribute and unescaped ampersands in CFIMAGE for Railo 3 ... read »
Nov 21, 2009 at 1:13 PM
My First ColdFusion Builder Extension - Encrypting And Decrypting CFM / CFC Files
@Ben, Because I am pedantic, I just want to make sure that everyone knows there is absolutely no encryption going on. There is only encoding and obfuscation. The cfencode tool only obfuscates your C ... read »
Nov 21, 2009 at 12:28 PM
Using ColdFusion Structures To Remove Duplicate List Values
@Jody I can't seem to get your code sample to work. If you are still having problems, try this code out and see if it gets you what you wanted. <!--- Comma delimited list with various duplicates ... read »
Nov 21, 2009 at 11:03 AM
Groovy Operator Overloading Does Not Work In The ColdFusion Context
Hi Ben, Thanks for this informative post. Now I am reading ur old posts too ... read »
Nov 21, 2009 at 10:56 AM
HostMySite.com Has The Best ColdFusion Hosting
@Mehul, Yes very nice people, however several downtimes per day which was not acceptable. Hence we had to move out. I am glad you are having good luck with them so far. ... read »
Nov 20, 2009 at 11:32 PM
Five Months Without Hungarian Notation And I'm Loving It
I've used headless camel case for years for not only ColdFusion variables, but also SQL tables and fields... pretty much everything involving code. I also subscribe to the "don't abbreviate and clea ... read »