Live data from Hacker News

What language/framework would be suitable for a new lightweight API project?

news.ycombinator.com

1–10 of 30 posts

What language/framework would be suitable for a new lightweight API project?

#1
I want to write a simple API to interface directly with Elasticsearch, almost to the point of being a proxy. I have extensive Python/Django experience, but I'm open to learning something new. Since this is pretty much going to be a CRUD API with some authentication logic, Django feels like overkill. I'm looking at learning Flask, or perhaps something non-Python. Any suggestions?

Re: What language/framework would be suitable for a new lightweight API project?

#5

If you're just using HTTP auth then try Sinatra. You could probably whip up something viable in 50 lines.

Sinatra looks very straight-forward. Checking out the repo on GitHub now, and it looks great! I will probably do some sort of token-based auth. The app will eventually integrate with Ember.js.

Re: What language/framework would be suitable for a new lightweight API project?

#9
I haven't used Flask (or Python) aside from one small hack project. It seemed simple and straight forward enough, and very similar to Ruby's Sinatra framework. Personally in Ruby I would most likely pick Sinatra, in Python I'd pick Flash or something similar.

However if you wanna play with languages you're less familiar with, I'd recommend Go, or Node.js.

Personally I find Go really interesting as it's quite different from the languages I normally work in, and it's concurrency model makes it performant without being a mindfuck.

Node.js is interesting as it's Javascript, but extremely I/O performant due to it's evented nature, but that also makes concurrency a bit of a mindfuck at times.

Those are my suggestions at least if you're itching to get your toes wet in some new fun languages :)

Post reply on HN