Archive for September, 2004

Generating Static Webpages

Thursday, September 23rd, 2004

I have been asked to rewrite The Sheet Music Companyfor Stephanie’s cousin. I originally wrote this site a couple of years ago, and I think the old way is so much better than the new way I will have to write it.

The original design of the site is odd, but straight-forward. The site uses a eCommerce package from Americart that handles all of it’s inventory, order processing, etc. The pages that Americart generates are terrible looking, so I wrote a wrapper script around them. When you view a page, the script requests the page from Americart, parses out the useful information, and then generates the new html. Odd, but works beautifully.

Well, the site owner has gotten it into his head that search engines hate dynamic pages. Since I don’t really know or care much about search engine optimization, I have decided not to argue the point too much. So, he wants the site to consist of all static html pages. Since the inventory is updated frequently, this makes for an interesting proposal.

So, that brings me to the new design. First, the owner will upload the inventory DB to the site, and it will be imported into mySQL. Next, a script runs that takes his inventory DB and a couple of config files, and generates thousands of static partnumber.html pages. This strikes me as an altoghter odd way of designing a website, but it is the best I have been able to come up with. I got the idea from Climbing Boulder which also works in a similar way.

There are a lot of benefits to this design. First, there are no DB queries or scripts that have to run to view the pages. This should make the site extremely fast. Second, theoretically, search engines will like the static pages more.

There are also some problems with this design. First, it works best with a site that has minimal change on it. A blog site with a dozen posts and thousands of comments posted a day (www.slashdot.org) would not be the best choice for this design. Second, it seems like a fragile design were a malformed inventory line could prevent a large section of the site from being generated.

In the end, I have very mixed feelings about this design. It addresses the owners concerns, but I don’t feel that it is an elegent design. Why have 3,000 pages that are essentially the same, when you could have but a single page and reference the DB to fill in the details. So, this will increase the number of pages for the site from a dozen to several thousands. The flip side is that now, instead of a constant stream of DB requests I now make a large block of DB requests in the middle of the night while usage is low. We will see how this works out.

Winter!

Wednesday, September 22nd, 2004

This is the first post in a very, very long time. What better day to start posting again than at the start of a new season. And today I decided that winter has started!

I realize that winter does not actually start until December. Anyone who believes that is either a sucker, or lives in the plains. Last night, Steamboat Springs got 17 inches of snow. Eldora got 3 inches of snow. The first of the ski resorts started updating their ski reports last night, so winter has started.

It helps that I got a new snowboard last night. My wife got me a Ride Timeless 161 for our first aniversary. I have been snowboarding for about 10 years now, and this is only my second snowboard. And, it is a dramatic move from my Santa Cruz 153. It is a straight up free riding big mountain board.

So, with winter starting my friend Jon and I have decided to start hiking up into the mountains and doing some early season back country riding. Better than waiting until the end of november to start riding. I will have to start posting on those exploits soon.