[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message]

XQuery and Web 2.0

Jason Hunter jhunter at servlets.com
Fri Apr 25 15:00:15 PDT 2008


  XQuery and Web 2.0
Michael Kay wrote:
>> 2) What is it about XQuery that would stop you being able to 
>> write your entire application in XQuery?
> 
> The #1 reason I have found it hard to write significant applications in
> XQuery is the lack of polymorphism.
> 
> If you want to write a simple query to do a single well-defined job, XQuery
> works very well. If you want to write an application capable of doing
> different tasks under different circumstances, with reuse of internal
> components, and variety in the input documents (or output documents), then
> the absence of any kind of polymorphism really starts to hurt.
> 
> XSLT has two facilities - template rules and import precedence - that give
> it a major advantage once you are doing anything more substantial than a
> one-off task using a couple of hundred lines of code.
> 
> I'd be interested to hear from people who have developed substantial
> applications in XQuery (like markmail) how they got around this problem.

Michael,

I've been thinking about your question a little bit.  I think the 
simplest answer is that we code with patterns like you use when writing 
C code.  A very high-level, declarative kind of C code.  :)

The core MarkMail web app runs on ~5,000 lines of pure XQuery code.  A 
bit over 80% of that is in reusable libraries.

When writing the app we think in XML.  The back-end is an XML store, the 
front end is an XHTML browser, and the language bringing the two 
together is XML-native.  It's very convenient.  I spoke on this topic at 
XML 2007, as some on the CC list may recall.

http://markmail.org/collateral/xml2007.html

-jh-


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.