After having gone down the path of separate API controllers, we learned that the APIs had become a second class citizen and had different code paths than the web based resources.
We unified everything; the same endpoint that the user goes through for web signup is the same endpoint that the API will request for a create.
We're just using respond_to's to respond to the various types of clients that make requests.
Utilizing Rails, Jbuilder, and VersioCake, we have a unified, versioned API that can support earlier client versions (thanks to VersionCake).
That's a really great use of jbuilder. I thought their only benefit was separating view logic but this really makes them useful. Now if they only had a name that was different from a Java thing.
After having gone down the path of separate API controllers, we learned that the APIs had become a second class citizen and had different code paths than the web based resources.
We unified everything; the same endpoint that the user goes through for web signup is the same endpoint that the API will request for a create.
We're just using respond_to's to respond to the various types of clients that make requests.
Utilizing Rails, Jbuilder, and VersioCake, we have a unified, versioned API that can support earlier client versions (thanks to VersionCake).