Re: PUT with no entity (architecture question)

2009-11-02 Thread Jerome Louvel
Hi there, We had several discussions on this topic. Although PUT with an empty entity isn't a RESTful design practice, Restlet shouldn't enforce it as the HTTP spec is unclear about it. Also, we didn't enforce it correctly as the test wasn't working with chunked encoding or when the size

RE: Architecture question

2009-07-05 Thread Jerome Louvel
~ Co-founder ~ http://www.noelios.com -Message d'origine- De : Schley Andrew Kutz [mailto:sak...@gmail.com] Envoyé : mercredi 24 juin 2009 23:00 À : discuss@restlet.tigris.org Objet : Architecture question I have moved my application from sub-classing Restlets to sub-classing Resources

Architecture question

2009-06-24 Thread Schley Andrew Kutz
I have moved my application from sub-classing Restlets to sub-classing Resources and am now relying on annotations to process incoming requests (@Get for ex.). However, one of the nice side-effects of processing requests with the catch-all handle method is that it allows me to have one

Re: PUT with no entity (architecture question)

2008-01-16 Thread Chuck Hinson
Someone might consider putting this question to the people doing the 2616bis update to HTTP. See http://www.ietf.org/html.charters/httpbis-charter.html - there is a mailing list. As I understand it, part of their charter is to clarify some of the murkier pieces of the spec; this sounds like it

Re: PUT with no entity (architecture question)

2008-01-16 Thread Rob Heittman
Awesome. I didn't know this effort existed. I did not see that they have already cleared up this point in the drafts, although they did shed light on the Status code issue in another thread. I'll join the list ... this is stuff we should stay abreast of. - R

Re: PUT with no entity (architecture question)

2008-01-14 Thread Kevin Conaway
Are you overriding allowPut() in your Resource class? You need to do as such: @Override public boolean allowPut() { return true; } On Jan 13, 2008 10:20 PM, Rhett Sutphin [EMAIL PROTECTED] wrote: Hi, I'm designing implementing my first REST-style API. It's for an existing application.

Re: PUT with no entity (architecture question)

2008-01-14 Thread Rhett Sutphin
Hi Rob, On Jan 14, 2008, at 12:13 AM, Rob Heittman wrote: I can't fault your design given your constraints. I think the general concept: identifying links with hierarchical URIs descending from the URI of each linked object, is at least a common idiom if not an established pattern. I

Re: PUT with no entity (architecture question)

2008-01-14 Thread Kevin Conaway
I see. I can think of two options: 1.) Instead of sending a PUT to /resource1/{r1_identifier}/resource2/{r2_identifier}, you could try sending a PUT to /resource1/{r1_identifier}/resource2/ with {r2_identifier} as the entity body? 2.) Send a default entity body so the request goes through. My

Re: PUT with no entity (architecture question)

2008-01-14 Thread Rob Heittman
1.) Instead of sending a PUT to /resource1/{r1_identifier}/resource2/{r2_identifier}, you could try sending a PUT to /resource1/{r1_identifier}/resource2/ with {r2_identifier} as the entity body? It's not reversible for a many to many relationship unless

Re: PUT with no entity (architecture question)

2008-01-14 Thread Rhett Sutphin
Hi Rob, On Jan 14, 2008, at 9:50 AM, Rob Heittman wrote: 2.) Send a default entity body so the request goes through. I think this is the way to go, honestly, even if it lacks the purity Rhett is looking for. My interpretation of the spec is that an entity is required for a PUT I

RE: Newbie web app architecture question

2008-01-13 Thread Jerome Louvel
Hi William, [...] That makes perfect sense, and the example code was helpful. Setting the status code in a case statement in the resource constructor leaves me feeling like there's an opportunity for an additional abstraction, but it's perfectly workable for now, and I'll let you

PUT with no entity (architecture question)

2008-01-13 Thread Rhett Sutphin
Hi, I'm designing implementing my first REST-style API. It's for an existing application. I'm using Restlet 1.1-M1 and have found it very cleanly designed and easy to use. I've run into a problem where I can't seem to implement one of the resources in the way that makes most sense to

Re: PUT with no entity (architecture question)

2008-01-13 Thread Rob Heittman
I can't fault your design given your constraints. I think the general concept: identifying links with hierarchical URIs descending from the URI of each linked object, is at least a common idiom if not an established pattern. I have both seen and used this style a number of times. I have also

Re: Newbie web app architecture question

2008-01-10 Thread William Pietri
Thanks for the thoughtful reply, John. It was very helpful. One follow-up question: John D. Mitchell wrote: One way to do this is to use different representations for the different types of clients. I.e., support the usual (x)html for the human web interface and a pure xml (or the current

Newbie web app architecture question

2008-01-09 Thread William Pietri
Hi! I'm just getting started with the Restlet framework, and have a few questions. I'll start with one on trying to build web applications in a RESTful way. But first, let me thank you guys for building this. As somebody who has used Servlets for many years and kinda resented them for nearly as

Re: Newbie web app architecture question

2008-01-09 Thread John D. Mitchell
Hi William, On Jan 9, 2008 11:30 AM, William Pietri [EMAIL PROTECTED] wrote: [...] Hi! I'm just getting started with the Restlet framework, and have a few questions. I'll start with one on trying to build web applications in a RESTful way. Welcome to the party. :-) [...] I am going to build