On 1/3/07, Michael Peters <[EMAIL PROTECTED]> wrote:

> Still
> I could see someone working this style into an existing application
> suite over time. For that I was thinking the ability to check for a
> "methodless" runmode could be supported. For instance GET /people
> would look for people_GET and if that doesn't exist look for just
> people.

I'm not sure I like that much magic in the dispatching.

Isn't "magic" what a framework is about for a developer anyway?

"Any sufficiently advanced technology is indistinguishable from magic."
—Arthur C. Clarke,"Profiles of The Future"

I prefer just 2 values, true or false. And then you can mix them however you 
want.

I guess its a matter of convention over configuration and that I'm the
only one who desires conventions (aka writing/typing less code) then
configuration though.

>> And it would append the HTTP method name (lowercased?) to the run
>> mode. So
>
> The HTTP methods are formally uppercased. Most browser will accept it
> regardless of case. I like uppercase because it makes it easier to
> grok what is part of the REST convention and what's my method name.

Yeah, I think I'll just make it a preference.

what would be the default?

That approach won't quite work. URL dispatching is based on the ...

OK, but I still prefer convention over configuration where this is unnecessary.

 '/:app/:rm[get]'    => { rm => 'get_stuff' },
 '/:app/:rm[post]'   => { rm => 'add_stuff' },
 '/:app/:rm[delete]' => { rm => 'delete_stuff' },

:rm and rm => 'get_stuff'? Did you mean...

'/:app/stuff[get]'    => { rm => 'get_stuff' },

Perhaps this is premature optimization? Are you sure any developer who
wants to write a RESTful app wants/needs that level of detail? It just
seems so much easier, concise and elegant to be able to do...

'/:app/stuff'    => { },

...and then simply create methods like stuff_GET and stuff_POST in my
module. I don't see why anyone developing an app in a RESTful fashion
would want to spend the extra effort creating and managing what could
become a complex dispatch table.

<tim/>

--
Timothy Appnel
Appnel Solutions
http://appnel.com/

Blogcast / Powerful blogging systems made easy
http://blogcast.net/

---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[email protected]/
             http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to