{"id":56,"date":"2005-10-22T10:54:06","date_gmt":"2005-10-22T14:54:06","guid":{"rendered":"http:\/\/benjamin.smedbergs.us\/blog\/?p=56"},"modified":"2006-08-04T15:29:29","modified_gmt":"2006-08-04T19:29:29","slug":"xulrunner-and-databases","status":"publish","type":"post","link":"http:\/\/benjamin.smedbergs.us\/blog\/2005-10-22\/xulrunner-and-databases\/","title":{"rendered":"XULRunner and the Database Achilles Heel"},"content":{"rendered":"<p>One of the most frequent and persistent complaints about XULRunner is that I have explicitly excluded support for client\/server SQL databases. Some have even gone forth to say that lack of proper database access in the platform <a href=\"http:\/\/codesnipers.com\/?q=node\/132&#038;title=\">will be it&#8217;s Achilles&#8217; heel<\/a>. And so I&#8217;m going to try and address this issue head-on:<\/p>\n<p>XULRunner does have a database strategy: the platform will provide support for a SQLite embedded database API reflected into XPCOM. It will not include support for client\/server database mechanisms such as MySQL\/Oracle\/etc. This reasons for this are fairly simple: The primary targets of XULRunner are twofold: support the Mozilla rich-client apps (Firefox and Thunderbird); and allow innovation of networked rich client apps based on web technologies. Client\/server databases really don&#8217;t have any part in this strategy; Mozilla would not have any real testing\/QA framework for this code if it were included. We need to keep a lean and focused platform that does not try to solve everyone&#8217;s problems.<\/p>\n<p>Having said that, there are a couple solutions for doing client\/server database access:<\/p>\n<ol>\n<li>Jan Varga has done client\/server database code which lives in <a href=\"http:\/\/lxr.mozilla.org\/mozilla\/source\/extensions\/sql\/\">extensions\/sql<\/a>. If an app really needs client\/server database access, it can ship the SQL extension with the application; I&#8217;m going to work with Jan to get this code into shape as a real platform-level extension and make it available on <a href=\"http:\/\/addons.mozilla.org\/\">http:\/\/addons.mozilla.org\/<\/a>.\n<li>It&#8217;s not that hard to write a web proxy which takes SQL, performs a query, and returns the results as XML: AJAX-style web apps could use this to perform SQL-based queries over XMLHttpRequest. This will be even more useful once Neil Deakin completes the template work.\n<\/ol>\n<p>I&#8217;ll have a few cool XULRunner demonstrations up shortly, including a popular AJAX-style webapp in it&#8217;s own XULRunner process (hopefully with minimize-to-tray and everything), and the beginnings of some dashboard-like widgets written in XUL+SVG that are loaded directly from the web and have web-based security permissions.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the most frequent and persistent complaints about XULRunner is that I have explicitly excluded support for client\/server SQL databases. Some have even gone forth to say that lack of proper database access in the platform will be it&#8217;s Achilles&#8217; heel. And so I&#8217;m going to try and address this issue head-on: XULRunner does [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[10],"class_list":["post-56","post","type-post","status-publish","format-standard","hentry","category-mozilla","tag-xulrunner"],"_links":{"self":[{"href":"http:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/posts\/56","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/comments?post=56"}],"version-history":[{"count":0,"href":"http:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/posts\/56\/revisions"}],"wp:attachment":[{"href":"http:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/media?parent=56"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/categories?post=56"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/benjamin.smedbergs.us\/blog\/wp-json\/wp\/v2\/tags?post=56"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}