[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-07 Thread Tracy Ruggles
On Dec 6, 2005, at 10:54 AM, Kevin Dangoor wrote: On 12/6/05, paron [EMAIL PROTECTED] wrote: I think that's RESTful, but that's just me. How about asking at the REST Yahoo group? Kind of a second opinion? Some of the heavyweights that don't hang around here, hang around there. I've heard

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-07 Thread Kevin Dangoor
On 12/7/05, Tracy Ruggles [EMAIL PROTECTED] wrote: POST /link_styles/1/vote HTTP/1.1 Content-Type: application/x-www-form-urlencoded Content-Length: 12 support=true 200 OK

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-06 Thread Janzert
+1 on 1.Explanation and origin of bike sheds. ;) http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/misc.html#BIKESHED-PAINTING JanzertOn 12/6/05, Mike Orr [EMAIL PROTECTED] wrote: What's a Bike Shed?--Mike Orr [EMAIL PROTECTED]([EMAIL PROTECTED] address is semi-reliable)

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-06 Thread Kevin Dangoor
On 12/6/05, paron [EMAIL PROTECTED] wrote: I think that's RESTful, but that's just me. How about asking at the REST Yahoo group? Kind of a second opinion? Some of the heavyweights that don't hang around here, hang around there. I've heard about that group, and I'm afraid we just don't have

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread Ronald Jaramillo
+1 On Dec 5, 2005, at 10:57 PM, bruno modulix wrote: Kevin Dangoor a écrit : So, in a generic CRUD feature, what would you want your URLs to look like: 1) http://yoursite/articles/10/edit 2) http://yoursite/articles/edit/10 3) http://yoursite/articles/edit?id=10 The first, of course.

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread Michael Schneider
Kevin, I am still new to cherrypy. I was under the impression that you built an object tree, and it automatically mapped the URI to the object tree, passing in args to the function http://yoursite/articles/edit?id=10 wouldn't this map to class Article(.): def edit(self, id=None):

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread Michele Cella
william wrote: Does this is implementable into CP2.1 AFAIK, such flexible URL would available in CP2.2. I think Routes provides the maximum flexibility one could ever need and it seems that it will be easily integrable with CherryPy 2.2:

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread Michele Cella
Michele Cella wrote: I'm unable to make a choice between 1 and 2, definitely not the third option. Ok, the first seems the best. If I read the second it seems like I'm going to edit (or show) 10 articles not the article number 10. So +1 for the first. Ciao Michele

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread Michael Schneider
Here a nice overview of the REST approach to URI encoding with some links http://en.wikipedia.org/wiki/Representational_State_Transfer

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread Jared Kuolt
I prefer the command before anything, e.g.: http://yoursite/edit/article/10 That's assuming 'articles' isn't a subdirectory.

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread Bob Ippolito
On Dec 5, 2005, at 12:58 PM, Ian Bicking wrote: Kevin Dangoor wrote: So, in a generic CRUD feature, what would you want your URLs to look like: 1) http://yoursite/articles/10/edit 2) http://yoursite/articles/edit/10 3) http://yoursite/articles/edit?id=10

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread Ian Bicking
Sylvain Hellegouarch wrote: Indeed, IMO the three are equivalent (in fact 2 and 3 are the same). If we refer to REST we have: http://www.ics.uci.edu/~fielding/pubs/dissertation/evaluation.htm#sec_6_2_4 Which clearly indicates that the underlying implementation should be seen through the URI

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread Sylvain Hellegouarch
True. From CherryPy 2.2, all exposed methods will be positional parameters aware by default except index(). Selon Michele Cella [EMAIL PROTECTED]: Michael Schneider wrote: would you go to partial matches for the other URL (like the CherryPy docs below), or is there a trick that

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread Jorge Godoy
Kevin Dangoor [EMAIL PROTECTED] writes: So, in a generic CRUD feature, what would you want your URLs to look like: 1) http://yoursite/articles/10/edit 2) http://yoursite/articles/edit/10 3) http://yoursite/articles/edit?id=10 the advantage to the first one is that it makes view look

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread Ian Bicking
Kevin Dangoor wrote: So, in a generic CRUD feature, what would you want your URLs to look like: 1) http://yoursite/articles/10/edit 2) http://yoursite/articles/edit/10 3) http://yoursite/articles/edit?id=10 http://yoursite/article-10?action=edit ... because 10 doesn't mean anything and

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread bruno modulix
Kevin Dangoor a écrit : So, in a generic CRUD feature, what would you want your URLs to look like: 1) http://yoursite/articles/10/edit 2) http://yoursite/articles/edit/10 3) http://yoursite/articles/edit?id=10 The first, of course. the advantage to the first one is that it makes view look

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread Ray Cote
At 3:42 PM -0500 12/5/05, Kevin Dangoor wrote: So, in a generic CRUD feature, what would you want your URLs to look like: 1) http://yoursite/articles/10/edit 2) http://yoursite/articles/edit/10 3) http://yoursite/articles/edit?id=10 the advantage to the first one is that it makes view look

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread Michele Cella
Well, I've found another opinion (and some comments) regarding 1) vs 2) from the Rails side: http://tech.rufy.com/entry/91 (notice the above url :D) Ciao Michele

