RE: URI matching again

2007-06-15 Thread Jerome Louvel
Hi Jonathan, Beside the URI design recommendations with which I agree, the router should work as expected with FIRST routing mode. I've tested tutorial Part 11 with a modified router: // Attach the handlers to the root router router.attach(/users/{user},

Re: URI matching again

2007-06-08 Thread Avi Flax
Jonathan, I hope you don't mind the suggestion, but I wonder if you'd be open to possibly shifting your URL scheme a little? For example, if /user/list routes to the list of users resource, which is what I call a collection, you might want to consider something like this: /users /users/{id} I

Re: URI matching again

2007-06-08 Thread Valdis Rigdon
I ended up with a similar issue and used Router.LAST, putting the more generic URIs first, and the most specific ones last. (ie, /user/{id} first, then /user/list later). In the end though, I ended up moving to /user/{id} and /users as Adam suggests. It's definitely made our client

Re: URI matching again

2007-06-08 Thread Adam Taft
Generally, when one wants a list in REST style, you have two options: /user/?additionalparameters /users/additional/parameters/ Either way allows you to have /user/{ID}/ as a valid url. I don't know enough about the RESTlet API to tell you, but I think your {ID} will likely eat your /list/