views:

263

answers:

1

I noticed that DataLogic (or is it MarkLogic?) and SqlServer 2005 both support xquery for RDBMS access and (seem to; haven't tried this myself yet) offer xquery inside JSP/ASP. That leads me to wonder whether java code could disappear from the presentation layer. I.e. JSP/ASP would only contain html plus xquery code that accesses the DBMS directly, without the usual model and controller layers. The app I have in mind doesn't need/use a business rules layer so I've not worried about that.

Has anyone tried this? (BTW I know xquery needs java to work; I'm more thinking of reducing the number of languages programmers need to learn to get a web app on the air).

A: 

Another approach is to use an XML Server which stores XML data and use XQuery to access and deliver the result on the server side (I work at Mark Logic, we make an XML Server, try it here: http://developer.marklogic.com/download/)

In this architecture you have a single server storing XML and executing XQuery. If you deliver the result formatted as HTML you now have a two tier system. Of course you can use AJAX to access the XML Server vis ReST directly from within the page.

An advanced form of this architecture is called XRX. See this post for more info: http://www.oreillynet.com/xml/blog/2008/05/xrx_a_simple_elegant_disruptiv_1.html

Thanks, Jason. That's exactly the path I had in mind, except I doubt I'll be able to overcome my team's belief that RDBMS is the only sound solution. Even getting them to consider xquery will be a struggle.
Brad Cox
Brad, that's too bad although coming having spent 10 years on the Java/RDBMS side and now being on the XQuery side i see a lot of this. Many of our customers have been through this... and come out safely on the other side :)If you ever want to see examples of the two tier architectures folks are developing with XQuery don't hesitate to contact us. We are seeing increasing amounts of Flash/XQuery and HTML-JavaSript/XQuery architectures. Not mainstream today but the folks that have tried it oftne become die hard fans.Good luck with your project!