{"id":1000427,"date":"2007-02-24T09:20:35","date_gmt":"2007-02-24T14:20:35","guid":{"rendered":"http:\/\/www.elharo.com\/blog\/software-development\/2007\/02\/24\/xquery-on-rails\/"},"modified":"2007-02-24T09:43:39","modified_gmt":"2007-02-24T14:43:39","slug":"xquery-on-rails","status":"publish","type":"post","link":"https:\/\/www.elharo.com\/blog\/software-development\/xml\/2007\/02\/24\/xquery-on-rails\/","title":{"rendered":"XQuery on Rails"},"content":{"rendered":"<p>Rails (and similar frameworks like Seam, Grails, etc.) work by inspecting database schemas and dynamically generating code at runtime. They implicitly assume a SQL database, which isn&#8217;t really a good fit for most publishing applications. Sure you can slice and dice documents enough to force them into tables, but it&#8217;s a lot like pounding screws into set concrete with hammers. <\/p>\n<p>Many publishing applications, especially generic systems like Wikis, content management systems, and blog engines, would be better served by a native XML database and XQuery; e.g. eXist instead of MySQL. What would a Rails-like system look like in this environment? What would the conventions (instead of configurations) be?<br \/>\n<!--more--><\/p>\n<p>Is XQuery even capable of supporting this? After all, it&#8217;s only SELECT. Updates aren&#8217;t finished yet. Even more importantly,  a lot of details like how you find collections are unspecified and implementation specific. It&#8217;s not really possible to write any XQuery code that queries a database without using DB-specific functionality.<\/p>\n<p>Of course, it&#8217;s probably too early to design such a thing. We don&#8217;t have a lot of experience building sites on top of XQuery yet, though there are some <a href=\"http:\/\/www.safaribooksonline.com\/\">examples<\/a>. We probably need to build a few hundred more systems so we can see what we need before we try to automate the process. Right now we don&#8217;t even know what defaults make sense.  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Rails (and similar frameworks like Seam, Grails, etc.) work by inspecting database schemas and dynamically generating code at runtime. They implicitly assume a SQL database, which isn&#8217;t really a good fit for most publishing applications. Sure you can slice and dice documents enough to force them into tables, but it&#8217;s a lot like pounding screws [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[410],"class_list":["post-1000427","post","type-post","status-publish","format-standard","hentry","category-xml","tag-flash"],"_links":{"self":[{"href":"https:\/\/www.elharo.com\/blog\/wp-json\/wp\/v2\/posts\/1000427","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.elharo.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.elharo.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.elharo.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.elharo.com\/blog\/wp-json\/wp\/v2\/comments?post=1000427"}],"version-history":[{"count":0,"href":"https:\/\/www.elharo.com\/blog\/wp-json\/wp\/v2\/posts\/1000427\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.elharo.com\/blog\/wp-json\/wp\/v2\/media?parent=1000427"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.elharo.com\/blog\/wp-json\/wp\/v2\/categories?post=1000427"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.elharo.com\/blog\/wp-json\/wp\/v2\/tags?post=1000427"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}