dev@jsr311.java.net

Re: JSR311: JAX-RS Client API

From: Patrick Mueller <pmuellr_at_yahoo.com>
Date: Fri, 12 Oct 2007 11:08:31 -0400

On Oct 12, 2007, at 9:59 AM, Marc Hadley wrote:

> ... However I'm concerned that the kind of approach you suggest
> with annotated interfaces would really result in hiding the uniform
> interface behind an RPCish facade and I don't think that is what
> I'd want in a RESTful client API.

Good point. Especially the "I don't think that is what I'd want ...".

Since no-one is looking at the client space, all we can do is
imagine. The status quo on the client seems to be ... use raw HTTP
libraries. I think we can abstract some of that ugliness away. Of
course, careful to still allow low-level tweaking at the HTTP level,
when you need it.

Look at this way: we're abstracting lots of stuff on the server-side
of the equation here. Why? If you believe, like many, that low-
level HTTP access is the "REST way", why do we even have JSR 311?
Why not just servlet, or presumably something better than servlet?

We think we're adding value.

Why can't we do the same on the client? Especially when there will
be many, many more people writing client-side code than server-side
code.

Unfortunately, the use case for Java client-side code, compared to
say JavaScript client-side code, is a bit lacking. I think that's
the only reason to ignore the client - not enough use cases.

Patrick Mueller
http://muellerware.org/