Hacker News new | past | comments | ask | show | jobs | submit login

Yep, I was trying to keep the guide short and to the point when the project began, and also more as the most updated version of all the crazy info out there.

I've added the caveat that URL parameters mess with page caching, but, the right way to do URL parameters is probably to make them RESTful and add a route. Except in the case of pagination, which isn't asking for a RESTful resource.

Anyhow, thanks for the feedback -- and would love anything else that I may have left out!




the right way to do URL parameters is probably to make them RESTful and add a route.

I respectfully disagree. REST just means interpreting an HTTP verb as a logical action, it doesn't mean we wage holy war against the heretical question marks. Query parameters remain useful for, e.g., allowing one route to take a number of optional parameters:

/sales/report?year=2008

/sales/report?year=2008&vendor_id=1

/sales/report?year=2008&vendor_id=1&expense_category_id=12

Now if all three of those parameters are optional, that is eight unique RESTful routes you'd have to write (map.sales_report_for_vendor_and_expense_category '/sales/report/vendor/:vendor_id/expense_category/:expense_category_id/'... times eight), which doesn't sound DRY to me at all.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: