{"id":236,"date":"2003-12-11T10:58:00","date_gmt":"2003-12-11T14:58:00","guid":{"rendered":"http:\/\/www.markbaker.ca\/wp\/?p=77"},"modified":"2003-12-11T10:58:00","modified_gmt":"2003-12-11T14:58:00","slug":"more-zope-notes","status":"publish","type":"post","link":"http:\/\/www.markbaker.ca\/blog\/2003\/12\/more-zope-notes\/","title":{"rendered":"More Zope notes"},"content":{"rendered":"<p>The more I learn about Zope, the more I like.  Mostly.<\/p>\n\n<p>I&#8217;ve always had a keen interest in software composition, and so\nwas particulary impressed with Zope&#8217;s notion of\n<a href=\"http:\/\/zope.org\/Documentation\/Books\/ZopeBook\/2_6Edition\/Acquisition.stx\">&#8220;acquisition&#8221;<\/a>,\nwhich is just composition by aggregation.  What&#8217;s really novel here is not that, which has\nbeen <a href=\"http:\/\/java.sun.com\/developer\/technicalArticles\/jbeans\/BeanContext\/\">done before<\/a>,\n<a href=\"http:\/\/www.pcwebopaedia.com\/TERM\/O\/OpenDoc.html\">many times<\/a>, but the binding of\nthe URI hierarchy to containment relationships.  Kudos for that.<\/p>\n\n<p>One of the very few criticisms I have about Zope though is the use of\n<a href=\"http:\/\/zope.org\/Documentation\/Books\/ZopeBook\/2_6Edition\/ScriptingZope.stx#4-0\">&#8220;URL Traversal&#8221;<\/a>,\nto locate scripts named in a URI.  I added some comments to that page (itself,\na nifty feature!), as you can see there;<\/p>\n\n<blockquote>\nI was thoroughly impressed with most of what I&#8217;d seen in Zope, but not so much with this feature. Perhaps\nit&#8217;s convenient, but it&#8217;s also quite dangerous in general I think. The examples of &#8220;feed&#8221; and &#8220;wash&#8221; are are\ncalled &#8220;unsafe&#8221; methods in Web architecture terms (http:\/\/www.w3.org\/TR\/webarch\/); that is, they change the\nstate of the object. Therefore they, shouldn&#8217;t be invoked with GET, as Googlebot might come along and\naccidentally feed your hippos. If you want to change the hippo directly to the fed state, use PUT with a\ndocument which represents the state of that fed hippo. If you just want to give him food (that he may or may\nnot choose to eat), use POST with a description of the food.\n<\/blockquote>\n\n<p>I also wonder if the same misunderstanding about GET vs. POST was responsible\nfor some problems I noticed with\n<a href=\"http:\/\/zope.org\/Documentation\/Books\/ZDG\/current\/ObjectPublishing.stx\">object publishing<\/a>.\nFor example, both GET and POST end up invoking the &#8220;index_html&#8221; method (eek, a horrid name) of\nan object (basically the equivalent of doGet() for you servlet fans).  It&#8217;s odd that the object\nmodel define ambiguous dispatch behaviour for GET\/POST, yet define proper dispatch behaviour for\nPUT, HEAD, and the WebDAV extensions.  Perhaps a legacy mistake that&#8217;s too costly to fix?  Dunno.\nBut the more I read the publishing section, the more it seems that Zope has a bit of split\npersonality in supporting both the Web and RPC models.<\/p>\n\n<p>Hopefully that doesn&#8217;t get in the way of what I want to do with it.<\/p>","protected":false},"excerpt":{"rendered":"The more I learn about Zope, the more I like. Mostly. I&#8217;ve always had a keen interest in software composition, and so was particulary impressed with Zope&#8217;s notion of &#8220;acquisition&#8221;, which is just composition by aggregation. What&#8217;s really novel here is not that, which has been done before, many times, but the binding of the [&hellip;]","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-236","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/www.markbaker.ca\/blog\/wp-json\/wp\/v2\/posts\/236","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=236"}],"version-history":[{"count":0,"href":"http:\/\/www.markbaker.ca\/blog\/wp-json\/wp\/v2\/posts\/236\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.markbaker.ca\/blog\/wp-json\/wp\/v2\/media?parent=236"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.markbaker.ca\/blog\/wp-json\/wp\/v2\/categories?post=236"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.markbaker.ca\/blog\/wp-json\/wp\/v2\/tags?post=236"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}