mca bloghttp://www.amundsen.com/blog/making progressSat, 04 Feb 2012 08:19:06 GMTen-us180Programming the Web with Cloud9http://www.amundsen.com/blog/archives/1117http://www.amundsen.com/blog/archives/1117Tue, 17 Jan 2012 11:49:00 GMT<p> <a href="http://c9.io"> <img src="http://a2.twimg.com/profile_images/1523529310/Cloud9-IDE-Avatar_reasonably_small.png" align="right" class="inline" /> </a> it's official! i've signed to do a new book for O'Reilly. the working title is "Programming the Web with Cloud9" and it covers the <a href="http://c9.io" title="Cloud9">Cloud9</a> browser-based IDE for building Web apps. </p> <p> i've been using the IDE for several months (actually put myself on an "all c9, all the time" regime for a while) and have really been impressed. in fact, over the last sveeral weeks i've actually been bummed out when i ran into a few cases where i actually <i>needed</i> to use my local workstation to handle a task instead of relying on "C9 and the Cloud" to do it all. hey, it happens[g]. </p> <h4>hardware, software, wetware</h4> <p> while the main focus of the book is the Cloud9 editor, it will also cover other 'cloud-based' developer tools including <a href="http://couchdb.apache.org/" title="The Apache CouchDB Project">CouchDB</a>, <a href="http://github.com" title="github">github</a>, and <a href="http://www.heroku.com/" title="Heroku Cloud Application Platform">Heroku</a> and more. in addition to the actual software and hardware, i am also digging into the 'wet-ware' aspects of cloud-based programming. this includes how cloud-based dev tools affect teams, collaboration, project schedules, code quality, etc. along the way, i will have the chance to meet and interview some very smart people who are active in shaping the future of this kind of Web developer's experience. </p> <h4>the journey begins</h4> <p> i'll officially kick off the start of the new project w/ a trip to <a href="http://nodesummit.com/">Node Summit</a> in San Francisco next week. if you're in the area, i'd love to meet you and get your opinions/predictions regarding these (and other) 'cloud-based' development tools. who knows, maybe some of your comments will end up in the book! </p>'cloud-stack' programminghttp://www.amundsen.com/blog/archives/1116http://www.amundsen.com/blog/archives/1116Wed, 04 Jan 2012 09:56:00 GMT<p> <a href="http://www.flickr.com/photos/psychedelicfivecats/1533941141/" title="Stacked Clouds"> <img src="http://farm3.staticflickr.com/2149/1533941141_44c55903d7_t.jpg" class="inline" align="right" /> </a> over the last couple months, i've been experimenting with a "new" development stack; what i call a "cloud stack." this development environment consists of a set of independent, but complimentary tools and services - all available via the Web. they make up a "full stack" for web development that is, IMO, quite enjoyable to work with. even better, i find it a very productive environment, too. </p> <h4>hello, cloud</h4> <p> i've noticed that, along with the rise of "the cloud" as an infrastructure model, there is also a corresponding development model. this model provides a cloud-based environment that includes editing, debugging, testing, source control, project mgmt, and deployment; all accessible from nothing more than a modern (i.e. HTML5-compliant) browser. </p> <p> and, just as the process of virtualizing the hardware stack has acted as a distruptive technology for the back office, this emerging virtual programming environment will, i suspect, prove to be just as disruptive, too. </p> <h4>my current cloud stack of choice</h4> <p> here is my current toolkit for cloud-stack development: </p> <dl> <dt>Cloud9</dt> <dd>i've really enjoyed using the <a href="http://c9.io/">Cloud9</a> browser-hosted code editor over the last few months. very similar (in some ways, related) to Mozilla's <a href="http://mozillalabs.com/skywriter/2011/01/18/mozilla-skywriter-has-been-merged-into-ace/"> Bespin/Skywriter</a> project, C9 is (for me at least) living up to the copy on it's home page: "Cloud9 is a state-of-the-art IDE that runs in your browser and lives in the cloud, allowing you to run, test, debug, and deploy applications from anywhere, anytime." </dd> <dt>Node.js</dt> <dd> i started using <a href="http://nodejs.org/">Node.js</a> just about a year ago for a couple experiments; i've continued to enjoy working with it ever since. it's nice that Cloud9 supports runtime-debugging of Node.js, too. like the web site sez: "Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices." </dd> <dt>CouchDB</dt> <dd> along w/ using Node.js, i've started using <a href="http://couchdb.apache.org/">Apache CouchDB</a> as a data store. from the site: "Apache CouchDB is a document-oriented database that can be queried and indexed using JavaScript in a MapReduce fashion." right now i am testing two CouchDB providers: <a href="https://cloudant.com/">Cloudant</a> and <a rhef="http://www.iriscouch.com/">IrisCouch</a>; both seem very solid. </dd> <dt>Github</dt> <dd> i've used a number of git-based repos lately, but continue to rely on <a href="https://github.com/">github</a> as my "go-to" source control tool. it helps that the Cloud9 editor also uses git locally and will let you clone any project from github easily. forking and code review are another thing that make github very enjoyable to use. </dd> <dt>Heroku</dt> <dd> i've recently started using <a href="http://www.heroku.com/">Heroku</a> as a deployment target for my completed Node.js projects ("Agile deployment for Ruby, Node.js, Clojure, Java, Python, and Scala."). again, it's easy since Cloud9 supports git-based deployment to Herkou directly from the editor interface. it took a bit of "tweaking" to get my git master properly 'prepped' for Heroku, but once that's done, incremental updates are a snap. </dd> </dl> <p> one of the nicer aspects of the above stack is that you can get started with each of them at no charge. IOW, it's essentially free to experiment. not bad at all. </p> <h4>the bigger picture</h4> <p> so far, this is the stack that works for me. there are a number of other products/services out there that i haven't yet tried, but basically it boils down to the same general programming set: editor/debugger, storage, source control, and deployment. i've left out things like testing and other helpers as i am just getting around to exploring those tools, too. </p> <p> but, regardless of the details, i think the pattern is clear; there are quite a number of options for putting together your own 'cloud-stack' development environment. and i suspect this kind of environment will grow popular in time. along the way, i bet we'll see other (major) vendors make offerings in this space, too. when that happens i suspect the market for this kind of work will continue to grow and get even better. </p> <p style="font-style:italic"> have you assembled a 'cloud-stack' programming environment? if yes, let me know. i'd love to hear about other experiences. </p>REST : 'inverted' architecturehttp://www.amundsen.com/blog/archives/1115http://www.amundsen.com/blog/archives/1115Wed, 28 Dec 2011 20:56:00 GMT<p> <a href="http://www.flickr.com/photos/jamaladi/411604841/" tile="two sides"> <img src="http://farm1.staticflickr.com/155/411604841_87c69c5538_t.jpg" title="two sides" align="right" /> </a> Here is one way I talk about HTTP and Fielding's REST model: </p> <h4>the way of HTTP</h4> <p> HTTP was designed to favor long term (measured in years/decades) run-time stability over ease of implementation. to do this, it relies on some very simple (but powerful) constraints: </p> <ul> <li> every machine that operates over the WWW is constrained to a very tiny executable interface (what we know as the HTTP verbs). The details of this restricted interface are documented in a protocol that rarely changes over time and even when it <i>does</i> change, great pains are made to ensure these changes do not invalidate past implementations. </li> <li> every message sent over that interface consists to two basic parts: control data as a set of name-value pairs (HTTP Headers) and a single self-describing message body. This body can be "described" as 1) a structured document (text/html), 2) a binary image (image/png), 3) a list of arguments (application/x-www-form-urlencoded), etc. in HTTP the message contains not just data, but also instructions on how to operate on the data and what program-flow options are valid at that particular point in time. The list of "understood" message formats are publicly registered w/ the IANA today and is meant to evolve relatively easily over time in ways that do not "break" existing implementations. </li> <li> everything of importance is reachable using a universally understood address (URI). the list of addresses, while based on standards, is essentially unlimited and implementors are free to mint new ones as often as they wish and/or abandon existing addresses at any time. </li> </ul> <h4>the other way</h4> <p> implementing solutions under these constraints is usually quite different than what most programmers/architects learn in school. most training is "the reverse" of the above rules. Such that: </p> <ul> <li> the list of verbs in the interface is <i>unlimited</i> and their details (arguments, etc.) are subject to change. most implementation effort is focused on defining , documenting, and maintaining this variable interface. </li> <li> the program flow is found in <i>code</i> rather than in messages. usually in multiple place (clients and servers). </li> <li> the list of 'addresses' is constrained to the name of the executable programs themselves which do not change as often as the interface </li> </ul> <h4>why the differences matter</h4> <p> Fielding's dissertation, while focused on the details of identifying and documenting arbitrary styles of software architecture for distributed systems, still does a very good job of documenting a single example (or 'style') of software architecture that is closely aligned with the HTTP constraints listed at the top of this post. Fielding named his example "REST". </p> <p> history has shown that the HTTP protocol is a very flexible protocol and that not all implementations need to follow the example provided by Fielding in order to meet the needs of users. for example, RPC over HTTP works just fine for many cases; esp. those that do not require system stability on the scale of years/decades. </p> <p> however, the more important it is for the solution to continue to operate (and evolve) over an extended period of time, the more useful are the additional constraints Fielding identified in his example and the more important it is to optimize for run-time stability over ease/speed of initial implementation. </p>REST: menus and styleshttp://www.amundsen.com/blog/archives/1114http://www.amundsen.com/blog/archives/1114Wed, 21 Dec 2011 10:06:00 GMT<blockquote> <p>"What is surprising about the Shaw et al. model is that, rather than defining the software's architecture as existing within the software, it is defining a description of the software's architecture as if that were the architecture." </p> <p align="right"> <a href="http://www.ics.uci.edu/~fielding/pubs/dissertation/software_arch.htm#sec_1_2" title=""> Roy T. Fielding </a> </p> </blockquote> <p align="center"> <img src="http://foucault.info/documents/img/notapipe/Magritte-pipe.jpg" title="Rene Magritte : This is not a pipe" /> </p> <blockquote> <p> "If you think the menu 'is' the meal, you'll have to eat your words." </p> <p align="right"> <a href="http://korzybskifiles.blogspot.com/2011/12/from-stray-thought-bin-menus-and-meals.html"> Alfred Korzybski </a> </p> </blockquote> design [for error | explorable systems]http://www.amundsen.com/blog/archives/1113http://www.amundsen.com/blog/archives/1113Sat, 26 Nov 2011 14:40:00 GMT<p> valuable guidance when designing a Hypermedia API (emphasis and brackets "[]" mine): </p> <blockquote> <p> Think of each action by the user [of your API] as an attempt to step in the right direction; an error is simply an action that is incompletely or improperly specified. Think of the action as part of a natural, constructive dialog between the user [and/or user-agent] and the system [your API]. Try to support, not fight, the user's responses. Allow the user [and/or user-agent] to recover from errors, to know what was done and what happened, and to reverse any unwanted outcome. make it easy to reverse operations; make it hard to do irreversible actions. <b>Design explorable systems [APIs]</b>. </p> <p align="right"> <a href="http://www.amazon.com/Design-Everyday-Things-Donald-Norman/dp/0385267746"> Donald A. Norman in The Design of Everyday Things, 1990. </a> </p> </blockquote> <p> designing (and implementing) Hypermedia APIs is more than simply exposing server-side operations to clients (users, user-agents, etc.). instead, good Hypermedia APIs include the proper amount of affordances and constraints which allow users|user-agents to successfully interact with servers in order to complete one or more tasks in an effort to accomplish a pre-determined goal. </p> <p> usability (in all its commonly-known forms and interpretations) is an essential aspect of Hypermedia. usability is, in the end, an essential aspect of all systems; esp. 'complex' ones. </p> <h4> how usable is your API? </h4>affordances and constraintshttp://www.amundsen.com/blog/archives/1112http://www.amundsen.com/blog/archives/1112Fri, 18 Nov 2011 00:55:00 GMT<p align="center"> <a href="http://www.amazon.com/Design-Everyday-Things-Donald-Norman/dp/0385267746" title="The Design of Everyday Things"> <img src="http://ecx.images-amazon.com/images/I/719KFS67JBL._BO2,204,203,200_PIsitb-sticker-arrow-click,TopRight,35,-76_AA300_SH20_OU01_.gif" class="inline" /> </a> </p> <blockquote> <p> How can design signal the appropriate actions? ... One important set of signals comes through the natural constraints of objects, physical constraints that limit what can be done. Another set of signals comes from the affordances of objects, which convey messages about their possible uses, actions, and functions. ... Affordances suggest the range of possibilities, constraints limit the number of alternatives. The thoughtful use of affordances and constraints together in design lets a user determine readily the proper course of action, even in a novel situation. </p> <p align="right"> <a href="http://www.amazon.com/Design-Everyday-Things-Donald-Norman/dp/0385267746" title="The Design of Everyday Things"> The Design of Everyday Things by Donald Norman, pg 82 </a> </p> </blockquote> "The value of a well-designed object..." http://www.amundsen.com/blog/archives/1111http://www.amundsen.com/blog/archives/1111Tue, 01 Nov 2011 10:07:00 GMT<p align="center"> <iframe width="420" height="315" src="http://www.youtube.com/embed/NK1Zb_5VxuM" frameborder="0" allowfullscreen="true"></iframe> </p> <p align="center"> "The value of a well-designed object is when it has such a rich set of affordances that the people who use it can do things with it that the designer never imagined." </p> <p align="right"> <i> Donald Norman, 1994 </i> </p> hypermedia bindinghttp://www.amundsen.com/blog/archives/1110http://www.amundsen.com/blog/archives/1110Tue, 04 Oct 2011 11:48:00 GMT<p> <a href="http://www.flickr.com/photos/darrentunnicliff/4469318003/" title="...Time..."> <img src="http://farm5.static.flickr.com/4057/4469318003_4ff51615fa_t.jpg" align="right" class="inline" /> </a> in 1921 <a href="http://en.wikipedia.org/wiki/Alfred_Korzybski" title="Alfred Habdank Skarbek Korzybski (July 3, 1879 - March 1, 1950)">Alfred Korzybski</a> published <a href="http://www.gutenberg.org/ebooks/25457" title="Manhood of Humantity"> Manhood of Humanity</a>. in this work (and in subsequent editions) Korzybski lays out his basic premise that what makes humans unique is their ability to adapt and evolve more effectively than any other animal to date. he claims this is due to our ability to use "time" as a key abstraction; to evolve over time. the technique we use to accomplish this (he claims) is the ability to pass our knowledge down the generations (writing, etc.). we make "time" an ally in our evolution and adaptation. he called this uniquely human capability "<a href="http://en.wikipedia.org/wiki/General_semantics#Other_aspects_of_the_system" title="Time Binding">time-binding</a>." </p> <p>effectively evolving over time; <i>time-binding</i>...</p> <p>hmmm....</p> <blockquote> <p> "There are two ways to slide easily through life; to believe everything or to doubt everything. Both ways save us from thinking. " </p> <p align="right"> Alfred Korzybski, "Manhood of Humanity", 1921 </p> </blockquote> <h4>binding examples for dist-net apps</h4> <p> when we write dist-net apps today, the problem of "binding" the client to the server must be addressed. i've mentioned this stuff before in this blog but i'll give a quick summary again since it's will fill some space here and enforce my selected POV for today[grin]. </p> <dl> <dt>RPC-style</dt> <dd>the client and server share the list of remote procedures including the names of the procedures and the calling details (arg list, types, etc.) and the expected return values/objects. <b>clients are bound to the procedure list.</b> </dd> <dt>OO-style</dt> <dd> the client and server share knowledge of the object graph including the hierarchy, member details, methods that can/should be applied to the objects, and the method of serializing and deserializing those objects. <b>clients are bound to the object graph.</b> </dd> <dt>URI-style</dt> <dd> the client and server share knowledge of the URI space (segments, parameters, etc.) and the payloads associated w/ those URIs. usually clients are given a set of rules on how to construct URIs and how to craft payloads to match. <b>clients are bound to the URIs/rules.</b> </dd> </dl> <p> these should all look/sound familiar; we deal with this stuff everyday. these are all examples of how developers attempt to animate a problem domain over a distributed network; how we write apps that get things done. basically, how devs work out a way to share understanding of the problem domain between client and server. </p> <h4>the evolvability problem</h4> <p> a key point here is to understand how these well-known models behave over time; how they handle "evolvability." for the most part, the styles identified above do not handle it well. for example, changes in the list of remote procedures, the shared object graphs, and/or the URI patterns all run the risk of (at least) freezing the exisiting client at some "static version" of the dist-net app. at worst, existing clients will "break" or become useless. </p> <p> the common solution is to simply abandon old clients by asserting a new "version" of the app that handles the problem domain. this can be done by re-writing the client code and shipping that new code to everyone (Javascript anyone?), changing the URI pattern to start a "new" URI space that "old" clients never "see", or just making the changes and instructing all client devs to go back and re-write their code to match the new domain details. </p> <p> IOW, there is no "evolving" here; each "version" is a "<a href="http://arstechnica.com/science/news/2010/06/darwins-rarest-finch-meets-an-evolutionary-dead-end.ars" title="Darwin's rarest finch meets an evolutionary dead end">genetic dead end</a>" so to speak. each major "modification" is a "<a href="http://en.wikipedia.org/wiki/Greenfield_project" title="Greenfield project">greenfield project</a>" for client coding. </p> <p>but it does not need to be this way. it <i>is</i> possible to use the lessons from Korzybksi's "time-binding" model to craft dist-net apps that can sucessfully evolve over time. that can adapt to changes in the problem domain w/o needed to be re-coded or "left behind" as the app space moves on. </p> <h4>we need a new binding model</h4> <p> what some readers may have noticed is that, in the previous style examples the target of binding clients and servers is always a "first-class" aspect of the problem domain (the procedures, the objects, the network identifiers). it only stands to reason that changes in the problem domain will alter these collections and that alteration will run the risk of adversely affecting the over-all effectiveness of the participants (clients and servers) thereby reducing it's evolability. </p> <p>one way to simply <i>avoid</i> this problem is to stop binding to "first-class" problem domain elements. instead, what is needed is a binding model that can support shared understanding between client and server, can effectively "animate" the problem domain over the dist-net, and still support change over time. </p> <h4>hypermedia binding</h4> <p> a solution to the evolving-over-time problem for dist-net apps is to bind clients and servers via a shared understanding of hypermedia controls. IOW, change the binding from first-class domain elements to an abstract expression of those elements; to elements (links and forms) that make "animating" dist-net apps possible. </p> <p>let's add one more style to the binding list above...</p> <dl> <dt>Hypermedia-style</dt> <dd> the client and server share understanding of the links and forms that may appear within a message. they agree on which hypermedia element represents a "safe" operation, which are "idemponent" or "non-idempotent", which elements support optional arguments (forms), which require payloads, and which support generalized rules about URI construction (URI templates, etc.). <b>clients are bound to the hypermedia controls in a representation</b> </dd> </dl> <p>in the above style, changes in the problem domain (new procedures, new objects, new URIs) do not "break" existing clients; they can continue to function and will instantly support the evolved problem domain. why? because the "binding" is orthagonal to the problem domain. the "binding" is to the hypermedia controls themselves; not what they "represent" at any point in time. whenever a form or link appears in a response, the client will be able to recognize, parse, and render it as needed. the system can successfully evolve over time.</p> <p> the only risk of "breakage" is when the details of the hypmedia controls are changed. for example, new hypermedia elements appear (they will be ignored) or aspects of an existing hypermedia element are changed (this can "break" the client). but these changes are less likely to occur than changes in the problem domain and there are facilities for dealing with these changes, too (i.e. new media types, new transfer protocols, etc.). </p> <h4>bottom-line?</h4> <p> a hypermedia-oriented approach shifts the binding away from the volatile problem domain elements and toward the more stable hypermedia elements. in doing so, the evolvability of the system is increased. <i>hypermedia-binding</i> makes it easier for dist-net apps to evolve and adapt over time without running into a "dead-end"; without the need to declare a "version" for each meaningful modification in the system. </p> <h4>hypermedia-binding works at internet scale</h4>hypermedia affordanceshttp://www.amundsen.com/blog/archives/1109http://www.amundsen.com/blog/archives/1109Tue, 27 Sep 2011 09:48:00 GMT<p> <a href="http://www.flickr.com/photos/andrew_d_miller/136039104/" title="affordance? : yes, the deadbolt does turn off the light."> <img src="http://farm1.static.flickr.com/44/136039104_e246e1c403_t.jpg" align="right" class="inline" /> </a> recently, i started thinking more about the concept of "affordances" and how that relates to my experiments in hypermedia designs. the trigger for these recent thought was a <a href="http://dannyayers.com/2011/08/28/RDF-Affordances" title="RDF Affordances">post</a> by <a href="http://twitter.com/danja" title="Danny Ayers">@danja</a> and a few subsequent page entries to the W3C Wiki on <a href="http://www.w3.org/wiki/RdfAffordances">RDF affordances</a>. Danny's wiki entries point to a handful of other folks who have wrtten about affordances recently, too. all good stuff. </p> <h4>affordances</h4> <p> it's a funny word; made up word, actually: </p> <blockquote remark="james gibson"> <p> The affordances of the environment are what it offers ... what it provides or furnishes, either for good or ill. The verb 'to afford' is found in the dictionary, but the noun 'affordance' is not. I have made it up (page 126). </p> <p align="right"> <a href="http://books.google.com/books?id=DrhCCWmJpWUC&amp;lpg=PA127&amp;ots=TfC91v5hCm&amp;dq=the%20theory%20of%20affordances&amp;pg=PA127#v=onepage&amp;q=the%20theory%20of%20affordances&amp;f=false"> The Ecological Approach to Visual Perception </a> (Gibson, 1986) </p> </blockquote> <p> not long after Gibson made up the word, <a href="http://en.wikipedia.org/wiki/Donald_Norman">Donald Norman</a> used it, too: </p> <blockquote remark="don norman"> <p> ...the term affordance refers to the perceived and actual properties of the thing, primarily those fundamental properties that determine just how the thing could possibly be used. (pg 9) </p> <p align="right"> <a href="http://books.google.com/books/about/The_design_of_everyday_things.html?id=w8pM72p_dpoC"> The [Design|Psychology] of Everyday Things </a> (Norman, 1988) </p> </blockquote> <p> years later, when trying to clarify what he meant by "hypermedia", <a href="http://www.ics.uci.edu/~fielding/">Roy Fielding</a> offered this: </p> <blockquote remark="roy fielding"> <p> When I say Hypertext, I mean the simultaneous presentation of information and controls such that the information becomes the affordance through which the user obtains choices and selects actions (slide #50). </p> <p align="right"> <a href="http://www.slideshare.net/royfielding/a-little-rest-and-relaxation"> Slide Presentation on REST </a> (Fielding, 2008) </p> </blockquote> <h4>hypermedia affordance</h4> <p> if i follow the Gibson and Norman POV, i come to the point where "hypermedia affordances" should be recognizable "things" in the "landscape" that offer "actions." and these actions should be (IMO) related to hypermedia itself. so what would be the characteristics of hypermedia affordances? what would they "offer"? and how would they offer it? </p> <p> right now i am of the opinion that a single set of <i>aspects</i> of hypermedia affordances can be identified. that this set would be universal to all hypermedia designs; no matter the protocol used (HTTP, FTP, etc.), the data format used (HTML, JSON, etc.). and that set of <i>aspects</i> should be enough to "construct" any hypermedia control needed in order to support a particular action in a distributed application. </p> <p> the meaning and use of these affordance <i>aspects</i> must be shared by both client and server in a distributed network. IOW, when a server crafts a message that contains hypermedia affordances, the client has the same understanding of the meaning of that affordance as the server. to make that work, both parties need to know how to interpret the affordance. that's where the <i>aspects</i> come in. </p> <p>i claim there is a stable set of <i>aspects</i> that can be found expressed in <b>every</b> affordance. and i claim that the set has only four members. </p> <h4>hypermedia affordance aspects</h4> <p> so here goes; my list of universal hypermedia affordance aspects: </p> <dl> <dt>Safety</dt> <dd> the affordance offers either a <i>safe</i> action (<code>HTML.A</code>) or an <i>unsafe</i> action (<code>ATOM.LINK@rel="edit"</code>). </dd> <dt>Idempotence</dt> <dd> the affordance represents either an <i>idempotent</i> action (<code>HTML.FORM@method="get"</code>) or a <i>non-idempotent</i> action (<code>HTML.FORM@method="post"</code>). </dd> <dt>Mutability</dt> <dd> the affordance is meant to support modification (<i>mutable</i>) by the client (<code>HTML.FORM</code>) or the affrodance is <i>immutable</i> (<code>HTML.LINK</code>). </dd> <dt>Presentation</dt> <dd> the result of activating the affordance should either be treated as a <i>navigation</i> (<code>HTML.A</code>) or as a <i>transclusion</i> (<code>HTML.IMG</code>). </dd> </dl> <p> that's it. these four <i>aspects</i> appear in every hypermedia control and can be used to create any hypermedia control needed in a dist. net. app. </p> <h4>examples</h4> <p> here are some examples: </p> <ul> <li><code>HTML.IMG</code> [safe, idempotent, immutable, transclusion]</li> <li><code>HTML.FORM@method="post"</code> [unsafe, non-idempotent, mutable, navigation]</li> <li><code>HTML.A</code> [safe, idempotent, immutable, navigation]</li> <li><code>HTML.LINK@rel="stylesheet"</code> [safe, idempotent, immutable, transclusion]</li> <li><code>HTML.LINK@rel="rss"</code> [safe, idempotent, immutable, navigation]</li> </ul> <p> and the list goes on. this, i claim, works for any existing hypermedia type (Atom, SVG, CSS, etc.). i have been experimenting and i think, in some cases, the "aspect values" of some hypermedia controls are a bit vague (i.e. <code>ATOM.LINK@rel="edit"</code> = [unsafe, idempotent, mutable, <i>navigation?</i>]). right now i am of the opinion that this shows a vaguary in the control and/or documentation of that control, not a shortcoming in my set of aspects. </p> <h4>so...</h4> <p> so why is this interesting? </p> <p> if the general theory holds true (that there is an invariant set of aspects shared by all hypermedia affordances, regardless of data format or protocol), then it should be possible to express the same hypermedia control in any format, for any protocol. IOW, code can be wrttten that "understands" the aspects, "understands" each hypermedia control, and can "act" accordingly. </p> <p> it should be possible to create a matrix of controls and aspects. it should be possible to create a single client application (agent) that can properly recognize and parse any hypermedia type as long as the agent has access to the list of affordances and their aspects for that hypermedia type. </p> <h4>general theory of hypermedia?</h4> <h4>universal hypermedia translator?</h4> <h4>one format to rule them all?</h4> three levels of abstractionhttp://www.amundsen.com/blog/archives/1108http://www.amundsen.com/blog/archives/1108Thu, 25 Aug 2011 11:33:00 GMT<p> <a href="http://www.flickr.com/photos/zawtowers/5983462805/" title="three at once"> <img src="http://farm7.static.flickr.com/6018/5983462805_e982a603bc_t.jpg" align="right" class="inline" /> </a> things seem to appear to me in threes. not sure why that is. usually because i almost always assume at least three possible solutions for any identified problem. an old habit. </p> <h4>the pledge</h4> <p> but there you are. i think in threes. and i've been thinking about this quite a bit lately. i've been inspired by several events in the last few weeks (three weeks maybe[grin]?). the most notable of these is last weekend's <a href="http://restfest.org" title="RESTFest 2011">RESTFest 2011</a> event in Greenville, SC. we spent q good portion of the weekend hacking hypermedia using my <a href="http://amundsen.com/hypermedia/profiles/" title="ALPS - Application-Level Profile Semantics">ALPS</a> Microblog experiment as a starting point. i learned several cool things. i think some other folks did, too. </p> <h4>the turn</h4> <p> one of the things that i got out of the weekend was a clarified understanding of the co-operative roles that play out in a hypermedia system when it is implemented over a distributed network. in our case, we were using the <a href="http://en.wikipedia.org/wiki/World_Wide_Web">Web</a>, <a href="http://www.w3.org/Protocols/rfc2616/rfc2616.html">HTTP</a>, <a href="http://www.w3.org/TR/xhtml1/">XHTML</a>, and <a href="http://amundsen.com/hypermedia/profiles/#semantics">some specs</a> for a microblog problem domain. the task was to build servers and clients that implement the spec and work both indepedently and in concert. IOW, loosely-coupled hypermedia clients and server, built independently, that achieve high interoperability. </p> <p> believe me - it was cool! </p> <p> along the way i discovered my experimental spec was lacking in some important ways. i won't go into the details here except to say that, in the end, i'd made the mistake of conflating app-level semantics w/ message-level semantics. the result of this kind of (common) mistake is often reduced interoperability. lucky for me, i had several very smart folks helping me find these problems and minimize their impact. </p> <p> so smart, BTW, that i'm pretty sure some of them will end up w/ their names on the revised ALPS spec soon. </p> <h4>the prestige</h4> <p> see, my problem was mixing levels of abstraction in my implementation of the spec. but i get a bit ahead. first, the three levels of abstraction that have occupied my mind of late: </p> <ol> <li>protocol (HTTP, FTP, etc.)</li> <li>message (HTML, Atom, etc.)</li> <li>domain (microblogging, accounting, etc.)</li> </ol> <p> i've spent the last year or so focusing on identifying the relationship between the <i>protocol</i> abstraction and the <i>message</i> abstraction. i've done this by analyzing various existing media types; developing a set of <a href="http://amundsen.com/hypermedia/hfactor/">H-Factors</a> common to all message formats that want to express protocol-level features via hypermedia controls. </p> <p> the next logical step is to analyze existing hypermedia implementations to locate and identify the general principles for expressing <i>domain</i> information within a hypermedia message. that's what the ALPS experiment is about. my problem was i mixed message semantics (layout and relationship of markup elements) with domain semantics (what data is required and how it should appear). it took just a couple client implementations right there on site to point out my short-comings. and i was most grateful. </p> <p> because that's how i learned about my <a href="http://www.freepatentsonline.com/article/ETC-Review-General-Semantics/138483273.html">errors in abstraction</a> for this particular set of circumstances. </p> <p> i have a pretty good feel for the <i>protocol</i>-<i>message</i> interactions. IOW, i feel confident that i can suffciently express any <i>protocol</i> details within a <i>message</i> design (i.e. a MIME Media Type). now it's time to ramp up my thinking on the <i>message</i>-<i>domain</i> interactions. once that happens, i'll be looking to express the <i>domain</i> in a way that works for any <i>message</i> format. and that will pave the way for a clear abstraction of <i>protocol</i>, <i>message</i>, and <i>domain</i>. and that will lead, i think, to much better analysis and tooling; eventually to better developer experience during implementation, too. </p> <p> believe me - it will be cool! </p>