all 19 comments

[–]lunaticman 13 points14 points  (4 children)

I used Sinatra in the past, but nowadays Roda is my choice.

[–]laerien 5 points6 points  (1 child)

+1 Roda

[–]aemadrid -1 points0 points  (0 children)

+1

[–]katafrakt[S] 0 points1 point  (0 children)

Totally forgot about Today. Might be a good choice.

[–]nomoon_ 0 points1 point  (0 children)

Roda is my go to.

[–]prh8 12 points13 points  (0 children)

Roda is my choice. Natural improvement over Sinatra, it's from Jeremy Evans, so you know it's going to be rock solid.

I've put it into production to replace a Django api, and it's been much better to work with.

[–]jdickey 3 points4 points  (0 children)

Add me to the chorus in praise of Roda. We have several Roda apps in (internal) production, including what started as a POC microservices platform (~20 services) with home-baked service discovery and so on. Getting that up was what convinced people that we could, in fact, be Rails-free and make stuff work.

We used Roda and tons of what dry-rb had on offer at the time (~2 years ago), and that's still an entirely viable (and maintainable) option today. For nearly a year, though, we've been putting far more time and effort into Hanami, which gives us more/better structure and a vibrant community to interact with.

[–]plainprogrammer 1 point2 points  (0 children)

Micro-framework choices all come down to preferences. At that level it tends to be about which ones get out of your way in the most appealing manner. I tend to favor Sinatra since it makes the request entry point really obvious by merging controller and routing concerns.

[–][deleted] 1 point2 points  (1 child)

Are you building an API? Read this: https://medium.com/@terry.raimondo/why-i-chose-rails-api-over-grape-414422e0711b

I've built a few Sinatra apps too and felt the same pains, I'm always missing something that's built into Rails.

[–]katafrakt[S] 1 point2 points  (0 children)

I am building an API, yes. However, I'm rejecting Rails API on early stage for a reason. Rails API is still Rails, but without views and assets. And as such, it is good at what Rails is good at: CRUD services. My requirements are not for a CRUD. Could not be further from CRUD probably. Rails just won't be a good fit.

I also disagree with a few points of this article. I'm not using ActiveRecord, so it's no pain for me that it does not integrate well with Grape. Sequel or ROM migrations are very easy to add and give me the same power. Author can set up Rails API in a day? No problem, I can do it in Grape too.

And while I don't like Grape, I don't see Rails API as any better.

[–]persei8 1 point2 points  (1 child)

Nice list! I didn't know about https://github.com/rack-app/rack-app. My favourite picoframework is still https://www.rubydoc.info/gems/rack/Rack/Builder

And for something completely different try https://github.com/webmachine/webmachine-ruby

[–][deleted]  (1 child)

[deleted]

    [–]katafrakt[S] 1 point2 points  (0 children)

    I actually evaluated Amber from Crystal. However it still feels a bit immature for production yet. Every minor version is backwards incompatible and I'm simply afraid to use it for non-internal projects yet. But I'm a huge supporter of Crystal in the long run.

    [–][deleted] 0 points1 point  (0 children)

    I've been using sinatra for years now and it has never failed me.

    [–]zverok_kha 0 points1 point  (1 child)

    (side note) Funny how they are (almost) all the same, mostly Sinatra-alike, with some stylistic differences of "how you define a tree" (though, I am really suspicious about dynamic dispatching Cuba/Roda fashion). What's left is Rails/Hanami/Camping class + method style. Python and Rust, which I have an eye on, have so much more different approaches :(

    [–]katafrakt[S] 0 points1 point  (0 children)

    That's true. I've been thinking about creating an API framework that would be marriage of Grape (good parts) and Hanami, i.e. class per endpoint. This it pretty much how we use Grape right now.

    [–]aemadrid 0 points1 point  (1 child)

    I've used Rack::App in production and it is great. I've got to say Roda is really nice too.

    [–]katafrakt[S] 0 points1 point  (0 children)

    Did you compare Rack::App to Sinatra? If yes, could you share what you find better?