0

Roll your own CF framework

ColdFusion
I've been using FuseBox 3 for years and it was great for what it was. The problem was that it didn't address certain issues that we had. So, we tweaked the way we used it. The changes we made helped it but still didn't address all our problems.

Well I've grown a lot as a CF'er over the past nine years and decided it was time to make a change in how we write our code. I looked at Mach II, Model-Glue, Fusebox and I have got to say they just don't take care of what we need. I don't think their bad. They just don't fit our needs.

Well I got out pen and paper and started to make notes of all the things we need a framework to do for us. Didn't take to long to do since we had been facing the same problems for about three years now. What I found that we needed was this:

Single layout file.
I liked that Fusebox provided a way of doing this. Tell Fusebox the layout you wanted and it would apply it to the site. Can't do with out that.

File naming
I have to be honest. I hate that Fusebox made everything run as a root index.cfm file. How am I supposed to figure out what people are doing on my site when that web stat apps only see them on the one file? So, we will need to be able to have as many directories an file names as we want.

Code reuse
We have nine websites that need to run off the same code. So we need to use CFCs as much as possible and make a central location for our non-display code to live that all the sites can get to. MVC? Sure.

Error handling
Oh the errors. We have to get all the errors logged to the CF Admin log files and have email notification sent out to the right people. Its the users and search engines that will break you app in ways that you will never think of.

Easy to learn
Show me a framework that I can give to a designer that know next to nothing about coding and they can get up and running with out trouble in an hour or two. Anyone? That's what I thought. Frameworks need to be usable by everyone. How is a designer or some one new to programming going to be able to jump into and understand the most popular of frameworks? They cant. OOP and MVC is out of their grasp. Most seam to struggle with when they need to use hash marks on variables.

All of this has to be easy to maintain. We only have two designers and two programmers. Between the four of us, we take care of the web servers, CF servers, mail servers, project management, customer support, ....... You name it and we have to do it for close to twenty plus sites. Did I mention that we have to redesign nine of the sites every nine months or so.

Our hands are full.

With all of this said, I have put together our own framework for us to use and it works great. I'm still working out the details of it and refining some parts of it but its still better than what we had.

--
Phil

tags:
ColdFusion
 
Care to go into the error handling in greater detail?

Are you doing the error handling as part of the framework, or have you constructed some sort of plugin for this functionality?

What about your framework was so much easier to learn? Or, what about the others was too hard?

Do you use some sort of config file as the "roadmap" for you framework? (Like the Mach-ii config xml for example.)

Lastly, I think all of those things can be dealt with pretty easily with Mach-ii, what did you find lacking with it?

Thanks!
 
posted 988 days ago
Add Comment Reply to: this comment OR this thread
 
Phil said:
 
I didn't want to try and put a long answer in the comment section so I just posted a new entry. This one should help to answer your error handling questions.

We have two ways of setting site wide settings. One is in our "MasterController" and the other is a file that the designers can get to. I have played with using an XML file or a CF page with a series of cfsets for the designers. We haven't decided the best way to go yet.

As far as Mach-II and the like go, it was to confusing for the designers, lots of overhead, and there are features in them that we will never take advantage of. So instead of getting a Cadillac, we opted for a stripped down Honda.

I will post some more about the framework so you can get a better idea of what I'm talking about.

 
posted 988 days ago
Add Comment Reply to: this comment OR this thread
 

Search