[TurboGears] link titles (was: Re: [TurboGears] Re: a triviality: how do you like your URLs?)

2005-12-05 Thread Ian Bicking
Bob Ippolito wrote: I'd personally tend towards something simpler, and enforce unique titles... either automatically by adding predicable garbage to the end, or by validating edits/creates to make sure they have a unique title. It would be quite reasonable in the SQLObject trunk to create

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread Joost Moesker
I would vote #1 For an ecommerce project i'm currently using the following URL scheme: catagoryname/subcatagoryname catagoryname/subcatagoryname/edit catagoryname/subcatagoryname/.../productname catagoryname/subcatagoryname/.../productname/edit Editing the product and catagory 'pages' directly

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread Mike Orr
On 12/5/05, Kevin Dangoor [EMAIL PROTECTED] wrote: So, in a generic CRUD feature, what would you want your URLs to look like: 1) http://yoursite/articles/10/edit This is the most natural. articles contains all articles. 10 is an article. edit is an operation on 10. view is the index

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread [EMAIL PROTECTED]
either 1 or 2

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread Michael Schneider
Sorry for the stupid question, but what would the Controller code look like for option #1? for CRUD 1) http://yoursite/articles/10/edit 2) http://yoursite/articles/edit/10 3) http://yoursite/articles/edit?id=10 1) http://yoursite/articles/10/edit 2) http://yoursite/articles/10/delete 3)

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread Swaroop C H
On 12/6/05, Jeff Watkins [EMAIL PROTECTED] wrote: I'm certain some will suggest this is unpythonic Why? -- Swaroop C Hwww.swaroopch.info

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread Levi
+1 on 1) http://yoursite/articles/10/edit

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread Swaroop C H
+1 On 12/6/05, Jonathan LaCour [EMAIL PROTECTED] wrote: So, in a generic CRUD feature, what would you want your URLs to look like: 1) http://yoursite/articles/10/edit+1 for #1.It is far and away the best option.It just seems to match the way I think of HTTP as messages being sent to

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread anders pearson
Jeff Watkins [EMAIL PROTECTED] writes: I'm certain some will suggest this is unpythonic, but here goes: class CrudController(turbogears.Controller): [... snip a bunch of code ...] actually, this is pretty similar to what i've been using for building REST apps (in plain cherrypy; no

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread Andy-Kim Möller
For me the natural one is the 3 one. Could be that it is because i was programming over 8 years php, but for the first 2 possibillities how would you build a form like this: form action="" href="http://yoursite/articles/edit" target="_blank" >http://yoursite/articles/edit method=GET input

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread Matt Dimmic
Ian's right, this is a Bike Shed moment. But since I care what color the bike shed is, +1 for #1. It feels the most pythonic to me: x = Article(id=10) x.edit(...) But my chief hope is that TurboGears' BDFL makes some decision before we get into an argument about what pythonic means. :)

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread Claudio Torcato
+1 for #1. for you logic.

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread Mike Orr
What's a Bike Shed? -- Mike Orr [EMAIL PROTECTED] ([EMAIL PROTECTED] address is semi-reliable)