Saturday 9 February 2008

Brave New World of XQuery

One could argue that as far as the programming languages go, they are fundamentally the same since they can be mapped to the similar underlying BNF gramar, but one of the more interesting recent additions to this family is QXuery.

If adopted properly, it may do away with 90% redundant code that everyone is writing. The argument is below.

As far programming currently goes (and this has been the state of affairs for past few decades), developers spend their lives transforming data structures among these three layers of different representation of data:

1. persistence tier - relational (RDMBS) -
2. application middle tier - OO (object-oriented) and/or procedural
3. presentation layer - XML in its various forms including XHTML/HTML

Now, in the New Brave World of XQuery you will just deal with XML for the most part - XML in the database, XML in middle tier and XML in presentation layer. No transformations. And the language that ties everything together is XQuery.

There are a couple of important related implementations:

Gexo - http://www.gnu.org/software/qexo/XQuery-Intro.html
BDXML - http://www.sleepycat.com/products/bdbxml.html
XQengine - http://sourceforge.net/projects/xqengine

The W3C Query spec can be found here:

http://www.w3.org/TR/xquery/

As a note of recommendation, I feel one should learn to read W3C specs as well on a regular basis. It’s all you need to keep in touch with evolution of software since most of the fundamental innovations regarding the web have come out of W3C expert groups. For it may be about the only place where top academics and scientists from top vendors meet, sit down and agree on something. For example, SOAP if you remember was the first standard that Sun, Microsoft and IBM actually agreed on.

No comments:

Post a Comment