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
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
+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)
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
+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.
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):
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:
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
Here a nice overview of the REST approach to URI encoding with some
links
http://en.wikipedia.org/wiki/Representational_State_Transfer
I prefer the command before anything, e.g.:
http://yoursite/edit/article/10
That's assuming 'articles' isn't a subdirectory.
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
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
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
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
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
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
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
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
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
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
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
either 1 or 2
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)
On 12/6/05, Jeff Watkins [EMAIL PROTECTED] wrote:
I'm certain some will suggest this is unpythonic
Why?
-- Swaroop C Hwww.swaroopch.info
+1 on 1) http://yoursite/articles/10/edit
+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
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
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
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. :)
+1 for #1. for you logic.
What's a Bike Shed?
--
Mike Orr [EMAIL PROTECTED]
([EMAIL PROTECTED] address is semi-reliable)
31 matches
Mail list logo