Hacker News new | ask | show | jobs
by togasystems 4567 days ago
In general, is this a good practice? You do loose the ability to re-use endpoints on mobile.
2 comments

We reuse all controllers and models for our mobile views and for our API. We just do that reuse at the server instead of through the client. So no loss there.
Why would you loose anything? If you want to use JSON on mobile you just need to add .json to any endpoints and JSON will be returned (If you do support it).

domain.com/posts.json

domain.com/posts/1.json

etc.