Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: python or ruby for REST API creation
2 points by buraksarica on Sept 16, 2011 | hide | past | favorite | 5 comments
Hi there

I want to build an REST API for a service, which may have some functions taking files as input parameters. (I want to HTTP Post them from client. of course this is example functionality, it will be more than that inside..). I am really good at .NET (with c# specifically) technologies but i really find it pain in ass when it comes to REST based API creation. Besides, i want to learn a dynamic language and platform, to use on my personal (until being proficient) projects.

My question is, which platform/language/technology do you suggest? There is python and ruby or my mind. But if you have other suggestions, i will be only glad to listen them..

Thanks!




I know where you are coming from, I tripped over the REST aspects of the MVC framework recently. Found it rather difficult to have the same end points, couldn't have JSON, XML, form data going to the same URL. I almost walked away from the framework annoys I had to have a messy API.

I ended up creating my own controller class inherited from the normal controller class. Basically I had to set the 'Index' method to scoop everything and then manually detect the HTTP VERB and MIME type of the incoming request and then pass the request along accordingly. Quite nice solution, even built all the error handing and logging into the new class. Makes creating a new end point a dream.

Although I haven't tried yet I pretty sure doing this method will be handle webdav requests as well.


Its good to see a fellow C# dev! I have worked with REST apps in Python(Django). My thought is ruby is better, because grass is always greener on the other side. Django doesn't fully support PUT/DELETE methods, you have to parse the parameters from a raw string.

http://groups.google.com/group/django-developers/browse_thre...


I can't answer your question directly, but if you choose ruby, this book may be helpful:

http://www.amazon.com/Service-Oriented-Design-Rails-Addison-...


You can keep scala among the contenders as well. Lift especially makes it easy to provide REST api's http://www.assembla.com/wiki/show/liftweb/REST_Web_Services


hmm.. isn't scala depends on java? so i really want to work on one platform dependance. But thanks, i will examine.




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

Search: