When I started work at E-Commerce Solutions, they pre-generated
their website catalogs from a database using a custom tool written
in ASP/VBScript called the Publisher. The tool used HTML templates
containing custom markup tags and pulled data from a SQL Server
Unfortunately, the original Publisher was rather inflexible and
a nightmare to maintain. To customize each site, aseparate copy
of the software was made. The markup tags were simple but very
limited. Recursion was impossible.
So I rewrote the application from scratch in the Python scripting
language and created a new template markup language inspired by
such systems as ColdFusion, Zope and JSP. The system was written
in an object-oriented manner so that new tags with custom behavior
could be easily created.
A sample template fragment would look like:
This fragment would loop over every top-level category in the
database, print its name, then loop over every store in the category
and create a link for it.
To create a new tag, a developer would only have to subclass
the Tag class and copy the Python file to the Tags folder. Other
tags included If/Then, Include, Script (for embedding small Python
scripts) and tags for generating advertisements.
Although I left the company in late 2000 and many of the other
employees laid off shortly after, my new Publisher continues to
be used by the company to generate such sites as Brandsforless.com
and the Excite.com Marketplace.