dev@jsr311.java.net

Re: Mapping POJOs

From: Dhanji R. Prasanna <dhanji_at_gmail.com>
Date: Fri, 13 Apr 2007 20:21:02 +1000

On 4/13/07, Stefan Tilkov <stefan.tilkov_at_innoq.com> wrote:
>
> On Apr 13, 2007, at 3:01 AM, Dhanji R. Prasanna wrote:
>
> I agree it's not a programming model. To phrase what I meant differently,
> I want to be able to implement any RESTful API using JSR 311. In the WS-*
> world, there's the concept of contract-first vs. code-first development,
> i.e. do I start from the Java code and generate a WSDL from it, or do I
> design the WSDL first and generate Java from it. (In my personal opinion,
> the best approach is to not generate at all, but I digress).
>

Ok, I am totally with you on this one. To free oneself from a description
language (via the use of annotations or whatever) so that code-first (i.e.
model-first) development can work easily is a goal I can get behind. This
also leans toward the idea that model objects can be shared between jsr311
web services and other unrelated application logic, which I think is a big
gain.

I agree the latter is useful for the majority of cases, but there *must* be
> a way to achieve the 20% case as well.
>

Fine by me; I think a lot of the backs-and-forths so far have been due to a
lack of clarity about this 20%. I would suggest identifying edge cases early
and treating them as such (perhaps even in a separate thread). This will
also help us have proper focus on developing the low-level apis, with a
known set of ground rules; without diminishing either their importance or
their domain of applicability.

I think I was, yes, although I would not go as far as to suggest replacing
> everything there is - that would obviously not be doable. In my initial
> discussions with Paul (before joining), I understood that it's not
> unreasonable to expect that there may result some change requests to e.g.
> the Servlet API from this JSR.
>

Hmm that sounds interesting--I was under the impression that servlet is
pretty inflexible. That's also a bit different than jsr311 having the dual
goal. I'd definitely be interested to see what kinds of things we can do
there.

http://www.blinksale.com/api
> I'm not affiliated with those guys in any way, but let's for the sake of
> the argument assume that I need to implement this Web API exactly as it's
> described, using Java. Can I do so? Using JSR 311? Or only if I access the
> underlying "container"?
>

Cool, I dont know much about blinksale. From a quick glance, it looks
somewhat like the swdp rest stuff (web methods, uri templates etc.). I'd
hope we should be able to achieve something with the same ease of use.

I believe making JSR 311 self-sufficient is preferable. I see no reason why
> (as has been suggested) Restlet classes that overlap can't be candidates to
> be "pulled into" the JSR for standardization.
>

Agreed, hence my question:

> Jerome, what is it that you feel jsr311 should do that Restlet doesnt (or
> vice-versa) and what are your reasons for keeping them separate?
>
> <snip>

This is linked to the same argument as above (code-first vs.
> contract-first), but I don't really want to get into a JAX-WS discussion; I
> officially retract that statement :-)
>

=)
I take your point as to the descriptive complexity of JAX-WS web services.

Stefan
>

Thanks for your well-considered response.

Dhanji.