TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: python or ruby for REST API creation

2 点作者 buraksarica超过 13 年前
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 条评论

rjd超过 13 年前
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.
kat超过 13 年前
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>
damoncali超过 13 年前
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>
Omnipresent超过 13 年前
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 未加载