So it came to pass that I became thoroughly sick of the look-and-feel of
my review site (which hadn't changed much since 1995),
but maintaining all the reviews in flat HTML files made a redesign
a colossal pain in the butt. I needed a way to separate the
content from the presentation. Fortunately, web technology
has advanced a bit since 1995.
I love PHP and mySQL as much as the next geek, but it just doesn't make sense
to make the review pages database-driven, since they almost never
change unless I'm doing a redesign. Besides, I don't want to
be dependent on the architecture of my hosting site.
So I want to serve flat HTML pages,
but I want to be able to rapidly change the appearance of those
HTML pages at whim. I also want to be able to auto-generate the
index page from the collection of reviews.
What I wound up doing was converting all the reviews to XML,
and writing an XSLT stylesheet to transform them to HTML. I use
James Clark's XT to transform the individual pages to HTML, and then I upload
the HTML files to the public site. I wrote a Perl script that runs XT on each
XML file and builds a list of them as it goes; it then generates
another XML file with the list, and uses another XSLT sheet to transform
that into the index page. I use CSS for some of the formatting,
but on the whole I've tried not to rely on it, because there are still
people out there using Netscape 4. (Hi, Mom.)
Whee.
Ingredients:
- James Clark's XT
(and his XP SAX parser), which require the Java runtime
- ActiveState Perl for Win32
- Komodo, a visual IDE for Perl and PHP (excellent syntax-checking,
and VC++ style bookmarks, which I dearly wish Visual SlickEdit had)
- CSS