TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: python or ruby for REST API creation

2 pointsby buraksaricaover 13 years ago
Hi there<p>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.<p>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..<p>Thanks!

4 comments

rjdover 13 years ago
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.<p>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.<p>Although I haven't tried yet I pretty sure doing this method will be handle webdav requests as well.
katover 13 years ago
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.<p><a href="http://groups.google.com/group/django-developers/browse_thread/thread/771238a95ceb058e?pli=1" rel="nofollow">http://groups.google.com/group/django-developers/browse_thre...</a>
damoncaliover 13 years ago
I can't answer your question directly, but if you choose ruby, this book may be helpful:<p><a href="http://www.amazon.com/Service-Oriented-Design-Rails-Addison-Wesley-Professional/dp/0321659368/ref=sr_1_2?ie=UTF8&#38;qid=1316198366&#38;sr=8-2" rel="nofollow">http://www.amazon.com/Service-Oriented-Design-Rails-Addison-...</a>
Omnipresentover 13 years ago
You can keep scala among the contenders as well. Lift especially makes it easy to provide REST api's <a href="http://www.assembla.com/wiki/show/liftweb/REST_Web_Services" rel="nofollow">http://www.assembla.com/wiki/show/liftweb/REST_Web_Services</a>
评论 #3005663 未加载