Sinatra - usage and issues

How do you use Sinatra? What kind of apps do you build with it? What problems do you have with it and what solutions do you suggest?

1 Like

Great topic Fred!

I haven’t actually used it myself as I never really had the need - even my most simple Ruby apps use Rails because of familiarity and… all those lovely gems (like Rails Admin) that just make your life easier.

How about you, have you used it much?

Glad you asked AJ :grinning: Yes, Over the last year I’ve been using Sinatra more and more. It’s now my go-to framework for most of the apps I develop. I love its simplicity and it’s only-what-you-need approach. I also love the sense of control it gives you. I find Rails too overwhelming most of the times.

On the downside, if you need production-env logging you need to hack Rack a little bit, there’s no Rails.logger in Sinatra. You also need to do your own form validation and cross-site script checking but it’s good.

1 Like

What kind of apps are they Fred?

I’d love to see some screencasts on Sinatra - maybe you can do some, haha :stuck_out_tongue:

Basically REST APIs but also full-blown web-sites with DB support, nice templates and Bootstrap CSS. I’ve nearly finished my current project using these actually.

I think I will do some screencasts on Sinatra come to think of it. If only I had somewhere to put them, hmmm… :grin:

1 Like

There may be soon! :wink: :wink:

We too use it for small API apps, using Rails for the bigger stuff.

If you need a simple endpoint you can post some data to, Sinatra is so easy to work with.

11 of our 26 currently running production apps are actually Sinatra. The others are Rails, Phoenix (Elixir) and Plug (Elixir).

1 Like