March 22, 2003

XML Programming and SQL Programming Languages

Tim Bray has written an interesting article entitled " XML Is Too Hard For Programmers" in his weblog. I agree with some of what Tim says - especially about the learning curve for mainstream developers moving to XML being way too steep. I don't agree that an regexp-based is necessarily that much easier for most programmers though, as the hill to climb to learn regexp is almost as high, if not more so for most people! And, yes my opinions are based on long experience, as I used pretty much exactly the same approach Tim used for one of my web sites, which has been chugging along smoothly since 1998.

Tim also makes some statements that he can't see any real need for XML-oriented programming languages, using embedding SQL in existing programming languages as evidence:

Some decades after the advent of the relational database, we have not seen programming languages center themselves around normalized data models...

So what about stored procedures and database trigger then?

These are both really perfect examples of "SQL-oriented languages", IMHO.

And in my professional experience, 2 out of 3 database systems actually use stored procedures rather than embedded SQL as the main method of encapsulating business logic in the "enterprise" tier.

Then even SQL itself can be viewed as a declarative "result set-oriented programming language" - pretty close in fact to some of the capabilities of other declarative languages like lisp and prolog.

Maybe this comparison with SQL is a good pointer to the way XML-oriented programming languages will ultimately develop - and I know for a fact that there is a lot of noodling going on out there in this area.

Of course, this is probably a cue for Paul Cotton (another WS-I regular, plus XML Query WG Chair) to chip in with an advertising pitch that XML Query is exactly what we all need here! Maybe.

Regarding Tim's other main point that a streaming approach to XML processing is important, I would tend to agree in general - particularly as the XML data we process gets more and more complex over time (especially for large data models like the ACORD Life Schemas - 0.5MB of schema definitions!).
However, we have to remember that this XML streaming approach has been around and tried for several years too (for example in the OmniMark language), so stream-based processing does not seem to be the only missing piece of the jigsaw.

Finally, while I am on a roll, I am a little surprised by this comment Tim made:

The notion that there is an "XML data model" is silly and unsupported by real-world evidence. The definition of XML is syntactic
That statement would seem to be completely at odds with the notion of XML Schema as the way to define XML data models (emphasis added) :
XML Schemas ... provide a means for defining the structure, content and semantics of XML documents.
[ XML Schema Working Group ]

The real point here is that an "XML Data Model" and an "XML language binding" are two completely different things. The Schema provides the true data model of the XML to build an XOP language around, and even Adam Bosworth seems to agree with my thought on this area.

Entry categories: Programming
Posted by Jorgen Thelin at March 22, 2003 06:10 AM - [PermaLink]
 
Traceback List
Native XML Scripting
Excerpt: Sam Ruby highlights an interesting development at ECMA which may bring us a step closer to XOP - XML-oriented Programming: ECMA: ECMA International (ECMA) is completing extensions to the widely used ECMAScript standard, currently being updated to its 4...
Weblog: TheArchitect.co.uk - Jorgen Thelin's weblog
Tracked: March 29, 2003 12:29 PM
Comments
Dare Obasanjo makes similar comments in his own inimitable style in a posting to his weblog entitled "XML Stream Processing: Tim Bray Needs to Get Out More" Posted by: Jorgen Thelin on March 22, 2003 03:09 PM