Years ago, I used to spend hours sitting in my friend Steve's studio, hunched over an Amiga 2000, pecking out the notes to digital soundtracks. I created dozens of MOD files, and those familiar with the Amiga will remember how cool it was back then to emulate popular songs or to write your own using this technology. Much like MIDI, MOD files let you store song information in a file, which the computer would play back using supplied digital instrument samples. The fun part, of course, was swapping in new samples - changing your snare drum from a quiet tap to a thundering explosion was a simple activity. It was easy to be an armchair composer.
Same goes for Web sites. Building sites is not a redundant activity. At least it shouldn't be. If you find yourself spending countless hours building pages for your site, or copying text into templates, or trying to manage dozens of links, then you should be thinking about other ways to publish your content.
Think of your Web site not as a collection of pages, but rather as a bunch of chunks of content. These chunks (or "objects" in the lingo of computer programming), when kept as pure content separate from how they are presented, can be reused in countless ways and updated easily.
I will outline two examples of how this can be accomplished. Each example details a different approach to pushing object-oriented content through templates to produce final Web pages. Next week, we'll take a look at how all of this nifty technology is migrating to the client side - the future of publishing under the hood of your browser.
One approach to managing many chunks of content is to pump them all into a database. Using a database buys you a number of benefits - your content becomes very easy to manipulate, sort, search, and index. That is, after all, what databases are about.
So, you need to contact, say, Oracle for a site license, then get that SparcStation up and running. After you've got the installation working in a somewhat stable condition, you'll need to hire a database expert to manage and maintain your gigabytes of data, and keep it going 24/7.
Or something.
The reality is, most of us build our sites using desktop machines running desktop software, and the scenario above just isn't realistic. We need database publishing for the rest of us.
Enter Userland Software. Using the Frontier scripting environment, you can begin to taste the power of large-scale database publishing with free software that will run on your desktop. (The current release of Frontier, version 4.2.3, runs only on the Macintosh; a release of Frontier 5.0 will run on Windows 95 as well.)
Frontier is widely known in the Macintosh community as a low-level scripting language, but the software has been evolving recently. Even if you never write a line of code, you can harness the power of Frontier to store your content in its object database, point that content at templates, and assemble whole Web sites with a single command. I won't get into the specifics of how that works, but there's a great tutorial that will get you started.
The true utility of a system like this becomes clear when you want to update your site. Once you've pushed all your content into the database and set up your templates, you can start to experiment with your site as much as you want. Change the headline size in a template, and it changes on every page as soon as you republish. Powerful scripts come installed in Frontier that allow you to automatically add Next/Previous-style navigation to your pages or include standard elements across a variety of pages. And everything is stored hierarchically in the database, allowing page attributes to cascade down through whole sites, with modifications for sections and subsections.
But you still have to republish. Frontier does its magic on your desktop, and can even be scripted to send completed Web sites via FTP to your live servers. And while the environment can be configured as a CGI backend to a Macintosh Web server, performance will almost always be an issue.
Large-scale publishing systems are nothing new; they've existed for decades within the walls of corporations, even before the term "intranet" was coined. The existence of such publishing foundations as SGML (which dates back to the '70s) is evidence that people have been thinking about electronic publishing for a long time.
So how can you harness the power of such a system? There are a number of ways. Last week, we looked at how we put the Webmonkey site together with a home-grown publishing system using the eXtended Server Side Include (XSSI) module that ships with the free Apache Web server software. We chose this route for the pure speed it offered (XSSI can build and serve pages much faster than most systems) and for its inherent simplicity. We didn't need to rely on a database; our content could remain in simple HTML fragments - text files living on the server.
Other, off-the-shelf solutions exist as well, most of them offering big solutions for big projects. The Vignette Story Server, for example, gives you the ability to do dynamic, template-driven database publishing along with powerful content- and workflow-management tools. You can find similar solutions in systems like Inso's Dynabase or Documentum's Rightsite.
Here's the cool part: Unlike publishing systems such as Frontier (or even Perl-based solutions), which push your content through templates during the production phase, these content-management tools assemble everything in real time. That means that you can literally produce your site while it's live, tweaking templates that get immediately replicated on users' screens. The dynamic nature of these sites doesn't end with the authoring process, either. Sites published this way can change based on what your user is doing. This has big implications for commerce, interactive discussion spaces, or even something as simple as the "See also" links along the side of this page.
When you get down to it, you want to be designing, not building. Any of the systems described above will do the redundant, mindless work of ensuring your site is consistent and up-to-date, giving you the freedom to be creative. Because isn't that really the whole point?
This article appeared originally in HotWired.