What's wrong with proliferation of resources? Changing a password and
exporting to a database sound like two very different things; wouldn't you
*want* to expose them as different resources?

--tim

On Tue, Nov 16, 2010 at 7:56 AM, Daniele Dellafiore <[email protected]>wrote:

> Hi. I have this design dilemma.
>
> I have a ContactResource mounted at /contacts/${code}
>
> Now I have a couple of opeartions, like "change password" and
> "exportToSap".
> Each of them is a Post operation, so I think I can map both on the
> same URL cause they are related to that specific Contact resource.
>
> But I have to manage the logical "if", identifying if the Post is for
> a change passowrd or for the export operations.
> Given I do not like to have a "if" I think I am missing some Restlet
> component that manage that switch for me, that is managing different
> operations via POST on the same url.
>
> Or maybe the right design is to mount a new Resource for each operations,
> like
>
> /contacts/${code}/changePassword
> /contacts/${code}/exportToSap
>
> I have used this way till now but I'd like a different solution to
> avoid proliferation of resources.
>
> Thanks.
>
> --
> Daniele Dellafiore
> http://danieledellafiore.net
>
> ------------------------------------------------------
>
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2682188
>

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2682242

Reply via email to