Web Techniques: Data-Drive Sites with Midgard

“No matter how our industry tries to streamline the process, our
designers and programmers still edit the same piece of code (often
without version control). Middleware application servers such as
Domino and ColdFusion initially appeared to solve this problem.
Recently, some Open Source software has emerged that also tries to
separate content from presentation. Of these, Zope (www.zope.org)
and Midgard (www.midgard-project.org) are the most well known. Zope
is written in Python, and you can use Python to customize existing
components, as well as develop your own. Zope is an amazing tool,
and I encourage you to check it out. I’ll focus on Midgard, which
can dynamically generate your Web site from a database.”

“Midgard consists of some Apache modules (including a custom
version of PHP3) that make up the Midgard server. PHP3 is one of
the most popular scripting languages for the Web, and is deeply
integrated into Midgard. Midgard lets you define a presentation
format for data that is separate from the data itself. The use of
an article/topic metaphor lets content developers avoid SQL and
other database details.”

How does Midgard work? One of the Midgard modules acts as a
filter in front of all page requests. If it notices that a request
comes in for a Midgard-managed page, it gives control over to the
Midgard system, and the system dynamically generates the page.

Midgard is fully database driven. At the time that I’m writing
this, Midgard uses the MySQL database server. The next version of
Midgard promises ODBC support, which opens it up to a wide range of
databases, such as PostgreSQL, Oracle, Sybase, and many


Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends, & analysis