<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Mapping response on client side</title>
	<atom:link href="http://bill.burkecentral.com/2010/02/19/mapping-response-on-client-side/feed/" rel="self" type="application/rss+xml" />
	<link>http://bill.burkecentral.com/2010/02/19/mapping-response-on-client-side/</link>
	<description>Software plumbing using middleware wrenches</description>
	<lastBuildDate>Thu, 09 Feb 2012 19:51:59 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Suresh Bhaskaran</title>
		<link>http://bill.burkecentral.com/2010/02/19/mapping-response-on-client-side/#comment-3701</link>
		<dc:creator><![CDATA[Suresh Bhaskaran]]></dc:creator>
		<pubDate>Wed, 07 Jul 2010 19:23:43 +0000</pubDate>
		<guid isPermaLink="false">http://bill.burkecentral.com/?p=343#comment-3701</guid>
		<description><![CDATA[Hi Bill:
 
I bought your book, &quot;Restful Java&quot; - it is an mazing resource! Thank you!

Got a question on one of the recent readings off of burkecentral.com
I was following some ideas for RestEasy clients on http://www.javauc.com/java/1432
 
Where is the following 2 annotations defined? Or, is it something one need to write thier own? I searched every maven repository - could not find any jars with those interfaces
 
@ResponseMapping
@ExpectedCode(int)
 
For example, in the following:
 
@ResponseMapping
@ExpectedCode(200)
public interface MyResponse {

   @Body   public Customer getCustomer();

   @LinkHeader   public Link getNext();

   @LinkHeader(&quot;last&quot;)   public Link getLastCustomer();

   @Header(&quot;ETag&quot;)   public String getHash();

}

-- 
Have a Nice Day!

Suresh Bhaskaran
Consulting IT Specialist
Home 
Work  
Cell    (310) 499 6211]]></description>
		<content:encoded><![CDATA[<p>Hi Bill:</p>
<p>I bought your book, &#8220;Restful Java&#8221; &#8211; it is an mazing resource! Thank you!</p>
<p>Got a question on one of the recent readings off of burkecentral.com<br />
I was following some ideas for RestEasy clients on <a href="http://www.javauc.com/java/1432" rel="nofollow">http://www.javauc.com/java/1432</a></p>
<p>Where is the following 2 annotations defined? Or, is it something one need to write thier own? I searched every maven repository &#8211; could not find any jars with those interfaces</p>
<p>@ResponseMapping<br />
@ExpectedCode(int)</p>
<p>For example, in the following:</p>
<p>@ResponseMapping<br />
@ExpectedCode(200)<br />
public interface MyResponse {</p>
<p>   @Body   public Customer getCustomer();</p>
<p>   @LinkHeader   public Link getNext();</p>
<p>   @LinkHeader(&#8220;last&#8221;)   public Link getLastCustomer();</p>
<p>   @Header(&#8220;ETag&#8221;)   public String getHash();</p>
<p>}</p>
<p>&#8211;<br />
Have a Nice Day!</p>
<p>Suresh Bhaskaran<br />
Consulting IT Specialist<br />
Home<br />
Work<br />
Cell    (310) 499 6211</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Links &#171; Beautiful Discovery</title>
		<link>http://bill.burkecentral.com/2010/02/19/mapping-response-on-client-side/#comment-3551</link>
		<dc:creator><![CDATA[Links &#171; Beautiful Discovery]]></dc:creator>
		<pubDate>Sun, 18 Apr 2010 21:41:29 +0000</pubDate>
		<guid isPermaLink="false">http://bill.burkecentral.com/?p=343#comment-3551</guid>
		<description><![CDATA[[...] Mapping response on client side Interesting discussion in the comments. For what it&#8217;s worth, I don&#8217;t particularly agree with either Bill or JJ. Bill&#8217;s code is a bit &#8230; procedural. Far too low level and brittle and way too many implementation details. On the other hand JJ&#8217;s &#8220;boil the ocean&#8221; scheme sounds a bit terrifying. [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Mapping response on client side Interesting discussion in the comments. For what it&#8217;s worth, I don&#8217;t particularly agree with either Bill or JJ. Bill&#8217;s code is a bit &#8230; procedural. Far too low level and brittle and way too many implementation details. On the other hand JJ&#8217;s &#8220;boil the ocean&#8221; scheme sounds a bit terrifying. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jean-Jacques Dubray</title>
		<link>http://bill.burkecentral.com/2010/02/19/mapping-response-on-client-side/#comment-3361</link>
		<dc:creator><![CDATA[Jean-Jacques Dubray]]></dc:creator>
		<pubDate>Tue, 23 Feb 2010 15:51:00 +0000</pubDate>
		<guid isPermaLink="false">http://bill.burkecentral.com/?p=343#comment-3361</guid>
		<description><![CDATA[&gt;&gt; it seems to me that BPM fits *VERY* well with REST

Bill, please, don&#039;t call jBPM &quot;BPM&quot;. Let&#039;s talk about Events, Resource lifecycles, Human Tasks and Organizations not to forget Assemblies or Contracts, then we&#039;ll talk about. 

&gt;&gt; why are people that have been developing middleware for decades (13 years for me) embracing REST?
I have already answered that question. REST is the perfect CORBA. It is the way CORBA should have been designed. It is the ideal &quot;distributed object&quot; technology. This is why you have no problem &quot;annotating&quot; OO. This is why you like it so much. Just take CORBA one feature at a time, map it to how REST works. You&#039;ll be stricken by the similarities.

People that have tried to develop middleware for 20-30 years should ask themselves whether it is sensitive to always reduce middleware to &quot;plumbing&quot; (ie boiler plate code that calls a method or procedure) or should there be a distributed programming model (in which OO does not fit of course) and where bi-directional interfaces, versioning, orchestrations and choreographies, assemblies... are key concepts. Then maybe then we will stop all these silly discussions. 

So, sorry Bill, I am not sure you really understand &quot;distributed programming models&quot; (I won&#039;t even talk about BPM) even though you might be a great &quot;middleware&quot; guy shoveling bits from A to B (B to A is a bit harder). There is value in what you are doing, but please, understand that it is only and will ever be &quot;distributed OO&quot;. This is what you have been doing for 15 years, and you will be doing 15 years from today. Your mind cannot shift from a monolithic programming model (a la OO) to a &quot;distributed programming model&quot;. 

JJ-]]></description>
		<content:encoded><![CDATA[<p>&gt;&gt; it seems to me that BPM fits *VERY* well with REST</p>
<p>Bill, please, don&#8217;t call jBPM &#8220;BPM&#8221;. Let&#8217;s talk about Events, Resource lifecycles, Human Tasks and Organizations not to forget Assemblies or Contracts, then we&#8217;ll talk about. </p>
<p>&gt;&gt; why are people that have been developing middleware for decades (13 years for me) embracing REST?<br />
I have already answered that question. REST is the perfect CORBA. It is the way CORBA should have been designed. It is the ideal &#8220;distributed object&#8221; technology. This is why you have no problem &#8220;annotating&#8221; OO. This is why you like it so much. Just take CORBA one feature at a time, map it to how REST works. You&#8217;ll be stricken by the similarities.</p>
<p>People that have tried to develop middleware for 20-30 years should ask themselves whether it is sensitive to always reduce middleware to &#8220;plumbing&#8221; (ie boiler plate code that calls a method or procedure) or should there be a distributed programming model (in which OO does not fit of course) and where bi-directional interfaces, versioning, orchestrations and choreographies, assemblies&#8230; are key concepts. Then maybe then we will stop all these silly discussions. </p>
<p>So, sorry Bill, I am not sure you really understand &#8220;distributed programming models&#8221; (I won&#8217;t even talk about BPM) even though you might be a great &#8220;middleware&#8221; guy shoveling bits from A to B (B to A is a bit harder). There is value in what you are doing, but please, understand that it is only and will ever be &#8220;distributed OO&#8221;. This is what you have been doing for 15 years, and you will be doing 15 years from today. Your mind cannot shift from a monolithic programming model (a la OO) to a &#8220;distributed programming model&#8221;. </p>
<p>JJ-</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: billburke</title>
		<link>http://bill.burkecentral.com/2010/02/19/mapping-response-on-client-side/#comment-3358</link>
		<dc:creator><![CDATA[billburke]]></dc:creator>
		<pubDate>Mon, 22 Feb 2010 13:32:52 +0000</pubDate>
		<guid isPermaLink="false">http://bill.burkecentral.com/?p=343#comment-3358</guid>
		<description><![CDATA[I hope if we fix the connection problems you&#039;ll try it out again...]]></description>
		<content:encoded><![CDATA[<p>I hope if we fix the connection problems you&#8217;ll try it out again&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: billburke</title>
		<link>http://bill.burkecentral.com/2010/02/19/mapping-response-on-client-side/#comment-3357</link>
		<dc:creator><![CDATA[billburke]]></dc:creator>
		<pubDate>Mon, 22 Feb 2010 13:32:18 +0000</pubDate>
		<guid isPermaLink="false">http://bill.burkecentral.com/?p=343#comment-3357</guid>
		<description><![CDATA[Actually JJ, so far, it seems to me that BPM fits *VERY* well with REST.  From the prototyping I&#039;m doing, Wait states and Variables become resources.  Transitions become links.  Tasks become feeds.

JJ, you need to ask yourself, why are people that have been developing middleware for decades (13 years for me) embracing REST?  I&#039;ll leave it at that...

Finally, the only fantasy claims that RESTafarians need to drop IMO, is the the idea that clients actually care about self describing messages and that we don&#039;t need middleware.]]></description>
		<content:encoded><![CDATA[<p>Actually JJ, so far, it seems to me that BPM fits *VERY* well with REST.  From the prototyping I&#8217;m doing, Wait states and Variables become resources.  Transitions become links.  Tasks become feeds.</p>
<p>JJ, you need to ask yourself, why are people that have been developing middleware for decades (13 years for me) embracing REST?  I&#8217;ll leave it at that&#8230;</p>
<p>Finally, the only fantasy claims that RESTafarians need to drop IMO, is the the idea that clients actually care about self describing messages and that we don&#8217;t need middleware.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jean-Jacques Dubray</title>
		<link>http://bill.burkecentral.com/2010/02/19/mapping-response-on-client-side/#comment-3355</link>
		<dc:creator><![CDATA[Jean-Jacques Dubray]]></dc:creator>
		<pubDate>Fri, 19 Feb 2010 21:40:20 +0000</pubDate>
		<guid isPermaLink="false">http://bill.burkecentral.com/?p=343#comment-3355</guid>
		<description><![CDATA[Bill:

Gees, don&#039;t you get a sense of deja vu? Don&#039;t you get a sense that since you are always binding to the same corny OO methods the model is OO-based, regardless of which type of binding you use? It would be fun to see the same type of code sample with an action like Submit PO.

Don&#039;t you think the problem is &quot;distributed objects&quot; not the bindings? Could we once and for all agree that OO does not provide a factoring of the business logic that can support information systems? Data Models, Processes, Tasks, Organizations... no to mention (forwards compatible) versioning.

Don&#039;t you get a sense that the &quot;client&quot; in the JBPM example needs to know a think or two about the &quot;links&quot;? Where is the uniform interface? I don&#039;t hear much about that lately. How do you version the client code when the response with the &quot;links&quot; changes? 

How long will be have to wait until we put OO to rest and seriously consider the architecture of information systems? How will we have to wait until the RESTafarians quit their fantasy claims?

JJ-]]></description>
		<content:encoded><![CDATA[<p>Bill:</p>
<p>Gees, don&#8217;t you get a sense of deja vu? Don&#8217;t you get a sense that since you are always binding to the same corny OO methods the model is OO-based, regardless of which type of binding you use? It would be fun to see the same type of code sample with an action like Submit PO.</p>
<p>Don&#8217;t you think the problem is &#8220;distributed objects&#8221; not the bindings? Could we once and for all agree that OO does not provide a factoring of the business logic that can support information systems? Data Models, Processes, Tasks, Organizations&#8230; no to mention (forwards compatible) versioning.</p>
<p>Don&#8217;t you get a sense that the &#8220;client&#8221; in the JBPM example needs to know a think or two about the &#8220;links&#8221;? Where is the uniform interface? I don&#8217;t hear much about that lately. How do you version the client code when the response with the &#8220;links&#8221; changes? </p>
<p>How long will be have to wait until we put OO to rest and seriously consider the architecture of information systems? How will we have to wait until the RESTafarians quit their fantasy claims?</p>
<p>JJ-</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christophe Vanfleteren</title>
		<link>http://bill.burkecentral.com/2010/02/19/mapping-response-on-client-side/#comment-3353</link>
		<dc:creator><![CDATA[Christophe Vanfleteren]]></dc:creator>
		<pubDate>Fri, 19 Feb 2010 08:28:47 +0000</pubDate>
		<guid isPermaLink="false">http://bill.burkecentral.com/?p=343#comment-3353</guid>
		<description><![CDATA[Seems like a great idea. This would surely beat the procedural code you have in your example.]]></description>
		<content:encoded><![CDATA[<p>Seems like a great idea. This would surely beat the procedural code you have in your example.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jillesvangurp</title>
		<link>http://bill.burkecentral.com/2010/02/19/mapping-response-on-client-side/#comment-3352</link>
		<dc:creator><![CDATA[jillesvangurp]]></dc:creator>
		<pubDate>Fri, 19 Feb 2010 08:21:08 +0000</pubDate>
		<guid isPermaLink="false">http://bill.burkecentral.com/?p=343#comment-3352</guid>
		<description><![CDATA[I think a response wrapper could be a nice idea. But why not be more explicit about it? Basically due to the chronic release connection problems with the client side resteasy proxies I reported a few months ago, I&#039;ve stripped all resteasy client code from our system and replaced it with httpclient 4 ResponseHandlers. I ended up with less code.

Basically you implement ResponseHandler and implement the T handleResponse(..) method. Mostly you don&#039;t actually need to return a wrapper object (actually, especially with post/put requests, I usually go for Boolean) but if you need one, you can return one. 

So I think you need to go for a callback style solution as well. Secondly, I don&#039;t like the abuse of exceptions for what are really not exceptional situations. Why not let the user specify a callback interface that you annotate with the expected status and corresponding types? Then throw an exception for unhandled responses (or better have a default handle method in the interface).

So you would get something like 

@Path(..)
@ResponseHandler(MyHandler.class)
public void getCustomer(...)]]></description>
		<content:encoded><![CDATA[<p>I think a response wrapper could be a nice idea. But why not be more explicit about it? Basically due to the chronic release connection problems with the client side resteasy proxies I reported a few months ago, I&#8217;ve stripped all resteasy client code from our system and replaced it with httpclient 4 ResponseHandlers. I ended up with less code.</p>
<p>Basically you implement ResponseHandler and implement the T handleResponse(..) method. Mostly you don&#8217;t actually need to return a wrapper object (actually, especially with post/put requests, I usually go for Boolean) but if you need one, you can return one. </p>
<p>So I think you need to go for a callback style solution as well. Secondly, I don&#8217;t like the abuse of exceptions for what are really not exceptional situations. Why not let the user specify a callback interface that you annotate with the expected status and corresponding types? Then throw an exception for unhandled responses (or better have a default handle method in the interface).</p>
<p>So you would get something like </p>
<p>@Path(..)<br />
@ResponseHandler(MyHandler.class)<br />
public void getCustomer(&#8230;)</p>
]]></content:encoded>
	</item>
</channel>
</rss>

