Comparing the "Economics" of REST and RPC
Sun, 12 Aug 2001 22:30:34 -0700
> ----- Original Message -----
> From: "Jeff Bone" <firstname.lastname@example.org>
> PS - one other thought. I've come to the conclusion through a bunch
> of little experiments that designing for REST requires an abstraction
> skill and mindset that is alien to those who've come to think in an
> OODA kind of mode. Decomposing a problem domain into a set of
> resource representations with generic interfaces is *not* the same as
> decomposing the same domain into a set of objects and type-specific
> operations on those objects; it's harder in many respects.
I'm not seeing the discrepency between OO and REST.Maybe I don't do OO the
way most people do.
I usually do object models (a simplified OMT style) and build things as
properties that are either collections or just simple values.
Mapping this to being served by a Web server - not just hacked in, but
trying to follow a mapping of uri to object references and methods to
interface methods - works pretty well.
The difficulty I have is in deciding what is the canonical 'address' of a
compound something. Here are two examples:
- exposing nntp over http - should the URI include the nntp server or just
- exposing jms over http - should the URI include the connection factory or
just the destination?
If you include the nntp server or the connection factory - which are both
just means of getting to the actual data - then the server doesn't need much
in the way of configuration information. It becomes low maintainence, nearly
stateless. Without including them, you need more stuff setup on the server.
Do you have a general example in mind of how OO and REST diverge?