The Tower of Babel

I’ve been working a bit more on my weblog over the past few days, trying to clean up and remodularize the templates that I’ve been working on. As a result, I’ve got a stack of books on my desk regarding the various bits of web technology that I use. And it started me thinking. And as so often happens when I think, I feel the need to rant.

Why in the world do we have to know so much to make an attractive, interesting web page?

It’s really quite simple. None of the existing web technologies really get at the heart of what you (or at least I) want to do on the web.

First, let’s look at the list of technologies that someone needs to understand to be a saavy web designer:

HTML

HTML had a noble idea behind it: to be a simple markup language to allow the display of information in a reasonable way. Unfortunately, unlike other successful markup languages like TeX or troff, HTML was not programmable, hence ultimately there were severe limitaitons on what HTML
could do.

CSS

CSS was designed with the idea that the presentation of data should be separated from
its presentation. Unfortunately, CSS is also not programmable, so many of the transformations that you would like to make are similarly impossible to create using CSS.

JavaScript

JavaScript is an attempt to make the objects which appear on webpages subject to program
control via a simple scripting language. It isn’t actually all that bad, but it isn’t well suited to writing
large applications.

Java

Java is a real programming language, and actually, not a bad one, but it isn’t really targeted
toward the needs of creating content. Various libraries help a great deal, but that puts an even
greater mental load on programmers.

Perl

Perl suffers from the same ills as Java, with the additional one that it is an exceptionally ugly
programming language.

XML

XML finally implements an extensible parser at least for structured text. The problem is that
it implements very little else, so it is of marginal utility for solving the truly difficult problems of
application development.

XSLT

XSLT finally adds some measure of programmability to the transformations that normally
would have been done with CSS. But it is a far cry from a pleasant language to use, and is in no
sense a general programming language.

MySQL

You really need a database to do anything at all, don’t you?

The combination of all of these things actually allows some fairly pleasant applications to be written, but it isn’t a very pleasant experience for the programmer. Why does it take so much work and so many different tools to make reasonable applications like this one?

3 thoughts on “The Tower of Babel

  1. td

    Just to amplify on Mark’s rhetorical question: you don’t need a database unless you have too much data to fit in a coreload (that’s 2GB on my machine at home) and you have to support concurrent updates. Yahoo just stores everything in Unix files. Ref: http://www.paulgraham.com/faq.html, the sixth question on the page.

  2. jfong

    I’d love to know what sort of “homebrew” solutions other people tend to come up with as alternatives to XML/XSLT/MySQL. The Yahoo thing sounds cool but details are somewhat lacking.

    Case in point: my blog stores entries in a flat text file delimited by date markers like 09/09/02. (Ala “mbox”, I like to think of this as the “lame-box” format.) Text within these markers are mostly just plain paragraphs of text, delimited by newlines, with the occasional embedded HTML element. When I need to update, I load the whole thing into some version of Emacs, and text edit a new entry at the end. When done I run a Makefile which in turn runs a Perl script. Said script is responsible for ripping apart the text file based on date markers and massaging it into a form suitable for inclusion in HTML. Most of this is just related to dividing entries up by months, formatting the date markers nicely, marking some text with CSS classifications, and inserting real HTML paragraph tags where appropriate.

    As far as layout goes, I have broken down each HTML page into reusable or easily editable components wherever possible. Another simple Perl script is responsible for just pasting these components back into master template HTML files. (So a template file might have something like “insert header here”, “insert latest update here”, and “insert book list here”.) Makefiles take care of doing this wherever necessary. All text formatting is done with a single CSS style sheet (and all pages agree on the classes referred to in that sheet).

    I’m vaguely aware that XML/XSLT/MySQL might make life simpler – particularly if I ever felt the need to make updates online from within a browser. However I’m too lazy to devote the time or brain space to learning them; plus just like staying in a text editor and running make; using a browser text field is just too much of a pain in the ass (like I’m finding right now). And then again, on the other hand: adding a comment facility to my blog (which is something I’ve wanted to do) means I need to start thinking about some sort of database system. I’ve been thinking just a cgi-bin perl script using Berkeley DB routines, but who knows.

Comments are closed.