Exercise List: ColdFusion Site Skeleton

Posted October 26, 2007 at 2:45 PM by Ben Nadel

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.



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 »
11,246 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 »
11,246 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 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
May 25, 2013 at 10:01 PM
My Experience With AngularJS - The Super-heroic JavaScript MVW Framework
@Avi, Really glad to help! @Jaredwilli, I'm finding a this image hits home with a lot of people :) Hopefully we can all work through the rough patches together! @Prateek, AngularJS has error ... read »
May 25, 2013 at 9:53 PM
Nested Views, Routing, And Deep Linking With AngularJS
@Mrsean2k, I'm glad I could help! I haven't been able to keep up with the ui-router stuff. I keep saying that I'll carve out time, but I just haven't gotten to it :( ... read »
May 25, 2013 at 9:49 PM
What If All User Interface (UI) Data Came In Reports?
@Jonah, Thanks for the book recommendations. I am looking them up right now. I can see that Object Thinking is available for the Kindle App - sweet! Also, I just recently heard Martin Fowler on the ... read »
May 25, 2013 at 9:41 PM
HashKeyCopier - An AngularJS Utility Class For Merging Cached And Live Data
@Chris, I'm super excited to hear that my posts are helpful. I am also loving AngularJS; but, it definitely has some caveats and some odd behaviors and some things that just don't seem to "wor ... read »
May 25, 2013 at 9:36 PM
Ask Ben: Manually Enforcing Basic HTTP Authorization In ColdFusion
@Adam, @Jason, After reading these comments, I double-checked my latest implementation and I am happy to report that I am using listFirst() and listRest(). ... read »
May 25, 2013 at 9:31 PM
Using "//" And ".//" Expressions In XPath XML Search Directives In ColdFusion
@Daxesh, I am not sure I understand the question about the current node. If you already have a reference to the current node, why would you need to query for it? As for parent node, I believe that ... read »
May 25, 2013 at 10:08 AM
Using "//" And ".//" Expressions In XPath XML Search Directives In ColdFusion
@Ben, my question is that i want the current node with its tag and its parent node. i just want only that data. So, give me the solution for that. and remember solution is working on " xpath 1.0 ... read »
May 25, 2013 at 10:01 AM
Using "//" And ".//" Expressions In XPath XML Search Directives In ColdFusion
hey ben, i want get my current node tag and also want the root node tag withing. So, how can i fix it.. ! ... read »
InVision App - Prototyping Made Beautiful With Prototyping Tools