ColdFusion Single Page Application Architecture Design

Hello Experts,
I have to develop a single page database driven application for my company. I have previously developed them before. Though, I was thinking it is good to ask other experts opinion. Following are things, which I want to implement.
1) Application driven by single page something like index.cfm .
      Pages/forms should be submitted to this page or master switch in this page
2) Navigation controlled through database.
      Database should be regulating the navigation bar.
3) Implementing CFC’s.
      Different categorization of the CFC ( logic, display, moducles)
4) Depth of the navigation.
      Level one, two, three, four, five level deep navigation

Well, this was my idea, I was thinking if there are tutorial, and ideas from you experts which can help me to prepare good ideas before Monday will be helpful. Any good suggestions online regarding architecture of single page application are appreciated. If you help me to guide in more in above four areas or add fifth area, please feel free to write it to me.
I will accordingly divide the points between good suggestions.
Regards and Thanks,
LVL 21
Who is Participating?

Improve company productivity with a Business Account.Sign Up

russmichaelsConnect With a Mentor Commented:
jyokum .
That is of course your opinion.
If you read my comments, it is not my opinion, it is my realworld experience from running a successful coldfusion development and hosting company. So i am not saying I THINK fusebox promotes bad coding and lack of understanding, I am telling you it is a fact. Almost every single one of our clients who uses Fusebox doesn't understand their own code, produces bad code that causes problems and comes to us when things break, and we have to fix it.
Sorry but you cannot argue with facts and evidence just because you like fusebox.

Yes the way my own framework works is similar to the way fusebox4 works, but I wrote mine long before Fusebox4 existed. But mine is much simpler, more modular, easier to understand, is not bloated with useless code and of all the developers I have tauight it to, it has improved their coding skills, and taught them about frameworks, unlike fusebox.

Anyway this is no help to Pinal, who has stated he is not interested in Fusebox, so perhaps you need to take this topic to a forum or something. I would suggest you come and join my coldfusion forums and discussion lists at

Pinal... If you would like some personal tuition on developing methodologies and frameworks rather than using an existing one, let me know, perhaps we can arrange something.
There are plenty of other methodologies out there that are nothing to do with ColdFusion.
Try here.


Russ Michaels
Macromedia Certified Coldfusion Professional
As far as architecture, i'd recommend Fusebox ( or Mach II ( Either one will give you the "single page" you are looking for and the ability to use a MVC design.

You'd have to build your own database driven navigation but that's not that hard to do.

You can find sample apps on both sites.
pinaldaveAuthor Commented:
Hi jyokum,

thank you very much for your idea. I will look into it. Though my team does not want to switch to fusebox the reason is previous unpleasent experience. I am sorry as I forgot to mentioned in my previoius post. Thank you for your suggestion. Though if you or other experts can explain any of points from previous message will be great help.

Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

if you're just looking for a CMS, you should check out FarCry (
Have a read over coldfusion best practices at and there is a good breeze presentation titled MX applications based on MVC at

Both contain tons of great information to help you get started.
pinaldaveAuthor Commented:
Hi jay252,

thank you for the links. They are very interesting. I have bookmarked them. They do answer one part of my question what should be the organization.
I have to make decision on Monday so I keep this question open till then. I also want to know something about navigation sturcture which is database driven. Again thanks for great links!


Just a note, Mach-II is what Macromedia is currently using to develop their internal apps, so I would definitely consider that an endorsement, especially if you are looking for an MVC model that leverages the benefits of CFC's.

I'd post the link, but jyokum beat me to it.


jay252Connect With a Mentor Commented:
Hey Pinal, glad the links were useful. I’m not sure what you have in mind for your navigation but I have an idea for you. I recently built a small knowledge base wiki and found that the problem with most wikis are they are hard to navigate. To solve the problem I assign all my pages which get stored in a  database a parent page. When I render a page I then select all records from the database which have the current page as their parent and create a link to all the child pages.

What you could do to build your database driven navigation structure is to create a table with 2 columns pageID and parentID. When you build the navigation bar or whatever you plan on using create a link to all pages which have a parentID of the current page's pageID.

Hope this makes sense and helps out. If not give me an idea of the application you will be building.

Thanks, Jay
im using coldfusion with fusebox. 2nd vote for

>>1) Application driven by single page something like index.cfm .

defenitely fusebox.
i'd recommend fusebox
pinaldaveAuthor Commented:
Hello Jerry_pang,
thank you for your vote. Though, as mentioned before, I do not want to go for fusebox.
Those who use fusebox, I respect your opinion. Fusebox may be the best. Though, I do not want to go for the best and want to select something which is lower the best.
I do not want to use fusebox is the final answer so please advise accordingly.
With Regards,
Mach II
oh i see. sorry

same experiences here.
Im using fusebox, but my team does not want to use it nor they plan to use it.
they prefere the traditional spagetti coding style.

im still searching for other frameworks for coldfusion.

i'll be listening to this thread.
If you are looking for something that uses CFCs and is probably the closest thing to OO in CF check out Mach II. If you have not been to I recomend taking a look, he's one of the developers of Mach II.
I personally hate fusebox, it promotes bad code by bad developers who are just blindly following the methology.
I own a hosting and development company and we have constant problems from people who use fusebox and do not understand it and blame us for the problems.
I have been a programmer for a long time and have developed my own methodology and application framework, so I usually frown on others.
But I do like Mach-II and may start using it myself, so I second those recommendations.

The main thing to consider with a framework is to make it simple, do not over complicate it.
What I will say about fusebox is look at it and take the good bits and leave the crap alone.

