[xquery-talk] XQuery and Web 2.0

Peter Coppens pc.subscriptions at gmail.com
Fri Apr 25 14:09:04 PDT 2008

> 1) Does the application usually deal with incoming and outgoing XML/ 
> HTML, or is that the exception?
Deals with incoming X(HT)ML, outgoing X(HT)ML and transformations or  
'template' expansion.

Well, to be complete,  that is the part where using XQuery makes the  
most sense - I have also used XQuery as a more generic scripting  
'engine'  (e.g. installation scripts)...but one has to be very  
persistent (disturbed really :)) to make that work. For maintenance  
reason that part will have to go...I .can't expect anyone else to take  
that from me without doing something nasty to me first :).

> 2) What is it about XQuery that would stop you being able to write  
> your entire application in XQuery?
Quite a few really.... To start with, XQuery works on an XQDM instance  
which is obviously very effective in representing XML or XQuery/XSLT   
'data'  but looks suboptimal to me if it comes down to representing  
your typical 'business' object model  (I am sure it can be done, but I  
am not sure I want to). Furthermore it lacks a whole range of  
'libraries/modules' to interact with the outside world. In my case  
(Java/Saxon or Java/DataDirect XQuery) I use Java external functions  
*a lot*....but the result of all that very fast comes in the area  
where colleague's of mine declare they'd rather look for another job  
than extend or maintain that approach. And of course there is no  
standard way of doing that (Saxon does it differently than DataDirect  
XQuery). From  a language perspective, what comes to my mind first is  
updates  - I know these are coming but not yet available in the  
products I use. Exception handling is another.  Also, sometimes the  
pure functional approach is a bit of a drag and does not integrate  
very well with Java external functions with side effects - a side  
effect query is something to strive for, a side effect (business)  
application is less interesting.

> John
> Peter Coppens wrote:
>> Fwiw...
>> Two years ago I switched from a company that implements XQuery to a  
>> company that develops your fairly typical web applications (I  
>> know...why would you want to do that :) )
>> Anyway , because I do like the language a lot I try to use it  
>> wherever it makes even a little sense but to be honest, the cases  
>> where it does make sense are really fairly limited in my case (no  
>> idea whether that is typical)
>> In general I find it very difficult to integrate XQuery in the  
>> complete application stack. To a certain extent it is a bit like  
>> the object-relational mismatch on steroids.
>> For *a lot* of needs it is far easier to just shut down your brain  
>> and crank out a couple of hundred lines of DOM code and the go on  
>> with the real problem.
>> As said...fwiw,
>> Peter
>> On 25 Apr 2008, at 08:42, bryan rasmussen wrote:
>>>> solve.
>>>> The top major complains were:
>>>> (a) is too complicated to understand (tutorials, books !?)
>>> I agree, when I look at the XQuery stuff I have it seems to have a
>>> strong academic flavor, as well as a focus on XML based problems.
>>> examples:
>>> 1. lots of focus on the 'books' problem, like if I have a list of  
>>> book
>>> authors listed how do I deal with it. That might have an interest to
>>> typical document people, but I think it would be more useful if a  
>>> book
>>> was completely focused on - use XQuery to manage the various flavors
>>> of syndication now around, show querying a large base of different
>>> versions of RSS and Atom it might be useful to the Web 2.0 folks.
>>> 2. FLWOR is an unhelpful acronym. It seems off-putting. Don't know
>>> why, but if I try to think about it divorced from its meaning it  
>>> just
>>> strikes me as a problem. It's an aesthetic feeling.
>>>> (b) there are no good example of how to use it  (repositories of  
>>>> open
>>>> source useful XQuery modules !? CRM, etc)
>>> part of that would be solved if the examples in tutorials were
>>> basically all using things that are more useful for web  
>>> programming as
>>> opposed to just XML processing. I think this is one of the reasons I
>>> find eXist interesting, because lots of what they do seem  
>>> essentially
>>> focused on meeting the needs of web programmers in one way or  
>>> another.
>>> Cheers,
>>> Bryan Rasmussen
>>> _______________________________________________
>>> talk at x-query.com
>>> http://x-query.com/mailman/listinfo/talk
>> _______________________________________________
>> talk at x-query.com
>> http://x-query.com/mailman/listinfo/talk
> -- 
> John Snelson, Oracle Corporation            http://snelson.org.uk/john
> Berkeley DB XML:            http://oracle.com/database/berkeley-db/xml
> XQilla:                                  http://xqilla.sourceforge.net

More information about the talk mailing list