So I think everyone knows that if you redesign a web site, you can potentially end up with renamed files and the like which means old URLs will no longer work. There are multiple ways you can handle this. You can use a URL Rewriter. A 404 handler. Etc.
Well what happens when you update a Model-Glue (or Fusebox, etc) site? If you are like me, you probably have a total and complete brain fart and completely forget. Personally I brain Model-Glue and it's usage of one main index.cfm.
This past Sunday I helped launch the second version of University Notes. This is a site I built with some friends of mine in college. It has been pretty successful and version 2 was a major update. In that update I changed almost each and every single event name, typically from XXX to page.XXX.
So what happened the day after we launched? I got a whole heck of a lot of error messages about missing events. I covered how to handle these events in the past. (See this blog entry.)
I bring it up since I thought I'd show how I fixed it. Instead of catching the unknown event error, I created a mapping in my Application.cfm file. Here is a snippet:
2 <cfif url.event is "dologinregister">
3 <cfset url.event = "page.logon">
4 <cfelseif url.event is "home">
5 <cfset url.event = "page.index">
6 <cfelseif url.event is "viewprofile">
7 <cfset url.event = "page.profile">
8 <cfelseif url.event is "registerform">
9 <cfset url.event = "page.register">
10 ...
I'm sure I'm not the only person to make such a mistake, so keep it in mind if you work to update a large frameworks based site.
p.s. Not that it's related, but the site also makes heavy use of Spry. Check out the Courses/Ratings/Content tags.


Comment 1 written by Phillip Senn on 22 March 2007, at 1:54 PM
(http://www.universitynotes.net)
is a very attractive site.
I've been shopping and shopping for a good template.
Is this one done with CSS?
Where did you get this front-end?
I'd like to study this one closely.
Comment 2 written by QA Dude on 22 March 2007, at 1:55 PM
Answer: We realized we didn't test our code very well.
Comment 3 written by Raymond Camden on 22 March 2007, at 1:57 PM
QA Dude: We did test rather heavily. As I stated, the main issue was _old_ URLs. My code is as perfect as you, QA Dude, whoever you are. (And if you are going to put me down, at least have the guts to use your own name.)
Comment 4 written by Lola LB on 22 March 2007, at 3:33 PM
Comment 5 written by Sid Wing on 22 March 2007, at 4:01 PM
Comment 6 written by Phillip Senn on 23 March 2007, at 6:53 AM
It always reminds me of my first job. I had plenty of time to test an Order Header/Order Detail application.
I always tested an Order with 1 or 2 lines items.
Can you predict what happened the night we went live?
Of course the first order came in for over 100 line items and a behavior popped up that I hadn't anticipated.
I told my fellow workmates "I could have tested for 100 years and wouldn't have duplicated that error".
This might have relevance to TDD today. If you setup your TDD to test for 1 or 2 line items, you might feel confident everything is working fine - even more so if the tests are run every build.
So we're not out of the soup yet.
[Add Comment] [Subscribe to Comments]