Ok, so it's been a while since I posted something useful or anything at all. I've been busy alright? CF Webtools has me bust'n butt for clients and internal projects so I am not complaining about being busy. Just pointing out a fact, but it's a good fact.

So what has been keeping so busy?

Most of the work I do is for one client Classic Industries. We are working with them on a massive overhaul that is basically being done in place a little at a time. The biggest changes that may be visible to users are the SES URL's in the product catalog. We've been working on massive amounts of rewrite rules and ColdFusion code to translate the SES URL's back to variables that the existing controller and model layers understand. While the existing site and code is not "pure" MVC it does have a clear model and a quasi controller. The fact that they already had this site built this way when they came to CF Webtools has helped with the in place re-write/re-factoring. It's not "pure", but it's good enough.

I often see questions on CF-Talk relating to url rewriting. Prior to January of this year, I was a rank amateur. Now I am half-way decent or maybe better. The site had typical URL's for the product catalog that we are all used to seeing.

view plain print about
1/controller.cfm?type=product&action=getProductsCategorySearch&model=1&page=1&submodel=257&yearid=1 and more and more and more.

We all know that search engines don't index well with these URL's, plus they just look ugly to users. After a lot of work the URL's in the product catalog are MUCH better.
view plain print about

To get to this new URL we had to implement ISAPI rewrite rules on IIS. The re-write rule to handle the SES url above is this.
view plain print about
1RewriteRule ^([^/]*)/parts/([\w&\-/]+)?$ /controller.cfm?type=product&action=getProductsCategorySearch&model=$1&subcatpath=$2 [L,QSA]

Basically the RegEx looks for the pattern /[anything]/parts/[anything]/[anything]/[anything]/. This rule then takes those matches and builds the internal redirect rule and adds anything following /parts/ in the URL to a new URL param &subcatpath. From here ColdFusion code takes over. The entire model was already coded (stored procedures also) to work with ID's for everything. Model ID, Catalog ID, Category ID, SubCategory ID, Sub-SubCategory ID, Year Id and so on. There are hundreds of stored procedures that would have to be re-written if we did not use ColdFusion to translate the new SES human readable URL's back into the soup of ID's. New stored procedures were create so we could could get ID's for various strings such as catalog ID from catalog name etc. There also validation happening to ensure the data that matches any of the [anything] parts is valid.

All the navigation had to be rewritten including the bread crumb navigation which used to get generated by JavaScript after the page loaded. They wanted all the links on the site to have SES links. Prior to me coming on the display layer created links in whatever location needed and usually did so differently in each location. On top of that a lot of JavaScript was used to generate links. We decided to change all that so I created a single utility CFC that did nothing more than handle generating the creation of these SES urls in the various formats needed. Including setting up the urls for paging, changing the number of products per page, sort order and more. I stripped out a lot of JavaScript had ColdFusion generate the links in the html so spiders could properly index the site. This phase of the project was and still is all about SES URL's and SEO enhancement.

We also wanted to deal with old style links in the wild (people's bookmarks) and do proper catches of these, 301 redirects and canonical links so the search engines would reindex the proper URL for pages and drop off the old URL's. So some CF code to was put in place to catch the old style URL's and do a 301 redirect to the new SES url's so the ISAPI rewrite rules could do an internal redirect to internal redirect URL that gets translated back to the original ID's. Are you following the loop?

That was the past six months of work. The .htaccess file has about 200 lines of rewrite rules. The newest version of the site has all these SES url changes in place and it's working beautifully. There were a lot of other changes made also just for SEO improvements. I won't discuss them here because the client wants to maintain a competitive edge over their competition's sites. The SES URL changes are publicly visible so I can talk a little about those.

What else?

Keeping up on my server skills. I was given the chance to build a new SVN server for CF Webtools so I did. In the process I upgraded them from SVN 1.4.x to SVN 1.6.x and included Submin and WebSVN interfaces to help us manage the repositories. Today I just connected the new SVN to the Hudson server, that the Coldfusion Muse (A.K.A. Mark Kruger) setup, so if we choose to do so for a project, each SVN commit will trigger, via a post-commit hook, the proper Hudson job and build the code on the dev/staging server automatically. No more FTP! Sweet!

Kinda sorta talking with David Boyer about combining efforts on his most excellent CFTracker and adding my own CFMon monitoring code I wrote years ago. Something else to take up my free time. Each of our tools has some cool strengths - together it could be awesome.

I also started two other personal projects. Both I hope to release to the CF Community at some point. No clues yet, sorry.

I think my free time is in the negative again.