On Fri, May 16, 2008 at 12:06 PM, Aristotle Pagaltzis <[EMAIL PROTECTED]> wrote:
> * Zbigniew Lukasiak <[EMAIL PROTECTED]> [2008-05-16 06:25]:
>> Hmm - frankly I have never thought out REST entirely - but I
>> have the feeling that it is always better to be cautious (and
>> you know - be liberal in what you receive).
>
> It's like Turing completeness: you can do everything RESTfully
> that you can do in any other way, you just have to model the
> problem in a way that fits the constraints. REST doesn't restrict
> what you can achieve at all, it just imposes some requirements on
> how you go about it.
>
>> Some ideas top of my head:
>>
>> - a login method (the advantage would be that it does not need to redirect)
>
> I'm not sure I follow. You mean you want to have something like
> `/api/rest/cd/login`? And how do you avoid redirecting from that
> if you have `login` in the URI, which isn't where the client
> needs to be looking at?

Yeah - I think you are right, that was just a quick one.

>
>> - a search
>
> I tend to prefer expressing searches with query parameters… hm.

I understand that what you propose is '/cd?year=1968', is that right?
I really don't know - but some people would prefer to do the search by
POST, or might just like to have the uri as '/cd/search?year=1968'.

>
>> - exposing some class data (as opposed to instance data) and
>> maybe class methods?
>
> Example? I can't quite imagine what you would want to do here.

Hmm - how about a help screen - conveniently at '/cd/help'?


In short I think '/cd/instance/1' style of URIs is less interferring
with how people think about structuring their uris.  If you do '/cd/1'
then you force them to choose one way of doing everything - even if it
is a Turing complete way and you can do everything in that style.

-- 
Zbigniew Lukasiak
http://brudnopis.blogspot.com/
_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Reply via email to