Hacker News new | comments | show | ask | jobs | submit login
Ask HN: Halcyon or sinatra/padrino for a simple rest/json webservice?
2 points by cyrilchampier 1660 days ago | hide | past | web | 4 comments | favorite

There's no real good answer here. Either you want something really lightweight, you will go with Sinatra. Otherwise, something a little more heavy but with lot more features, you will go with Padrino. This choice will depends on what you're familiar with, and what you already know and love. If you're new to both, maybe have a good look at Padrino could be the answer.

The question is not on sinatra / padrino, but on padrino / halcyon ;)

Ok, my bad, was reading too fast. Halcyon seems nice, really focus on JSON, which can be handy when building a REST/JSON API. The answer will be more a personal choice, within what you prefer. Sinatra has a way to describe routes and endpoints using its DSL that, in my opinion, is way nicer for a simple REST API that Halcyon. Halcyon looks a lot more like Rails (in routing, controllers etc)., which might not always ease readibility.

Still, there's no real good answer here. Padrino/Halcyon can both work on Rack, Thin or Mongrel, so performance would normally be almost the same. The difference will be in the style of code you want to write: simple and really explicit DSL like Sinatra/Padrino, or something more like Rails with Halcyon.

Another option could be to use Rails, with this gems: https://github.com/spastorino/rails-api ?

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact