Hi Vincent,

> > You add a query parameter with an URI to return to after edition:
> > 
> > /orange/editor?return=/main?orange=picture&apple=text
> 
> But maybe the page you return to depends on the result of the 
> operation. It's not a decision the client can make.

Ok, in this case your "/orange/editor" resource can issue a redirect to the
target URI dynamically generated.

> > The orange never includes the apples, only the main page 
> resource does
> > include both of them. To make sure we are on the same page, 
> do you agree
> > that the following URIs identify different resources?
> >  - "/main"
> >  - "/main?orange=picture"
> >  - "/main?orange=picture&apple=text"
> >  - "/main?orange=picture&apple=picture"
> 
> Actually, I don't. To me they all identify the main page, in 
> different states.
> Would not that be like saying:
>    /document/123;font=large
>    /document/123;font=small
> 
> identify 2 resources?

Exactly, each time you change the URI, even to simply add a query parameter,
you create a different identifier. This new identifier correspond to a
different target resource! Why would you diffentiate
"/document/123;font=large" from "/document/123/large"? From the REST/HTTP
point of view, two different URIs identify two different resources.

Now, at the Restlet level, you can perfectly reuse the same Resource
subclass for all similar target resources, but each instance of the class
will be corresponding to a different target resource.

Best regards,
Jerome

Reply via email to