4 ms·
Pretty sick of people calling this RESTful... anyway, for those who do care about URL design more than their model CRUD, I've been using this with success: http
by strmpnk 15y ago
Pretty sick of people calling this RESTful... anyway, for those who do care about URL design more than their model CRUD, I've been using this with success: https://gist.github.com/970992 https://gist.github.com/970992
It removes flawed tradition and makes it a lot easier to see which routes matter vs. which ones exist just because rails added them. Note that the example routes also avoid new/edit routes since this app actually generates those views on the client side.
Beyond that, plural or not, that's pretty much going to add zero value. Some people claim that the URL is an interface. While it might be, that's usually the lack of a better UI and a poor excuse to call something usable. I'll happily hide my URL bar when I can and rarely care to even write a proper URL by hand. Not because I can't but because I'm not a machine.
Now I do care about nice URI design but that's for me to care about, not the user. More and more I see people linking to things through shortening services anyway... so when do you really read a URL before following it? Probably never. Things like this are just for developer sanity.
So if you're going to bother writing a library, make it easier to express URIs that won't need to change and are explicitly designed, rather than worry over developer vanity and hiding details behind poorly thought out CRUD that people like to pretend is REST.