<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Design Characteristics of REST / Resource Oriented Server Frameworks and Clients</title>
	<atom:link href="http://blog.dhananjaynene.com/2009/06/design-characteristics-of-rest-resource-oriented-server-frameworks-and-clients/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.dhananjaynene.com/2009/06/design-characteristics-of-rest-resource-oriented-server-frameworks-and-clients/</link>
	<description>Dhananjay Nene's opinions on software programming, design, architecture and the internet</description>
	<lastBuildDate>Sun, 28 Feb 2010 03:58:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Musings on REST &#124; /var/log/mind</title>
		<link>http://blog.dhananjaynene.com/2009/06/design-characteristics-of-rest-resource-oriented-server-frameworks-and-clients/comment-page-1/#comment-8709</link>
		<dc:creator>Musings on REST &#124; /var/log/mind</dc:creator>
		<pubDate>Fri, 26 Jun 2009 17:29:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dhananjaynene.com/?p=690#comment-8709</guid>
		<description>[...] Design Characteristics of REST / Resource Oriented Server Frameworks and ClientsThis post dwells into the many aspects of design of a REST or Resource Oriented Serverside Framework and attempts to enumerate a large number of their characteristics. One of the aspects it brings up is the role of the Controller. Since the a resource oriented interface primarily consists of basic primitive operations on resources, it suggests that the controller could either be merged with the Resource or support only basic operations and have a one to one relationship with a resource. This is where a potential differences with conventional frameworks arise. If I was to think of it from an EJB like perspective, I would model a OrderController as a Session bean and a Order as an entity bean. In case of lightweight POJO based model, I would have an OrderController as the endpoint exposed by say using Struts and model the Order as a entity POJO and map it to the database using Hibernate. In other non java frameworks, I would have a class to represent an OrderController and another one to represent the order along ActiveRecord pattern. But I would argue this separation is not entirely necessary, since what we want is something that implements a single abstraction mapping onto a Resource which also support the primarily lifecycle methods or resource operations of GET, PUT, POST and DELETE. But there is an issue to be worked through here. These resource operations are actually class level and not object level methods. Thus if we have an abstraction to represent the resource instance, the class level methods cannot be defined in the same class except as class level (static) methods. This is a tricky problem, and I would submit the designer may make one of two choices (a) Implement the resource operations as class level methods on the Resource abstraction (ie. they will get or return the resource references as method parameters and not rely on the ‘this’ or ’self’ qualifier for getting access to the resource variables or (b) Implement the resource operations as methods on a separate one-to-one mapped class on the resource abstraction (eg. an OrderHome in case of an EJB like analogy) [...]</description>
		<content:encoded><![CDATA[<p>[...] Design Characteristics of REST / Resource Oriented Server Frameworks and ClientsThis post dwells into the many aspects of design of a REST or Resource Oriented Serverside Framework and attempts to enumerate a large number of their characteristics. One of the aspects it brings up is the role of the Controller. Since the a resource oriented interface primarily consists of basic primitive operations on resources, it suggests that the controller could either be merged with the Resource or support only basic operations and have a one to one relationship with a resource. This is where a potential differences with conventional frameworks arise. If I was to think of it from an EJB like perspective, I would model a OrderController as a Session bean and a Order as an entity bean. In case of lightweight POJO based model, I would have an OrderController as the endpoint exposed by say using Struts and model the Order as a entity POJO and map it to the database using Hibernate. In other non java frameworks, I would have a class to represent an OrderController and another one to represent the order along ActiveRecord pattern. But I would argue this separation is not entirely necessary, since what we want is something that implements a single abstraction mapping onto a Resource which also support the primarily lifecycle methods or resource operations of GET, PUT, POST and DELETE. But there is an issue to be worked through here. These resource operations are actually class level and not object level methods. Thus if we have an abstraction to represent the resource instance, the class level methods cannot be defined in the same class except as class level (static) methods. This is a tricky problem, and I would submit the designer may make one of two choices (a) Implement the resource operations as class level methods on the Resource abstraction (ie. they will get or return the resource references as method parameters and not rely on the ‘this’ or ’self’ qualifier for getting access to the resource variables or (b) Implement the resource operations as methods on a separate one-to-one mapped class on the resource abstraction (eg. an OrderHome in case of an EJB like analogy) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dhananjay Nene</title>
		<link>http://blog.dhananjaynene.com/2009/06/design-characteristics-of-rest-resource-oriented-server-frameworks-and-clients/comment-page-1/#comment-8116</link>
		<dc:creator>Dhananjay Nene</dc:creator>
		<pubDate>Wed, 10 Jun 2009 22:07:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dhananjaynene.com/?p=690#comment-8116</guid>
		<description>@Blacktiger

We&#039;re probably suggesting a similar solution but for slightly different reasons. Current frameworks especially those implementing the pure MVC model are based on exporting Services through the Controllers. To the extent the goal is to export services, Controllers probably are the right place for that functionality. However I would still buy your argument that the framework could automagically handle that stuff for you.

The slightly nuanced difference I intended to bring out is that in a Resource Oriented Framework, the Resource is the end point and the handler should have the logic. In such a situation the controller is not the right place for the functionality because the controller is not necessarily the most appropriate abstraction. 

Either way you look at it, it of course makes sense to have the framework implement as much of the boilerplate stuff for you as possible.</description>
		<content:encoded><![CDATA[<p>@Blacktiger</p>
<p>We&#8217;re probably suggesting a similar solution but for slightly different reasons. Current frameworks especially those implementing the pure MVC model are based on exporting Services through the Controllers. To the extent the goal is to export services, Controllers probably are the right place for that functionality. However I would still buy your argument that the framework could automagically handle that stuff for you.</p>
<p>The slightly nuanced difference I intended to bring out is that in a Resource Oriented Framework, the Resource is the end point and the handler should have the logic. In such a situation the controller is not the right place for the functionality because the controller is not necessarily the most appropriate abstraction. </p>
<p>Either way you look at it, it of course makes sense to have the framework implement as much of the boilerplate stuff for you as possible.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Blacktiger</title>
		<link>http://blog.dhananjaynene.com/2009/06/design-characteristics-of-rest-resource-oriented-server-frameworks-and-clients/comment-page-1/#comment-8114</link>
		<dc:creator>Blacktiger</dc:creator>
		<pubDate>Wed, 10 Jun 2009 21:31:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dhananjaynene.com/?p=690#comment-8114</guid>
		<description>I&#039;ve been thinking the exact same thing recently. Most web applications pretty much expose their models directly to the web front end, so why not have a framework that handles this stuff for you? It seems silly to have to hook up a bunch of controllers that do the same thing over and over.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve been thinking the exact same thing recently. Most web applications pretty much expose their models directly to the web front end, so why not have a framework that handles this stuff for you? It seems silly to have to hook up a bunch of controllers that do the same thing over and over.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.564 seconds -->
