A modern, well-maintained web site should be valid, well-formed XML. If you want to rely on XML tools (XQuery, XSLT, etc.) for all your documentation and database access, you can now implement web sites with a new MVC framework named Flower. It hasn’t reached the 1.0 stage yet, and developer Thomas Lord warns that you’ll need help installing and building the system, but once you’ve got it going you can apply your XML tools to dynamic document creation.

Flower includes templates to create web pages that you can fill in by issuing XQuery calls and formatting results through XSLT. Another XML-based language called Flower Programming Language allows further processing. Flower uses Apache’s Xerces-C++ XML parser and passes results to the web server through Fast CGI. The underlying XML database engine is dbXML.

Because Flower incorporates a virtual machine that interprets XML, it can be seen as more than an MVC framework for web sites–perhaps a platform for very powerful distributed applications that use XML for data exchange, both client-server and server-server.

Lord promotes Flower’s minimalist approach, contrasting the interpreter’s 2,000 line with Ruby’s 92,000; it’s unclear to me whether the size of the interpreter matters on a web server. Flower’s scalability won’t be known until it sees some serious implementations. So it seems to me that it will be most attractive to developers who have pre-existing XML-heavy systems:

  • Publishers who have made the large investment of converting large, complex documents to XML and want to republish them in a variety of formats and venues

  • Sites exchanging data and using XML as their glue

  • Scientific environments with large datasets they are used to manipulating in XML (Lord mentions biology as an example)

I happen to like procedural languages, for the same reason I handle simple tasks at work myself rather than make formal requests to staff with official responsibilities for such tasks. Functional programming strikes me like the round-about process of filling out formal requests, and I know it can lead to powerful systems, but at several removes from my natural way of thinking. And a number of XML tools–notably XSLT–are functional in their set-up. But Flower looks like a way for the kinds of people who go to XML conferences (such as one I blogged earlier this month) can leverage their existing knowledge to produce functional web sites.