<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>brettdargan.com &#187; design</title>
	<atom:link href="http://brettdargan.com/blog/category/design/feed/" rel="self" type="application/rss+xml" />
	<link>http://brettdargan.com/blog</link>
	<description>Thoughts and rants</description>
	<lastBuildDate>Fri, 28 May 2010 01:35:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Ode of an Architect &#8211; The Journey</title>
		<link>http://brettdargan.com/blog/2009/05/27/ode-of-an-architect-the-journey/</link>
		<comments>http://brettdargan.com/blog/2009/05/27/ode-of-an-architect-the-journey/#comments</comments>
		<pubDate>Wed, 27 May 2009 03:22:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[design]]></category>

		<guid isPermaLink="false">http://brettdargan.com/blog/?p=440</guid>
		<description><![CDATA[It starts with self
while (alive == TRUE) mind.get(random(thoughts))
Thy subconscious is a fiesty, unpredictable partner
There are no original thoughts
Designs of economy and elegance
Are reluctantly released
Complexity will be contained
Clarity will come in time
I imbue visions and ideas
One team or one deliverable at a time
The journey is long and difficult
The rewards are many
Success made possible
By conveying understanding
Persistence and [...]]]></description>
			<content:encoded><![CDATA[<p>It starts with self<br />
while (alive == TRUE) mind.get(random(thoughts))<br />
Thy subconscious is a fiesty, unpredictable partner<br />
There are no original thoughts<br />
Designs of economy and elegance<br />
Are reluctantly released<br />
Complexity will be contained<br />
Clarity will come in time</p>
<p>I imbue visions and ideas<br />
One team or one deliverable at a time<br />
The journey is long and difficult<br />
The rewards are many</p>
<p>Success made possible<br />
By conveying understanding<br />
Persistence and boldness<br />
My allies include Clarity; reason and spikes</p>
<p>Reality intervenes<br />
Tradeoffs will be forged<br />
Intentional not accidental<br />
The team understand the goal<br />
Where we can take things next time</p>
<p>Helping others learn<br />
Challenge and stimulate me<br />
Together we light paths forward<br />
Casting aside<br />
Perceived constraints of the mind</p>
<p>Continuous improvements we make<br />
Eliminating waste as we go<br />
Alien to the unenlightened<br />
Liberating to the energetic few</p>
<p>Mistakes and conflicts will occur<br />
Choose battles and timing<br />
Many opportunities to learn<br />
Sometimes the master<br />
Always a student<br />
My appetite for learning<br />
Grows with time</p>
<p>Custodians of the future<br />
Expand your mind<br />
Use many lenses<br />
Choose your journey<br />
Evolve your systems<br />
Deliver value with vigour<br />
Take action now</p>
<p> - Brett Dargan</p>
<p>Not sure where this came from, I had a slighly poetic moment, not in the rhyming sense <img src='http://brettdargan.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Ode+of+an+Architect+%E2%80%93+The+Journey+http://d4xe3.th8.us" title="Post to Twitter"><img class="nothumb" src="http://brettdargan.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter-big2.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/home/?status=Ode+of+an+Architect+%E2%80%93+The+Journey+http://d4xe3.th8.us" title="Post to Twitter">Tweet This Post</a></p>]]></content:encoded>
			<wfw:commentRss>http://brettdargan.com/blog/2009/05/27/ode-of-an-architect-the-journey/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JAOO 2009 &#8211; Brisbane</title>
		<link>http://brettdargan.com/blog/2009/05/19/jaoo-2009-brisbane/</link>
		<comments>http://brettdargan.com/blog/2009/05/19/jaoo-2009-brisbane/#comments</comments>
		<pubDate>Mon, 18 May 2009 14:12:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Stability, Performance and Monitoring]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[design]]></category>

		<guid isPermaLink="false">http://brettdargan.com/blog/?p=380</guid>
		<description><![CDATA[




Another good event, great speakers, lots of language talks, agile, architecture, scalability, databases ala megastore.
highlights for me, in no particular order.


Avi Bryant's new project, great eye candy had the crowd go &#34;ooooooooohhh&#34;.  When will an api be open to plug other data in???

Also nice talk on VM history, how we are working on VMs [...]]]></description>
			<content:encoded><![CDATA[
<div class="document">


<!-- -*- mode: rst -*- -->
<p>Another good event, great speakers, lots of language talks, agile, architecture, scalability, databases ala megastore.
highlights for me, in no particular order.</p>
<ul>
<li><dl class="first docutils">
<dt><a class="reference external" href="http://jaoo.com.au/brisbane-2009/speaker/Avi+Bryant">Avi Bryant's</a> new project, great eye candy had the crowd go &quot;ooooooooohhh&quot;.  When will an api be open to plug other data in???</dt>
<dd><ul class="first last simple">
<li>Also nice talk on VM history, how we are working on VMs from algo's designed in the 80's. And the features or standard of VMs aren't available for all our favourite languages.</li>
</ul>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt><a class="reference external" href="http://jaoo.com.au/brisbane-2009/speaker/Jon+Tirsen">Tiersen</a> , good intro to sharding and google approach to scaling out</dt>
<dd><ul class="first last simple">
<li>liked the probability graphs</li>
<li>read chubby, logserve paper</li>
<li>higher level of jonas discussion, but jonas did refer to tiersen counter example</li>
<li>When the web came along, our apps were read mostly.</li>
<li>These days, social sites, are moving away from this scheme, to one of shared data. Some of that shared data is written to a lot. but it is updated, the majority of it is always inserts only.</li>
<li>write fan outs.</li>
<li>combine the two operations in one, so write + read all counters at same time</li>
<li>counter example too simple, can bypass optimistic locking as counter should be monotonically increasing</li>
<li>combine websites with fragments of data/entities with different shards and shard policies.</li>
</ul>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt><a class="reference external" href="http://jaoo.com.au/brisbane-2009/speaker/Jonas+S+Karlsson">Jonas</a> - great talk re Megastore</dt>
<dd><ul class="first last simple">
<li>Treat everything as an insert, duplicates will occur make sure they are idempotent</li>
<li>Updates are a little harder, but what is an update really, when can you say it is actually done?</li>
<li>Confirmed for me that a current strategy i'm implementing is right and will work (well for two, maybe three nodes anyway).</li>
<li>To get to more will need a decent <a class="reference external" href="http://en.wikipedia.org/wiki/Paxos_algorithm">Paxos implementation</a>, which takes smart ppl and time.</li>
<li>consistency, availability, entity groups and big table</li>
<li>web apps more read/write than before, lots of shared data, but mostly additions</li>
<li>consistency, reliability, storage, scalability and megastore scale, entity groups, transactionality, avoiding joins</li>
<li>consistency: user trust, none, eventual, entity group, global</li>
<li><strong>consistency: &quot;a harmonious uniformity of agreement among things or parts&quot;</strong></li>
<li>Sharding by entity groups.</li>
<li>storage vs. cost of loss</li>
<li>paxos vs. 2pc</li>
<li>papers jonas recommended: pat helland paper; jinquan dai, intel, james hamilton, MS</li>
<li>I have a lot more to say about this topic, as I cut my teeth on Oracle Performance Tuning and it's architecture, always providing a READ CONSISTENT transaction at a minimum, I use to think was a great idea, until I wanted to scale it further.</li>
<li>Disk Reads are about 10,000 slower than memory access, but not if you have to manage a lot of versions of different blocks in memroy. The overheads reduce the read in memory to <strong>ONLY 10 to 100 times faster than a disk read</strong>. That just isn't enough. See <a class="reference external" href="http://www.hotsos.com/e-library/abstract.php?id=7">Milsap papers on Oracle scaling</a>  there are a number of them and <a class="reference external" href="http://www.scaleabilities.co.uk/book/scalingOracle8i.pdf">James Morle's book on Scaling Oracle 8i which is a great book, the older print version can still be picked up as well</a></li>
<li>The approach of one single db instance creates new problems, now we need transaction logs and a hot standby and a DR data centre...</li>
</ul>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt><a class="reference external" href="http://jaoo.com.au/brisbane-2009/speaker/Michael+T.+Nygard">Nygard</a> (<a class="reference external" href="http://www.amazon.com/Release-Production-Ready-Software-Pragmatic-Programmers/dp/0978739213/ref=sr_1_1?ie=UTF8&amp;#038;s=books&amp;#038;qid=1242652387&amp;#038;sr=1-1">Release It!</a> )- i missed the first one due to a conflict &lt;img src='<a class="reference external" href="http://brettdargan.com/blog/wp-includes/images/smilies/icon_sad.gif">http://brettdargan.com/blog/wp-includes/images/smilies/icon_sad.gif</a>' alt=':(' class='wp-smiley' /&gt; .</dt>
<dd><ul class="first last simple">
<li>Great stuff from what i hear, I've been pushing for some time implementation of his patterns.</li>
<li>motivated a number of devs at my company. Hopefully I'll see some badly behaving webservices and stability pattern implementations.</li>
<li>Here is a <a class="reference external" href="http://brettdargan.com/blog/2007/12/15/experimental-circuit-breaker-pattern-implementation/">simple Java Circuit Breaker Pattern Implementation from a ways back</a>.</li>
</ul>
</dd>
</dl>
</li>
<li><p class="first">mike cannon-brookes - had to fill a tough set of constraints, but interesting story about atlassian.</p>
</li>
<li><dl class="first docutils">
<dt><a class="reference external" href="http://jaoo.com.au/brisbane-2009/speaker/Clemens+Szyperski">Clemens</a></dt>
<dd><ul class="first last simple">
<li>ms unified component thingy. simliar to osgi. Nice talk about issues with design,  component composition and how all of IT boils down to composition of things at varying levels.</li>
<li>Discussion about component composition and how <strong>state is always a problem</strong>, yes.</li>
<li>Advocate of service use, <strong>not reuse</strong> as it should be used <strong>&quot;as is&quot;</strong></li>
<li>I prefer service use over code/component, especially with a services developed with RESTful intentions</li>
</ul>
</dd>
</dl>
</li>
<li><p class="first"><a class="reference external" href="http://dannorth.net">Dan North</a>, telling project war stories based on experience and
* observations of good architects
* soa gone bad, wsdl</p>
<ul class="simple">
<li>Listen, Listen, Listen</li>
<li>technical problems aren't the biggest issue, silo communication</li>
<li>replacement of tools sqlserver to oracle, not solving the real problem</li>
<li>the nameless quality</li>
<li>vision, inspiration, enabler</li>
<li>project shaman</li>
<li>empathise</li>
<li>self belief, a sense of conviction and humility</li>
</ul>
</li>
<li><dl class="first docutils">
<dt>Joshua Bloch - great stuff</dt>
<dd><ul class="first last simple">
<li>checkout <a class="reference external" href="http://google-collections.googlecode.com/svn/trunk/javadoc/com/google/common/collect/MapMaker.html">MapMaker</a></li>
</ul>
</dd>
</dl>
</li>
<li><p class="first">Eastman - apache mahut. Dirichlet clustering, hmm, that algorithm wasn't in <a class="reference external" href="http://www.amazon.com/Programming-Collective-Intelligence-Building-Applications/dp/0596529325/ref=sr_1_1?ie=UTF8&amp;#038;s=books&amp;#038;qid=1242654567&amp;#038;sr=1-1">Collective Intelligence</a></p>
</li>
<li><dl class="first docutils">
<dt>Douglas Crockford</dt>
<dd><ul class="first last simple">
<li>javascript inspired by self, scheme, perl and java</li>
<li>prefer === over == doesn't do type coercion</li>
<li>he no longer uses ++ and -- anymore, implicated in buffer overflow exploits</li>
<li>lambda, dyn objs, loose typing and object literals.</li>
<li>refreshing to discuss languages and language features again</li>
<li>the <a class="reference external" href="http://www.nczonline.net/blog/2009/01/27/speed-up-your-javascript-part-3/">memoizer example was good</a>, check the slides for recursion usage</li>
<li>use functions to make objects</li>
<li>functional inheritance</li>
<li>be rigorous and  use jslint</li>
</ul>
</dd>
</dl>
</li>
</ul>
<div class="section" id="other-comments">
<h3>Other Comments;</h3>
<blockquote>
<ul class="simple">
<li>Lots of cloud talks, <strong>very fluffy</strong>, but where was the discussion about <a class="reference external" href="http://kenai.com/projects/suncloudapis/pages/Home">SUN Cloud RESTful API</a></li>
<li>No REST, no erlang.</li>
</ul>
</blockquote>
</div>
<div class="section" id="books-to-checkout">
<h3>Books to checkout:</h3>
<blockquote>
<ul class="simple">
<li>Douglas Crockford, recommends <a class="reference external" href="http://www.amazon.com/JavaScript-Good-Parts-Douglas-Crockford/dp/0596517742/ref=sr_1_1?ie=UTF8&amp;#038;s=books&amp;#038;qid=1242693117&amp;#038;sr=8-1">JavascriptTheGoodParts</a></li>
<li>Steve Hayes, recommends <a class="reference external" href="http://www.amazon.com/Brain-Rules-Principles-Surviving-Thriving/dp/0979777747/ref=sr_1_1?ie=UTF8&amp;#038;s=books&amp;#038;qid=1242652608&amp;#038;sr=1-1">BrainRules</a></li>
<li>Linda Rising, recommends <a class="reference external" href="http://www.amazon.com/Strangers-Ourselves-Discovering-Adaptive-Unconscious/dp/0674013824/ref=sr_1_1?ie=UTF8&amp;#038;s=books&amp;#038;qid=1242652693&amp;#038;sr=1-1">StrangersToOurselves</a> by Timothy Wilson</li>
<li>Dan North, recommends <a class="reference external" href="http://www.amazon.com/Timeless-Way-Building-Christopher-Alexander/dp/0195024028/ref=sr_1_1?ie=UTF8&amp;#038;s=books&amp;#038;qid=1242652771&amp;#038;sr=1-1">TimelessWayOfBuilding</a>, yah, i have flicked through it, may borrow from a library or amazon, cause i haven't seen it in oz on a shelf for less than $140.</li>
</ul>
</blockquote>
</div>
</div>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=JAOO+2009+%E2%80%93+Brisbane+http://7cmwo.th8.us" title="Post to Twitter"><img class="nothumb" src="http://brettdargan.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter-big2.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/home/?status=JAOO+2009+%E2%80%93+Brisbane+http://7cmwo.th8.us" title="Post to Twitter">Tweet This Post</a></p>]]></content:encoded>
			<wfw:commentRss>http://brettdargan.com/blog/2009/05/19/jaoo-2009-brisbane/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RIMVR and HATEOAS: MVC+URITemplateAspects, LinkAwareModels and LinkTemplateProcessors</title>
		<link>http://brettdargan.com/blog/2009/04/29/rimvr/</link>
		<comments>http://brettdargan.com/blog/2009/04/29/rimvr/#comments</comments>
		<pubDate>Wed, 29 Apr 2009 12:24:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Patterns]]></category>
		<category><![CDATA[RESTful]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[rest]]></category>

		<guid isPermaLink="false">http://brettdargan.com/blog/?p=337</guid>
		<description><![CDATA[There has been a discussion titled [Jersey] Putting the RESTful "connectedness" around my existing Domain objects on the jersey mailing list that is starting up again.
I don't think I have confused HATEOAS with "connectedness", I have a reasonable understanding of resource state, application state and HATEOAS.
See http://www.stucharlton.com/blog/archives/000141.html and this discussion, http://tech.dir.groups.yahoo.com/group/rest-discuss/message/12497, which I see you [...]]]></description>
			<content:encoded><![CDATA[<p>There has been a discussion titled <a href="https://jersey.dev.java.net/servlets/ReadMsg?list=users&#038;msgNo=5657">[Jersey] Putting the RESTful "connectedness" around my existing Domain objects</a> on the jersey mailing list that is starting up again.</p>
<p>I don't think I have confused HATEOAS with "connectedness", I have a reasonable understanding of resource state, application state and HATEOAS.</p>
<p>See <a href="http://www.stucharlton.com/blog/archives/000141.html">http://www.stucharlton.com/blog/archives/000141.html</a> and this discussion, <a href="http://tech.dir.groups.yahoo.com/group/rest-discuss/message/12497">http://tech.dir.groups.yahoo.com/group/rest-discuss/message/12497</a>, which I see you have contributed to.</p>
<p>I think this final point made by <a href="http://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven">Roy</a> is pretty applicable here:</p>
<blockquote><p>
A REST API should be entered with no prior knowledge beyond the initial URI (bookmark) and set of standardized media types that are appropriate for the intended audience (i.e., expected to be understood by any client that might use the API). From that point on, <b>all application state transitions must be driven by client selection of server-provided choices that are present in the received representations or implied by the user’s manipulation of those representations</b>. The transitions may be determined (or limited by) the client’s knowledge of media types and resource communication mechanisms, both of which may be improved on-the-fly (e.g., code-on-demand). [Failure here implies that out-of-band information is driving interaction instead of hypertext.]
</p></blockquote>
<p><b>My point is you can't adhere to the HATEOAS constraint, without providing links between resources</b> so the server can guide the client to other application states.</p>
<p>I agree that forms are a better example for explaining state transitions, especially since resource state is likely to be changed by providing forms (as will the User Agent, as Roy mentions); or equivalent form templates/prototypes for other media types.<br />
But to me providing forms or equivalents for other media types is a different and easier problem to solve.</p>
<p>I'm very interested in <b>how to evolve existing systems</b>; I want to leverage the <b>vast islands of information</b> that already exist. </p>
<p>I just want to do it in an elegant way from a <b>code</b> and a <b>web perspective</b>, including the fact that uri's shouldn't change.<br />
<div id="attachment_338" class="wp-caption alignleft" style="width: 310px"><a href="http://brettdargan.com/blog/wp-content/uploads/2009/04/hateoas_4_legacy.jpg"><img src="http://brettdargan.com/blog/wp-content/uploads/2009/04/hateoas_4_legacy-300x225.jpg" alt="RIMVR: MVC + URITemplateAspects; LinkAwareModels and LinkTemplateProcessor" title="hateoas_4_legacy" width="300" height="225" class="size-medium wp-image-338" /></a><p class="wp-caption-text">URITemplateAspects; LinkAwareModels and LinkTemplateProcessor</p></div></p>
<p>In a standard, layered design, you would have these components (see <a href="http://brettdargan.com/blog/wp-content/uploads/2009/04/hateoas_4_legacy-300x225.jpg">Image</a>):</p>
<p>1. Code-On-Demand<br />
2. View<br />
3. Controller<br />
4-6. Contains the Proposed Abstractions<br />
7. Model<br />
8. Persistent Store - Db; file; jcr; webdav<br />
9. Proxies</p>
<p>Here are some options I have for adding links around some existing system (there are likely more)</p>
<p>Due to the time constraints, the Pros, will be sparse.</p>
<h3>Option 1: Add Links via Code-On-Demand.</h3>
<p>Add links to my html page via javascript.<br />
I could take my existing html representation and use dhtml to add links.</p>
<p>Cons:<br />
* code-on-demand not available for all user agents or may be disabled<br />
* Proxies can't cache the entire representation<br />
* leak of possible application states to clients that don't need to know<br />
* Detailed knowledge of resource and subresources required to provide "link rich" representations<br />
* Alternative media types may require alternative languages or structure to perform add the links. ie. use of xsl for xml; javascript with svg.</p>
<h3>Option 2: Add Links via Views</h3>
<p>Cons:<br />
* We all know this is bad<br />
* Detailed knowledge of resource and subresources required to provide "link rich" representations<br />
* different views/media types require the same logic and detailed knowledge of the model<br />
* different views/media types may require some application state knowledge. an admin user may have other links than anon.</p>
<h3>Option 3: Add Links via Controllers</h3>
<p>Pros:<br />
* Can handle the inclusion/exclusion of links depending on the current application state, regardless of the media type to respond with </p>
<p>Cons:<br />
* Detailed knowledge of resource and subresources required to provide "link rich" representations</p>
<h3>Option 4: Add Links via Models</h3>
<p>Pros:<br />
* Detailed knowledge of the model and related models belong in the Model</p>
<p>Cons:<br />
* Detailed knowledge of resource links aren't the domain of the models<br />
* Not all possible related models are likely to be represented; to balance performance with types of usage, often some relationships are not modelled, so as to not eager load, very large graphs etc.<br />
* Links are very static, The "next available" application state, still needs to be determined in another layer, like Controller</p>
<h3>Option 5: Add Links via Persistent Store</h3>
<p>Store partial links in the db </p>
<p>Pros:<br />
* Db driven, easy to update<br />
* Tables have relationships<br />
* easy adoption path<br />
* easy to link to external resources, or resources outside your db schema<br />
* easy to share links at db level, if several systems integrate at that level<br />
* Good for sparse relationships. </p>
<p>Cons:<br />
* Update to change a link, will not play nice with intermediaries nor "cool uris, that don't change"<br />
* Not great for <b>consistent dense relationships</b>, you probably want to model that differently. So with a Parent Child relationship, you wouldn't want something in addition to existing foreign key relations, to redundantly specify that to get to the children of a parent you have a list of /child/xyz links. but by having that specified in the URITemplateAspect then you are managing that once, close to the data.<br />
* Relationships are not always defined in Foreign Keys<br />
* Links are very static, The "next available" application state, still needs to be determined in another layer, like Controller<br />
* Only a partial solution for more dynamic aspect of determining what application states make sense, still needs to be done in another layer.<br />
* May be invasive, links stored in columns or other tables, no good if you've got a locked down schema.</p>
<h3>Thoughts</h3>
<p>Models shouldn't have relationships to hardcoded resources, like "/resource/50", but they could have a semantic relationship to "/resource/{id}" or "/resource/{id};role={role}" under certain conditions.</p>
<p>There is a place for such LinkAwareModels (Component no. 5), as long as the links are isolated and only contain semantic relationships, they are not urls.</p>
<p>The Links from Models to Resources are isolated and encapsulated within its own abstraction; which gives us component no. 6 URITemplateAspects (maybe just simplify this to LinkTemplateAspect).</p>
<p>Possible "Application States" are dependent on the request, even though a request must be STATELESS, possible "Application States" may still be determined by the security access; restrictions of media-types or client, which should all be part of the request. If you do stuff with user roles, then make sure you encode within your url.</p>
<p>Component no. 4 is our LinkTemplateProcessor(s) and its responsibility is to evaluate URITemplates within the LinkAwareModels/entities and to determine appropriate state transitions based on the request.</p>
<p>This leads us to the final Option ( well, for this post <img src='http://brettdargan.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  )</p>
<h3>Option 6: Semantic relationships of a "Model to resources" definied via URITemplateAspect and a LinkTemplateProcessor to evaluate the relationships (URITemplates) and sub-entities to determine other "application states"</h3>
<p>Pros:<br />
* Detailed knowledge of the model and related models belong in the Model<br />
* Detailed knowledge of the model to resource of interest is a concern isolated in the URITemplateAspects<br />
* Any possible relationships to other resources can be defined<br />
* Links are very dynamic. The possible state transitions can be determined by the LinkTemplateProcessor, but it can do so decoupled from the detailed relationships of the model to other resources. </p>
<p>The semantic relationships that are defined in the LinkAwareModels, can include uri and other attributes, like rel. The LinkTemplateProcessor can evaluate a lot of the current application state (but not all as the User Agent may have representations from other servers or representations that have been modified by Code-On-Demand) in combination with the semantic relationship to determine the ultimate value of the link to use (relative preferred, of course) and it can determine if that link is a valid state transition. Only if you are an admin do you see this link; or the link retains the current media-type used for this request; so a request for /country/AU.html includes links to cities.html, not just cities. The default negotiation might be something if that is not specified.</p>
<p>* The Processor can operate on objects, prior to rendering to a particular media-type, so if you have a single object model that can render to multiple media-types, you could have less code</p>
<h3>Conclusion</h3>
<p>What do you call, this, maybe Rich Interconnected Model View Resource RIMVR.<br />
Rich in relation to having deep links within a resource representation and from the applicability of those links. That actual uri templates are evaluated late and with some context of the request and application state.</p>
<p>The use of these abstractions, <b>in no way make an application RESTful, that is up to the developers</b>, but hopefully by following some abstractions, like these we will get some clean code and some better understanding of RESTful APIs.</p>
<p><a href="http://brettdargan.com/blog/2009/01/14/hateoas-for-legacy-object-models/">I have some old code, to show this working.</a><br />
One day I'll get a chance to clarify terms and simplify the code <img src='http://brettdargan.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=RIMVR+and+HATEOAS%3A+MVC%2BURITemplateAspects%2C+LinkAwareModels+and+LinkTemplateProcessors+http://3z75n.th8.us" title="Post to Twitter"><img class="nothumb" src="http://brettdargan.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter-big2.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/home/?status=RIMVR+and+HATEOAS%3A+MVC%2BURITemplateAspects%2C+LinkAwareModels+and+LinkTemplateProcessors+http://3z75n.th8.us" title="Post to Twitter">Tweet This Post</a></p>]]></content:encoded>
			<wfw:commentRss>http://brettdargan.com/blog/2009/04/29/rimvr/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some comments on 101 Things I Learned in Architecture School</title>
		<link>http://brettdargan.com/blog/2009/03/18/some-comments-on-101-things-i-learned-in-architecture-school/</link>
		<comments>http://brettdargan.com/blog/2009/03/18/some-comments-on-101-things-i-learned-in-architecture-school/#comments</comments>
		<pubDate>Wed, 18 Mar 2009 11:13:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[design]]></category>

		<guid isPermaLink="false">http://brettdargan.com/blog/?p=302</guid>
		<description><![CDATA[
Some comments about a standard "architecture" book   of one pager pearls of wisdom.

There is not much too this book, then again, "less is more" .

#21 - An Architect knows something about everthing. An engineer knows everything about one thing.
"An architect is a generalist, not a specialist. "
This is consistent with becoming a Generalising [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.amazon.com/101-Things-Learned-Architecture-School/dp/0262062666/ref=pd_bbs_sr_1?ie=UTF8&#038;s=books&#038;qid=1237372773&#038;sr=8-1"><img src="http://brettdargan.com/blog/wp-content/uploads/2009/03/101thingsilearnedinarchitectureschool1-300x216.jpg" alt="101 Things I Learnedin Architecture School" title="101 Things I Learnedin Architecture School" width="300" height="216" class="alignleft size-medium wp-image-321" /></a></p>
<p>Some comments about a standard <a href="http://www.amazon.com/101-Things-Learned-Architecture-School/dp/0262062666/ref=pd_bbs_sr_1?ie=UTF8&#038;s=books&#038;qid=1237372773&#038;sr=8-1">"architecture" book </a>  of one pager pearls of wisdom.<br />
<br />
There is not much too this book, then again, "less is more" .
</p>
<h3>#21 - An Architect knows something about everthing. An engineer knows everything about one thing.</h3>
<blockquote><p>"An architect is a generalist, not a specialist. "</p></blockquote>
<p>This is consistent with becoming a <a href="http://www.codinghorror.com/blog/archives/000711.html">Generalising specialist</a>. </p>
<h3>#29 Being process-oriented, not product-driven, is the most important and difficult skill for a designer to develop.</h3>
<p>I take "process-oriented" in this context to mean improving your own processes and not the general interpretation of burdensome processes.</p>
<p>Pragmatically this "process-orientated" statment is about focusing on the process of design and improving those skills, in place of speed of product development. </p>
<p>Another aspect on this is balancing learning efficiency with task efficiency, which <a href="http://jchyip.blogspot.com/">Jason Yip</a> mentioned in a recent presentation.</p>
<p>Tip #29 has nine sub points, here are a few of my favourites:</p>
<ul>
<li>seeking to understand a design problem before chasing after solutions;</li>
<li>making design investigations and <b>decisions holistically</b> </li>
<li>working <b>fluidly between concept-scale and detail-scale</b></li>
<li>making <b>design decisions conditionally</b> - that is, with the awareness that they may or may not work out as you continue toward a final solution; See also <a href="http://brettdargan.com/blog/2009/01/08/considerations-in-communicating-the-intent-of-software-design/">"Considerations in communicating the Intent of Design"</a>.
</li>
<li>Knowing when to change and when to stick with previous decisions</li>
<li>Always asking "What If...?" regardless of how satisfied you are with your solutions.</li>
</ul>
<h3>#45 Three Levels of knowing</h3>
<dl>
<dt><b>Simplicity</b></dt>
<dd>world view of the child or uninformed adult.</dd>
<dt><b>Complexity</b></dt>
<dd>the ordinary adult world view. An <b>awareness of complex systems</b> in nature and society but an <b>inability to discern clarifying patterns</b> and connections.</dd>
<dt><b>Informed Simplicity</b></dt>
<dd>an enlightened view of reality. It is founded upon an <b>ability to discern or create clarifying patterns within complex mixtures</b>. Pattern recognition is a crucial skill for an architect, who must create a highly ordered building <b>amid many competing and frequently nebulous design considerations</b>.</dd>
</dl>
<h3>#16/26 - Parti and Changing Parti</h3>
<blockquote><p>
"Parti derives from understandings that are nonarchitectural and must be cultivated before architectural form can be born."
</p></blockquote>
<p>Parti has been in "architecture" for a long time, it also gets mentioned in <a href="http://http://www.uxlondon.com/programme/2009-06-15/luke/">ux articles</a>.</p>
<p>At its most ambitious, parti derives from matters more transcendent than mere archtiecture. </p>
<p>I like the abstract notions behind it.</p>
<h3>#48 If you can't explain your ideas to your grandmother in terms that she understands, you don't know your subject well enough.</h3>
<blockquote><p>
"Some architects, instructors, and students use overly complex (and often meaningless!) language in an attempt to gain recognition and respect.<br />
Try not to let them get away with it and whatever you do don't imitate them."
</p></blockquote>
<p>When this happens to you, be critical, instead o <a href="http://www.amazon.com/Style-Ten-Lessons-Clarity-Grace/">blind obedience, practice selective observerance</a></p>
<p>When you are accused of this, take the time to try and draw a picture or explain it in whatever form suits you best.</p>
<h3>#51 Beauty is due more to harmonious relationships amount the elements of a composition than to the elements themselves</h3>
<blockquote><p>"Build a car out of the most beautiful features of teh most stunning cars ever made. See if your friends will be seen in it with you."
</p></blockquote>
<h3>#78 "The success of the masterpieces seems to lie not so much in their freedom from faults - indeed we tolerate the grossest errors in them all - but in the immense persuasiveness of a mind which has completely mastered its perspective." </h3>
<p>Virginia Woolf.</p>
<h3>#98 The Chinese symbol for crisis is comprised of two characters: one indicating 'danger', the other 'opportunity.'"</h3>
<p>Whille it sounds good, the interpretation is false, see: <a href="http://www.pinyin.info/chinese/crisis.html">pinyin.info</a> and <a href="http://en.wikipedia.org/wiki/Chinese_translation_of_crisis">wikipedia</a></p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Some+comments+on+101+Things+I+Learned+in+Architecture+School+http://ccipx.th8.us" title="Post to Twitter"><img class="nothumb" src="http://brettdargan.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter-big2.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/home/?status=Some+comments+on+101+Things+I+Learned+in+Architecture+School+http://ccipx.th8.us" title="Post to Twitter">Tweet This Post</a></p>]]></content:encoded>
			<wfw:commentRss>http://brettdargan.com/blog/2009/03/18/some-comments-on-101-things-i-learned-in-architecture-school/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>link and self; rel=&#8221;canonical&#8221; and rev=&#8221;canonical&#8221;</title>
		<link>http://brettdargan.com/blog/2009/01/22/link-and-self/</link>
		<comments>http://brettdargan.com/blog/2009/01/22/link-and-self/#comments</comments>
		<pubDate>Wed, 21 Jan 2009 23:26:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[RESTful]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[uri]]></category>

		<guid isPermaLink="false">http://brettdargan.com/blog/?p=285</guid>
		<description><![CDATA[




This is based on a cross post from http://www.innoq.com/blog/st/2009/01/link_and_self.html.
Subbu and &#60;Stefan Tilkov have been discussing URI  Equivalence, linking to self and Resource Identities, so here is my view.
Subbu's last remark asks the question

&#62;&#62;&#62;
On January 18, 2009 4:32 AM, Subbu Allamaraju said:
Here is a longer response that is longer than a comment &#60;img src='http://brettdargan.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' [...]]]></description>
			<content:encoded><![CDATA[
<div class="document">


<!-- -*- mode: rst -*- -->
<p>This is based on a cross post from <a class="reference external" href="http://www.innoq.com/blog/st/2009/01/link_and_self.html">http://www.innoq.com/blog/st/2009/01/link_and_self.html</a>.</p>
<p><a class="reference external" href="http://www.subbu.org/blog/2008/12/resource-identity-and-cool-uris">Subbu</a> and <a class="reference external" href="http://www.innoq.com/blog/st/2009/01/link_and_self.html">&lt;Stefan Tilkov</a> have been discussing URI  Equivalence, linking to self and Resource Identities, so here is my view.</p>
<p><a class="reference external" href="http://www.innoq.com/blog/st/2009/01/link_and_self.html#comment-1926">Subbu's last remark asks the question</a></p>
<pre class="doctest-block">
&gt;&gt;&gt;
On January 18, 2009 4:32 AM, Subbu Allamaraju said:
Here is a longer response that is longer than a comment &lt;img src='http://brettdargan.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /&gt;
</pre>
<p><a class="reference external" href="http://www.subbu.org/blog/2009/01/uris-vs-identifiers-take-two">http://www.subbu.org/blog/2009/01/uris-vs-identifiers-take-two</a></p>
<p>IMHO URI non-equivalence does not imply resource non-equivalence.
And if that is really important to your application there SHOULD be ways to handle it.</p>
<p>I agree with Stefan on providing a canonical resource.</p>
<p>You can argue both ways that person and person with address book are either two representations of a person resource, or two different resources, that is the great thing about the Web.</p>
<p>For this case in the atom self link what about using the &lt;b&gt;rev tag&lt;/b&gt; to identify the canonical resource that makes sense for your application.</p>
<p>Since rev also accepts space separated list of link-types you could mark it with both the type and the uri of the canonical resource.</p>
<!-- code-block: html -->
<p>&lt;link href=&quot;<a class="reference external" href="http://www.example.org/person/abc?include=addressBook">http://www.example.org/person/abc?include=addressBook</a>&quot; rel=&quot;self&quot; rev=&quot;canonical <a class="reference external" href="http://www.example.org/person/abc">http://www.example.org/person/abc</a>&quot;/&gt;</p>
<p>As to whether or not <strong>two different entities that returned from different URI</strong> are based on the <strong>same version of the canonical resource or not</strong>:</p>
<p>I would use an EntityTag that encoded some value of resource state and some value of the representation.
Eg. template for xhtml representation may change without resource state and the ETag must change in order to reflect that.</p>
<p>To KISS.</p>
<p>If you had an ETag consisted of something like <strong>&quot;resourceVersion=20,reprVersion={date}&quot;</strong>
Then your application could extract out the self links with <strong>identical rev tags</strong> and extract from the ETag the resourceVersion.</p>
</div>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=link+and+self%3B+rel%3D%E2%80%9Dcanonical%E2%80%9D+and+rev%3D%E2%80%9Dcanonical%E2%80%9D+http://zresm.th8.us" title="Post to Twitter"><img class="nothumb" src="http://brettdargan.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter-big2.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/home/?status=link+and+self%3B+rel%3D%E2%80%9Dcanonical%E2%80%9D+and+rev%3D%E2%80%9Dcanonical%E2%80%9D+http://zresm.th8.us" title="Post to Twitter">Tweet This Post</a></p>]]></content:encoded>
			<wfw:commentRss>http://brettdargan.com/blog/2009/01/22/link-and-self/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Keeping layers decoupled</title>
		<link>http://brettdargan.com/blog/2006/02/11/keeping-layers-decoupled/</link>
		<comments>http://brettdargan.com/blog/2006/02/11/keeping-layers-decoupled/#comments</comments>
		<pubDate>Fri, 10 Feb 2006 16:02:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[design]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://brettdargan.com/blog/?p=56</guid>
		<description><![CDATA[A while ago I wrote a unit test that used JDepend to help keep developers using a layered approach when using packages. Unfortunately devs worked out that by creating new packages they could work around that limitation instead of using IOC and avoiding circular dependencies.
So Tom mentioned the ant-contrib tasks, Compile With Walls and VerifyDesign. [...]]]></description>
			<content:encoded><![CDATA[<p>A while ago I wrote a unit test that used JDepend to help keep developers using a layered approach when using packages. Unfortunately devs worked out that by creating new packages they could work around that limitation instead of using IOC and avoiding circular dependencies.</p>
<p>So Tom mentioned the <a href="http://sourceforge.net/projects/ant-contrib">ant-contrib</a> tasks, Compile With Walls and VerifyDesign. </p>
<p>Compile with Walls is great, packages won't compile if layers are broken. It is marked as deprecated with Verify Design to replace it. </p>
<p>Verify Design works after compilation and can't detect the source code violations of constants imported from other packages.</p>
<p>Compile With Walls requires dependant packages to declare all dependencies and the dependencies of dependencies, which could get unwieldly, but still potentially useful. An option to not have to do that would be nice.</p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Keeping+layers+decoupled+http://kdhb7.th8.us" title="Post to Twitter"><img class="nothumb" src="http://brettdargan.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter-big2.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/home/?status=Keeping+layers+decoupled+http://kdhb7.th8.us" title="Post to Twitter">Tweet This Post</a></p>]]></content:encoded>
			<wfw:commentRss>http://brettdargan.com/blog/2006/02/11/keeping-layers-decoupled/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
