[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: [rest-discuss] Objects at REST...

  • From: "Andrzej Jan Taramina" <andrzej@c...>
  • To: Steve Bjorg <steveb@m...>
  • Date: Wed, 12 Mar 2008 16:42:49 -0500

Re: [rest-discuss] Objects at REST...
Steve:

Brillant analysis of what I was trying to get at.  Thanks!

> No, I don't agree with equating them. Their similarities are far less than
> there differences. 

I absolutely agree with this.

> First, REST is about representations and stateless protocols for state 
> transitions. So, for the latter, one would have to fundamentally assume 
> Software Transacted Memory (STM) for all objects, but only up to its membrane
> (i.e. the boundary where internal objects tare not directly exposed). 

To clarify your comment, which I agree with, REST might work reasonably well 
for stateless "objects", like EJB Session Beans for instance.  Where the risk 
lies is that the un-discerning unwashed masses (and their PHM slavedrivers) 
will apply the approach to key business objects which were never designed to 
be stateless.  Down that path lies madness. ;-)

> Second, I know I am in the minority here, but pretty URIs are irrelevant. It's
> something for humans to enjoy. If you have them, great! If not, it's
> irrelevant. Sub-structure, relationships are discovered by message exchange
> and never constructed unless told so by the source representation. So, if you
> have http://foo/resource/sub-resource orhttp://foo/resource/
> andhttp://foo/sub-resource is simply not relevant. 

I'm a bit ambivalent on this comment.  Machine to machine, pretty URI's are 
quite irrelevant.  But when it comes to testing machine to machine 
integrations, debugging and the like, which is conducted by meatware, pretty 
URI's can provide some real productivity and value. It's also very difficult 
to predict how an interface might be re-purposed in the future (new mashups, 
new integrations, new applications, etc.), and again, having pretty URI's can 
help those developers to understand and utilize the URI's and representations 
more quickly/easily.  So why not make 'em pretty....doesn't take much more 
effort and can have some decent payback.

> Third, not all objects are equal. The first wave of object-oriented 
> programming was about class inheritance (class inheritance). The second wave
> was about matching interfaces at the instance level only (prototype
> inheritance). Notice how both have to do with thegeneralizationprocess, not
> the actual instances. In REST, we care about the instances and not the things
> that created them. You can use structured programming, object- oriented
> programming, or one-offs to implement your web-services and web- applications.
> Again, the methodology irrelevant, only the properties of the running system
> are. 

So what you are saying is that the exposed interfaces and common lingua 
franca between such services/apps is what is key.  I subscribe to that, 
especially in the integration space.


> Lastly, and most importantly, is the guaranteed decoupling of the resource's
> state from its representation.  This means that you have made the major leap
> already where the information consumer's view of the world may absolutely not
> be related to the producer's view of the world.  And certainly, this is where
> REST has made it's mark in web application design.  In object-oriented design,
> programmers fundamentally think about sharing objects.  This last point is
> relevant, because it ties back into the first point.  

And we run into the classic problems that attend object serialization!  
Better to design a representation from scratch that avoids those issues.

> Creating membranes
> -- think of them as encapsulation at the instance level instead of the class
> level -- in object-oriented systems is hard because of the high-degree of
> interconnectedness of objects.  On the other and, in REST, you build
> everything as membranes since you never directly manipulate the bits, only
> their representations.  Hence, this problem is solved at the root.  This is
> important, because it's hard problem to solve in object-oriented systems. 

Nicely put, Steve!

> In short, mapping concepts from object-oriented programming to REST will
> make people think about it in the wrong way and therefore do more harm than
> good, in my humble opinion. 

And was the root of the unease I have with Rick's approach.  

Andrzej Jan Taramina
Chaeron Corporation: Enterprise System Solutions
http://www.chaeron.com



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.