0

Our error handler

ColdFusion

The error handling is taken care of in the application.cfc. I have a try/catch in each method that will insure the appropriate people are notified of an error. The programmers get all the errors emailed to them and the designers will get the ones that occur in the onRequestStart and onRequest.

Let me show you the most current errorHandler.cfc code. Most of this should be pretty easy to understand. I will point out a few little things though.

Online 11 we write an error message to a log file just for that site. Why filter your log files when a site can have its own? Lines 32 trough 34 looks to see if an error happened in a CFC method. If so, it lets you know. At the end of the cfsavecontent tag, we dump the cookie, cgi, and cfcatch scope. We then send out our email to the right people and then print a message to the web page.

Pretty simple really. Now we can call to this cfc method from any site on our server and be informed of what is going on. 

tags:
ColdFusion
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
0

CF/Flash/Java driven mp3 player

ColdFusion
I'm going to New Orleans this weekend and will have a fair amount of time in the car with nothing to do. So, I'm going to try and finish my work on a CF/Flash/Java driven mp3 player.

Whats so cool about that? Well it has some nifty little features built into it.

Automagically organizes my mp3's
Build and update play lists
Open Source Flash mp3 player to cover that fact that I suck when it comes to Flash
Web access to all my music

There are still a lot of things I would like to do with this but I'm trying to start off small and build in the things I need. Not the what I think I want.

The next thing I'm working on is playing around with CF and Java to read and write midi files.
tags:
ColdFusion
0

Install CF 7 on Win 2K3 SP1

ColdFusion

Well we had two of our drives fail this weekend so now I have to rebuild the server. I'm soooo very happy. :-|

Any way, the install of CF 7 fails on the server. This is because I'm running Win 2K3 Sp1 and the installer hates it. Well I decided to post my instructions to fixing this problem in case any one else needs it.

You have to install it using the built in web server.After that finishes, follow the instruction on this page: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_19575

After you have completed these steps, you will have to deactivate the built in web server.

The only thing you have to do in addition is turn off the built in webserver.

Open this file

cf_root\runtime\servers\coldfusion\SERVER-INF\jrun.xmlIn the section titled "This is the built-in JRun Web Server" change the following line
false
to
true

Hope this info helps out. It seems to be the only sure fire way I can get it to work.

tags:
, ColdFusion

Search