{"id":11,"date":"2005-06-24T12:22:40","date_gmt":"2005-06-24T16:22:40","guid":{"rendered":"http:\/\/www.coactus.com\/blog\/?p=11"},"modified":"2005-06-26T19:53:07","modified_gmt":"2005-06-26T23:53:07","slug":"web-page-as-contract","status":"publish","type":"post","link":"http:\/\/www.coactus.com\/blog\/2005\/06\/web-page-as-contract\/","title":{"rendered":"Web page as contract"},"content":{"rendered":"<p>It&#8217;s these kinds of integration tensions that remind me why I love the Web so much.<\/p>\n<p>So, apparently, Google went and updated its <a href=\"http:\/\/gmail.google.com\">GMail site<\/a>, which caused a bunch of <a href=\"http:\/\/greasemonkey.mozdev.org\/\">Greasemonkey<\/a> scripts to fail.  <a href=\"http:\/\/www.redmonk.com\/sogrady\/archives\/000779.html\">Conspiracy theories ensued<\/a>.<\/p>\n<p><a href=\"http:\/\/www.25hoursaday.com\/weblog\/PermaLink.aspx?guid=87ad1fa6-08a9-491f-90c3-c77b22002c0c\">Dare Obasanjo takes an extreme position on the issue<\/a>;<\/p>\n<blockquote cite=\"http:\/\/www.25hoursaday.com\/weblog\/PermaLink.aspx?guid=87ad1fa6-08a9-491f-90c3-c77b22002c0c\"><p>\nRepeat after me, a web page is not an API or a platform.\n<\/p><\/blockquote>\n<p>It might be extreme, but I think it&#8217;s also a reasonable position, as I expect practically all Web developers would laugh out loud at hearing that somehow the <em>form<\/em> of the HTML they write is supposed to be, in some manner, &#8220;consistent&#8221; between versions.  But I feel it important to note that HTML pages do, in practice, have <em>some<\/em> important &#8220;platform&#8221; qualities.<\/p>\n<p>Consider <a href=\"http:\/\/www.w3.org\/TR\/REC-CSS2\/\">CSS style sheets<\/a>, and how they bind to HTML pages through the use of <a href=\"http:\/\/www.w3.org\/TR\/REC-CSS2\/selector.html\">selectors<\/a> and <a href=\"http:\/\/www.w3.org\/TR\/REC-CSS2\/cascade.html#cascade\">the cascade<\/a>, both of which use information in the HTML; change the HTML in an &#8220;inappropriate&#8221; way &#8211; changing something that the CSS was depending upon &#8211; and whammo, broken Web site.<\/p>\n<p>I hear you saying, &#8220;That&#8217;s different!&#8221;.  Yes, it is, to a large extent.  The HTML and CSS are authored by the same person (or at least are under the control of a single entity), so the interface between them does not constitute a <em>public platform<\/em>, just a private one, providing value in the form of a separation of concerns &#8211; and the resulting improvement in reusability &#8211; to site authors.<\/p>\n<p>But then again, not all style sheets are created equal!  Consider <a href=\"http:\/\/dbaron.org\/css\/user\/\">user style sheets<\/a>, created by the end user for their own benefit, and applied by the browser on their behalf without any involvement of the server.  For example, a visually impaired user could use them to increase the size of all fonts.  As can be seen by some <a href=\"http:\/\/www.w3.org\/TR\/CSS-access#UserControl\">examples<\/a> though, they&#8217;re typically very generic, and so commonly use <a href=\"http:\/\/www.w3.org\/TR\/REC-CSS2\/selector.html#type-selectors\">type selectors<\/a>, since they are generic to the HTML language, not specific to any site.  And that&#8217;s certainly a best practice that I think is worth calling out;<\/p>\n<blockquote><p>\nFor maximum reuse, depend only on the language, not on the form of any particular instance of that language\n<\/p><\/blockquote>\n<p>So, as I see it, this is all part of the ongoing battle between the <a href=\"http:\/\/www.w3.org\/2005\/Talks\/0511-keynote-tbl\/#[3]\">Gods of Literature<\/a>; the writer, and the reader.  That relationship is <em>incredibly dynamic<\/em>, at least on a Web-historic time scale, with each side constantly pushing for more control.  While I doubt there&#8217;s any balance to be found there, in either the short or long term, I would say that it&#8217;s interesting to observe that recent initiatives such as <a href=\"http:\/\/greasemonkey.mozdev.org\/\">Greasemonkey<\/a>, <a href=\"http:\/\/www.washingtonpost.com\/wp-dyn\/articles\/A660-2005Mar2.html\">Google Autolink<\/a>, and even <a href=\"http:\/\/www.microformats.org\">microformats<\/a> (by virtue of the information they add to a page making it more reusable for readers) are finally giving the reader their due after years of largely appeasing the writer.<\/p>\n<p><em>Update<\/em>; here&#8217;s yet <a href=\"http:\/\/www.zdnet.com.au\/news\/software\/0,2000061733,39198608,00.htm\">another example<\/a> of this same tension.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It&#8217;s these kinds of integration tensions that remind me why I love the Web so much. So, apparently, Google went and updated its GMail site, which caused a bunch of Greasemonkey scripts to fail. Conspiracy theories ensued. Dare Obasanjo takes an extreme position on the issue; Repeat after me, a web page is not an [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"_links":{"self":[{"href":"http:\/\/www.coactus.com\/blog\/wp-json\/wp\/v2\/posts\/11"}],"collection":[{"href":"http:\/\/www.coactus.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.coactus.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.coactus.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.coactus.com\/blog\/wp-json\/wp\/v2\/comments?post=11"}],"version-history":[{"count":0,"href":"http:\/\/www.coactus.com\/blog\/wp-json\/wp\/v2\/posts\/11\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.coactus.com\/blog\/wp-json\/wp\/v2\/media?parent=11"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.coactus.com\/blog\/wp-json\/wp\/v2\/categories?post=11"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.coactus.com\/blog\/wp-json\/wp\/v2\/tags?post=11"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}