4 ms·
Ask HN: Best framework to develop a web API
I just received a task of building a web based stock market simulator. I am only supposed to write the algorithms and expose them as an API.(web based, something like RESTful ). My client will then just hand this over to people who will develop good looking front-end, iPhone, blackberry apps and so on for it.
This is the first time I am building an API as such but I have done a lot of web programming in PHP and Python.
I am wondering which would be the best framework to build such an API. Or should I build the business logic in one and expose it to the rest of the world in something lightweight such as NodeJS ?
Please suggest me frameworks and basic approaches. Even links to pointers will be highly appreciated.
- kookiekrak 15y agoI would suggest Ruby on Rails. I'm in the process of developing an accurate blackjack simulator with RoR.
- digamber_kamat 15y agoCan rails handle HTTP PUT , DELETE requests with equal ease the way it does POST and GET ?
- jjhageman 15y agoYes. Example of how the code could look in RoR: http://davidwparker.com/2010/03/09/api-in-rails-respond-to-and-respond-with/ http://davidwparker.com/2010/03/09/api-in-rails-respond-to-a...
- jjhageman 15y agoYou can build an API in any common language. Since you are already comfortable in PHP or Python, your time will be best spent using one of those languages. I'm guessing your client will be expecting the product some time soon. =) I would recommend structuring it as a RESTful web service though.
- bphogan 15y agoI like Sinatra (Ruby) for APIs. If the URL structure needs more complexity, Rails is better, but the downside is that you're getting a lot more than what you might need. If I were asked to do one in Python, I'd use Flask.