Welcome to Dev.to! Sinatra is a simple and well-proven framework to learn and I would HIGHLY recommend adding it to your Ruby toolbox. I use it quite often to develop rock-solid web services quickly in Ruby. I notice you called Ruby "old". Well, Ruby may be older than some other "modern" languages but it is stable and solid and THAT is what clients want. In my 35 years of developing software, I have only used about 5 languages regularly and seen many come and go. Ruby is not going anywhere. Each language has its own strengths and weaknesses and excels in specific circumstances. When a language becomes "mature" like Ruby, you don't get hardly any "gotchas" like you do in new buggy languages. So don't fall for the "it's newer so it has to be a better" argument. It's rarely true.
Good luck to you!
Will keep that in mind. Thanks for your time
you did nothing wrong!
I don't know how I feel about Sinatra, I've never used it but I've used other micro frameworks, like Cuba for Ruby or Flask (my favorite) for Python.
Another microframework I heard mentioned is Hanami.
I think Sinatra is the most popular among the ones in Ruby.
You're right in saying that Rails and Django are more complex.
I guess that, as always, it depends on what you want to accomplish.
The good thing about microframeworks is that they are less "magic" and you can understand how the whole request, response cycle works.
The great thing about microframeworks is that if you write your code well you can more or less switch from one to another without too much effort.
Absolutely. And I just wanted to say as well that I definitely didn't mean to imply that you were wrong in any way. Just because I'm a fan of Rails doesn't mean everyone else has to be. Good luck! I thought Sinatra was really fun when I learned it, so I hope you enjoy it as well.
Thank you very much. I'll search more about cuba and Hanami.
I know where you're coming from. All the 'by default' stuff in Rails can be a bit overwhelming when you just want to do something simple. Sinatra can be great for small stuff, and there are many using it in production successfully.
However, I'd still recommend checking out Rails more. I found that once I understood how a rails app is laid out, it gave me more perspective when working on my own and other systems. That and getting up and running without having to worry about setting up libraries for your database, migrations, sessions, or any of the other low level stuff can be a major time save. Rails is great about letting you get to the part the important bits that separate your web app from others.
If you do decide to try out Rails again, Michael Hartls "Ruby on Rails Tutorial" was a book that really helped me get started.
I agree completely. I would say don’t give up on Rails, and definitely learn Sinatra. It’s hard to deny that it’s valuable to be able to work with Rails, and learning Sinatra first can help you understand what’s going on behind the scenes in Rails. At least for me, that made it less confusing.
Well, I don't know. I guess I can give it a shot again.
Absolutely! I still use Sinatra all the time. If you need to quickly spin up a single function endpoint, or test something, or build a Slack bot or something else where Rails would be overkill, Sinatra is a great framework.
And it gives you a little more insight into how Rails does its magic, so it'll help you learn Rails if you choose to as well.
We’re a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.