users@jersey.java.net

Re: [Jersey] Putting the RESTful "connectedness" around my existing Domain objects

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Mon, 27 Apr 2009 14:15:54 +0200

On Apr 27, 2009, at 11:29 AM, amsmota_at_gmail.com wrote:

> No, I don't mean nothing of that, and I don't understand why you
> reach that conclusion from what I wrote.
>
> I mean for true HATEOAS to be implemented, the server should be free
> to implement whatever he wants on his side, without the client pre-
> knowledge of that, and that application state changes should be
> driven by the server, not by the pre-knowledge of the client.
>

I sometimes explain it like following (it depends on what you mean by
the metaphor of driving :-) )

It is the application that is in control and is driving, the server
offers new possible states to drive to, in returned representations.

Or put another way: for a particular junction the server offers
directions in the representations, "go this way if you want to do
that, or that way if you want to do the other thing", and the client
choose which direction to take.

The application remembers where it has been (bookmarks/history) and
knows how to understand the direction-based instructions the server
makes. There always has to be some pre-knowledge for the client and
server to interoperate. That pre-knowledge is the direction-based
language.

In the Resource Oriented approach (REST style applied to Web
architecture) the direction-based language is encapsulated in the
media types, preferably standardized. Specifically for HTML media
types the HREF/rel and forms is the direction-based language.

Paul.

>
>
> On Apr 27, 2009 10:03am, James Strachan <james.strachan_at_gmail.com>
> wrote:
> > 2009/4/27 António Mota amsmota_at_gmail.com>:
> >
> > > As I said, there's nothing wrong with that. However, doing that
> implies that
> >
> > > the application doesn't respect the HATEOAS constraint, even if
> it has
> >
> > > "connectedness".
> >
> >
> >
> > You mean for true HATEOAS you have to keep changing URIs to keep
> >
> > things pure and avoid those pesky impure non-REST folks using a
> >
> > bookmark, link or search engine? :).
> >
> >
> >
> > I don't quite follow how using HATEOAS is mutually exclusive with
> >
> > trying to avoid changing URIs so you are also a good web citizen
> >
> >
> >
> > --
> >
> > James
> >
> > -------
> >
> > http://macstrac.blogspot.com/
> >
> >
> >
> > Open Source Integration
> >
> > http://fusesource.com/
> >
> >
> >
> >
> ---------------------------------------------------------------------
> >
> > To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> >
> > For additional commands, e-mail: users-help_at_jersey.dev.java.net
> >
> >
> >