Monday, November 20, 2006

Abandoning XSLT

Warning: Geeky post ahead

Our content generator currently uses XSLT to send updates to the web server. One XML file is prepared for an entire day's worth of data and pushed to the web server which then processes it into front pages, archives pages, and the rss feed via different XSLT stylesheets.

It's remarkably elegant. Each layer is left in its own space, and the entire process is highly efficient and painless.

However, for two reasons we've decided to abandon this approach.

ONE: XSLT is oversimple. It direly needs string manipulation functions. What happens if you encounter a date in an XML file and you want to convert it to another format? It's simple: there is absolutely no way to do that. Tough luck. Want to generate a calendar? Too bad. There's no way to do that.

TWO: Too many layers slow down the development cycle. Most changes will now require changes to the database, changes to the XML file format and then changes to the XSLT stylesheets. This takes much more time, and I've noticed that it takes a lot more time to push new stuff through the pipe, with an end result of a lot less stuff.

SO: Now we're going to generate pages using Object-oriented PHP and push them using a more traditional method. (Why not Python? That's another blog post...)

No comments: