{"id":1976,"date":"2008-07-24T01:21:38","date_gmt":"2008-07-24T05:21:38","guid":{"rendered":"http:\/\/www.markbaker.ca\/blog\/?p=1570"},"modified":"2008-09-15T10:17:18","modified_gmt":"2008-09-15T14:17:18","slug":"google-gears-the-soap-approach-to-web-app-development","status":"publish","type":"post","link":"http:\/\/www.markbaker.ca\/blog\/2008\/07\/google-gears-the-soap-approach-to-web-app-development\/","title":{"rendered":"Google Gears: the SOAP approach to Web app development"},"content":{"rendered":"<p>I respect what Google&#8217;s trying to accomplish with <a href=\"http:\/\/gears.google.com\/\">Gears<\/a> very much, and appreciate that they&#8217;re helping draw attention to the need to build out the client-side of the Web a bit more, and that they&#8217;re doing it with open source.  They&#8217;ve nailed the <em>what<\/em> perfectly.<\/p>\r\n\r\n<p>Then again, Web services nailed their requirements perfectly too.<\/p>\r\n\r\n<p>I think the <em>how<\/em> of what Gears is doing is, frankly, misguided.  There&#8217;s minimal reuse of existing Web technologies, and it&#8217;s overly imperative when it could be easily be far more declarative.  Each of these issues raise the bar for the kinds of skills a Web developer needs.  Not a good thing.<\/p>\r\n\r\n<p>Interestingly, the Web services analogy doesn&#8217;t stop at the requirements.  When I talk about &#8220;minimal reuse&#8221;, what I&#8217;m referring to is that the Web already has a mature and general API for accessing and manipulating local data-oriented services &#8211; the DOM &#8211; and no &#8220;gear&#8221; I&#8217;ve seen has yet to use it for data access.  So instead of a Javascript GeoLocation object that might expose method calls such as getCurrentLocation() or getLockedSatellites(), why not make the object a <a href=\"http:\/\/www.w3.org\/TR\/DOM-Level-2-Core\/core.html#ID-1950641247\">DOM Node<\/a> and treat the data contained within as a document?  Something like;<\/p>\r\n<pre>&lt;Location&gt;\r\n  &lt;Current&gt;45.234,-120.999&lt;\/Current&gt;\r\n  &lt;LockedSattelites&gt;4&lt;\/LockedSatellites&gt;\r\n&lt;\/Location&gt;<\/pre>\r\n<p>(or better yet perhaps, microformatted HTML &#8211; though there&#8217;s <a href=\"http:\/\/lists.w3.org\/Archives\/Public\/public-geolocation\/2008Jun\/0167.html\">issues<\/a> there)<\/p>\r\n\r\n<p>Then you could use the DOM itself to get at those values, or perhaps even a CSS selector.  Simple!.  You even get <a href=\"http:\/\/dev.w3.org\/2006\/webapi\/DOM-Level-3-Events\/html\/DOM3-Events.html\">events<\/a> for free.<\/p>\r\n\r\n<p>Why is it that the industry continues to overlook the value of reusing pervasively deployed generic abstractions, be they <a href=\"http:\/\/www.ics.uci.edu\/~fielding\/pubs\/dissertation\/rest_arch_style.htm#sec_5_1_5\">network oriented<\/a> or local?  It couldn&#8217;t be a case of <a href=\"http:\/\/en.wikipedia.org\/wiki\/Not_Invented_Here\">NIH<\/a>, because the DOM is unavoidable if you&#8217;re a Web dev.  I guess it just didn&#8217;t occur to the them, though that doesn&#8217;t explain the <a href=\"http:\/\/lists.w3.org\/Archives\/Public\/public-geolocation\/2008Jun\/0005.html\">push back<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"I respect what Google&#8217;s trying to accomplish with Gears very much, and appreciate that they&#8217;re helping draw attention to the need to build out the client-side of the Web a bit more, and that they&#8217;re doing it with open source. They&#8217;ve nailed the what perfectly. Then again, Web services nailed their requirements perfectly too. I [&hellip;]","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[42,43,12,44,36],"class_list":["post-1976","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-dom","tag-gears","tag-google","tag-javascript","tag-web20"],"_links":{"self":[{"href":"http:\/\/www.markbaker.ca\/blog\/wp-json\/wp\/v2\/posts\/1976","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.markbaker.ca\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.markbaker.ca\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.markbaker.ca\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.markbaker.ca\/blog\/wp-json\/wp\/v2\/comments?post=1976"}],"version-history":[{"count":0,"href":"http:\/\/www.markbaker.ca\/blog\/wp-json\/wp\/v2\/posts\/1976\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.markbaker.ca\/blog\/wp-json\/wp\/v2\/media?parent=1976"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.markbaker.ca\/blog\/wp-json\/wp\/v2\/categories?post=1976"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.markbaker.ca\/blog\/wp-json\/wp\/v2\/tags?post=1976"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}