All you need to do is modularise your code so that each section is independant.
Seperate each Module of your site into it's own folder and name the folder afte rthe module
so you would have folders called USERS, PRODUCTS, NEWS, EVENTS etc.
And you index takes a parameter that defines which module to use.


In each modules folder you have a control file that deal with the action to perform and any required permissions.
So lets say in each folder you have a file called Action.cfm, in this file you take another attribute from the URL and include the appropriate file.

Lets say your URL is index.cfm?action=products.view

You treat the value of action as a list with the DOT as the dleimiter, the first item in the list is the module, the 2nd is the actual action.

Your your index.cfm would include the action.cfm file from the products folder.
This action.cfm will then have a switch/case statement for each possile action.
It will then include the appropriate file where the action=view, say viewproducts.cfm


Russ Michaels
pinaldaveAuthor Commented:
Thank you Russ.
Thank you everybody for this wonderful suggestions. I will finalize this questions tomorrow. Well, except fusebox and Mach II if there is any more suggestions as I am sure our team wouldl like to code something then implementing other tools like Mach II or FuseBox. Any other architect suggestions are greatly appriciated.
this comment isn't really for you but for the others making comments on Fusebox.

I feel I have to defend a great framework that's getting bashed here. There's nothing wrong with Fusebox and it certainly doesn't promote bad code. In fact, it does just the opposite... it promotes modularity and code reuse, eases maintenance, and countless other benefits. Problems in fusebox apps are not the result of fusebox, they are the result of inadequately trained developers.

I teach Fusebox to developers all the time and the following seems to hold true:
- those that learned to program in other languages first (Java, C, Visual Basic, etc.) and then moved to CF love it and do well with it.
- those that started in HTML and then moved to CF hate it and have a hard time accepting it.

My point to this is not to try to convince anyone to use Fusebox.. it's your code.. use whatever methodology you are comfortable with. It's just unfair to judge the Fusebox methodology based on developers that implement it poorly.

And Russ... "index.cfm?action=products.view"
The method you are describing sounds a lot like Fusebox.
pinaldaveAuthor Commented:
Thank you very much jyokum for this great information. I really apriciate it. Though, again, I was thinking this if we can keep Fusebox out of my questions it would be really great.
Though, I want other options and opinion. That is the only reason I have kept this thread open. I will really and heartly apriciate it if fusebox topic is not further pursued on this thread.
I already have accpeted in the beginning that fusebox is great technology, secondly I have said again and again that I do not want any opinion/vote for this topic in this thread as I am really looking for help other then that option. This option I will be not able to use so why to invest time. If others who want to make any decision can go to other places to find answer.
Here, I am struggling and trying to get real answer which I can use. Please help me with not posting any more comments for fusebox.

Again, NO FUSEBOX please.

Jerry_PangConnect With a Mentor Commented:
2 frameworks i found if your interested. i have no idea what these frameworks ar. dont know if these are good frameworks.


i think i remember there was blackbox, similar to fusebox, dunno where it is now.
There was also an MVC framework for coldfusion, i dont know what happen to them now too.
I could not find them.

Anyways, both fusebox and machII (sorry again) are excellent to use with MVC approach.

Since you or your team dont like fusebox then i would recommend
to use an MVC approach to your coding style.

MVC approach is widely use on any languange. You or your team may agree on
how to create your next project. Who knows, you could make your own

back to your post
>1) Application driven by single page something like index.cfm .
>     Pages/forms should be submitted to this page or master switch in this page

Make an agreement with your team to use an Model-view-controller approach.
Use Index.cfm as a Main Controller, then create a separate mini controllers for the other modules.

Make an agreement also to separate Views/display pages with Actions/logic pages. implement CFC's for logic codes for reuse. Well, its up to you and your team how you will make this work.

>2) Navigation controlled through database.
>     Database should be regulating the navigation bar.

Id recommend to use a "heap approach" (i think thats whats its called, correct me if im wrong).
This is what i use to my one of my projects
TABLE Navigation
NavID - integer autonumber (primary KEY)
ParentID - foreign key to NavID

NavID, Title, ParentID
0       ROOT            NULL
1       HOME             0
2       ABOUTUS             1
3       CONTACTUS       1
4      HELP            0
5      PORTFOLIO      0
6      FEEDBACK            4
7      FAQ            4

then add a delete cascade trigger

>3) Implementing CFC’s.
>     Different categorization of the CFC ( logic, display, moducles)

Recommend to separate the display pages with the login pages.
Create a folder name

or if you like

>4) Depth of the navigation.
>     Level one, two, three, four, five level deep navigation

Same recommendation on #2

This is really just using different words to repeat what has already been said.
I thought the FB discussion and framework discussion was just getting good. If you want to continue it I made a post to alt.comp.lang.coldfusion continue it there :)
pinaldaveAuthor Commented:
Thank you very much Russ, This is what I was expecting as answer and suggestion.
Jerry, thank you thank you for this amazing explaination. I think both of you guys do have suggested me great help. Jay has provided me excellent links which is beyond the scope of this question but has helped me to solve other issues. I will close this question here. Though, I got more help then I was looking for so I will post additional points for you. I will split the points.
I am ColdFusion Programmer and have master degree in Computer Programming. The whole purpose of this questions was to help me design which is stable system. I do not want to miss any design concept which I am not aware of. I will contact all of you guys again, if I need more help.
This questions is closed now and I have got very good help. I will post extra points as I have got extra help in another Q. Due to EE policy all the Q are suppose to be of 500 points they can not go beyond them. I think, I am helped more then what I asked so I will post more points.
Have a good day and Regards,
pinaldaveAuthor Commented:
Russ and Jerry Please post your comments
for extra points.
Thank you everybody for your help.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.