dev@jersey.java.net

Re: [Jersey][WebDAV]

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Fri, 09 Jan 2009 16:25:36 -0500

On Jan 9, 2009, at 4:14 PM, Markus KARG wrote:

> Yes sure, that's what we will do. But what I actually wanted to say
> is that
> in this point, JAX-RS's extensibility is not open enough, since
> WebDAV is a
> pretty simple extension to HTTP but already this simple thing is
> impossible
> to fit into the framework.

I thought we agreed that it was possible, maybe just not as pretty as
we'd like ?

> So here clearly JAX-RS is not flexible enough --
> it's just too narrowly built around the original HTTP/1.1 and
> ignores the
> fact that HTTP actually is just a framework that is open for
> extensions like
> WebDAV. Too bad that we have not detected this in Jersey-0.1 :-(.
> Now it's
> too late.
>
Seems like the Status enum is the main issue. Writing Response and
ResponseBuilder subclasses should be straightforward.

Marc.


>
>> -----Original Message-----
>> From: Marc.Hadley_at_Sun.COM [mailto:Marc.Hadley_at_Sun.COM]
>> Sent: Freitag, 9. Januar 2009 21:52
>> To: dev_at_jersey.dev.java.net
>> Subject: Re: [Jersey][WebDAV]
>>
>> All I can suggest is that you write a WebDAVResponse and associated
>> builder and internally defer to the existing Response and
>> ResponseBuilder classes whenever possible.
>>
>> Marc.
>>
>> On Jan 9, 2009, at 2:41 PM, Markus KARG wrote:
>>
>>>> Internally ResponseBuilder only uses the int value, see the
>>>> implementation of ResponseBuilder.status(Status). There are methods
>>>> to
>>>> set the status code using int and Response.getStatus returns an
>>>> int.
>>>> Response.Status is only provided as a convenience and shouldn't
>>>> prevent use of other status codes.
>>>
>>> Yes, certainly one can do that. But see how ugly it is:
>>>
>>> ResponseBuilder.status(Response.Status.OK)
>>>
>>> compared to
>>>
>>> ResponseBuilder.status(WebDavResponse.Status.getInt())
>>>
>>> and especielly
>>>
>>> ResponseBuilder.ok()
>>>
>>> The first one feels intuitive, the second one feels like C++. :-(
>>>
>>> Isn't convenience the top idea of the builder API? So if we remove
>>> convenience, then what is left over that is any better than directly
>>> writing
>>> "return new Response(200, "OK");" ?
>>>
>>> Regards
>>> Markus
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe_at_jersey.dev.java.net
>>> For additional commands, e-mail: dev-help_at_jersey.dev.java.net
>>>
>>
>> ---
>> Marc Hadley <marc.hadley at sun.com>
>> CTO Office, Sun Microsystems.
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_jersey.dev.java.net
>> For additional commands, e-mail: dev-help_at_jersey.dev.java.net
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: dev-help_at_jersey.dev.java.net
>

---
Marc Hadley <marc.hadley at sun.com>
CTO Office, Sun Microsystems.