admin@glassfish.java.net

Re: REST API and slashes in resource names

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Wed, 02 Jun 2010 20:21:19 +0200

On Jun 2, 2010, at 7:19 PM, Ken Paulsen wrote:

>
> I have my doubts that when we create the GlassFish Admin Console (a
> client to this API), that we'll be completely shielded from things
> like converting a JNDI Name to one of these URLs.

Do you have any use-cases?

The server can essentially produce a representation that contains the
list of JNDI names as appropriate URIs and there can be a search
mechanism using a query parameter to scope the list.


> Yes, we'll have utilities that help us construct the URL, but I
> believe they will be our utilities in many cases... we'll see.
>
> In the case of an HTML client, these URLs are exposed in the browser.

And those URIs can also be in XML or JSON in addition to HTML
representations e.g. consider a general JavaFX RIA admin client
working by consuming the XML representations (or any third party RIA
client).


> If they are simple enough, the end user can do useful things with
> them.
>
> So for those 2 reasons, I do not think this is strictly a server
> issue.
>

We should strive to make it so, such that it is really RESTful,
otherwise clients are going to bind to the server-side URL structure
and when you want to change that because of new requirements you will
be stuck. The client should bind to media types and link types.

Paul.