Logical Expressions Web Site Rebuild

The Logical Expressions web site is getting a make-over. As part of that project, I’m moving all information that isn’t relevant to our primary business focus off to our other publication sites.

Nerdy Musings got a few "new" articles out of the deal. Many years ago, while I was still programming in VB6 on a regular basis, I wrote three tips articles that I published on the Logical Expressions site:

All three of these articles brought a surprising amount of traffic to our Web site, but they didn’t do much for us from a business standpoint. Rather than just throw them away in the site rewrite, it seemed appropriate to give them a new home in a more relevant venue.

If you get the RSS feed for this site, you may have been surprised to see a few articles on VB6/COM topics come through the feed as "new" content. Well, now you know why.

The LE web site rebuild has produced some interesting new requirements that have been fun to solve. I’m sure you’ll see a few Nerdy Musings articles come out of the work. We made some decisions up-front that had technical implications for how I would re-architect the site:

  • Use plain html pages when possible. My wife Susie is good with design and html, but Visual Studio and ASP.NET are a bit beyond her technical level. It has to be possible for her to maintain the site.
  • Use include files for common site elements. The existing site does this a little, but not consistently. Our new pages will use includes for all top, bottom, and side matter. Only the unique content for the page will be in that page.
  • Keep the same file names whenever possible. The site has been spidered extensively over the years and it has been linked to from all over the Internet, and from many of our own other sites.
  • Redirect requests for moved pages. In situations where we chose to move a page to a new location or name, we need a way to redirect requests for the old page name.

Here are some of the things I’ve been working on to solve the requirements I mentioned above. If you are interested in hearing more about them, use the Contact link in the top menu to get in touch with me and let me know. Your feedback will help me prioritize the order in which I write the articles to come.

  • JavaScript-driven breadcrumbing: This was a fun one. All the breadcrumbs in the old site were hand-coded, which was a real drag. The challenge for the new site is to automatically generate a breadcrumb based on the page’s location in the logical site hierarchy. I say logical hierarchy because all of the HTML pages are in the root folder of the site. The hierarchy is described by an XML file that defines the parent/child relationship between pages. The breadcrumb script uses a very stripped-down AJAX library to read the XML file and generate the breadcrumb (my thanks to AJAX Hacks by Bruce W. Perry for great guidance).
  • ASP.NET redirection page: I’ve already written about how to redirect folder requests in ASP.NET, and the HttpModule would have worked fine for page requests as well. However, this time I took a different approach: All of the redirection logic is in an ASP.NET page instead of a module. The only real advantage of using a page over a module is also a disadvantage: The page reads the XML redirection rules every time it loads, which is not so great for performance, but nice for testing and adding new pages. If I cared about the potential performance impact, I could cache the rules, but I’m expecting redirects to happen less and less often as time goes on and Google catches on to the new content locations.
  • Marrying tables and styles: I’ll be called a blasphemer for this, but my belief is that CSS is not ready for prime time when it comes to layout. At this point, I’m sticking with tables for overall layout and using styles for fonts, color, and effects. I like to make "stretchy" web sites, and CSS layout only performs consistently if you create fixed-width sites. You can code a bunch of hacks into the CSS to make it work, but you’ll double or triple your development time getting it to work right and then the next release of the browser will break it all. Forget that!
  • Using server-side includes with plain HTML files: Okay, this is a tip I can give you right now. Just go into IIS, and in the application’s configuration settings, create an application map for the .htm (or .html) extension that matches the settings for the .shtm extension. Then you can use #include (and all other ssinc.dll features) in your plain HTML files.

Like I said, if you’d like to learn more about any of these topics, use the contact link at the bottom of this article or in the top menu to let me know.