I’m confronting a big Rails app here. This company has normal web, smartphone web, iphone, android versions of the service. Android and Iphone use a very limited API.
They use an old Rails version, and the code in general is not nice to look at. I would like to break this big ball of complexity somehow to make it more accessible and upgradable in the future.
So I have thought that it could be possible to make an API over controllers and models.
Webs and phone apps would only be allowed to use that API.
The API will thus run on different servers and we can focus on each component each time. We can also target write our specs for API, once for all the services.
My main concerns are:
- would it take too long to create a prototype of this system?
- the access we need to the underlying data is too complex?
- performance
- The servers with the API will need the controllers and models, would the controllers also be duplicated on the web front ends ?
Still in paper the idea looks very good.
Has anyone any experience building something similar?
BTW, this looks very helpful
https://github.com/nesquena/rabl
check out the book, service orientd design with ruby and rails