I totally understand the desire for a minimal and clean codebase. If I’m not going to use 80% of Rails, why would include it, right?
But in practice, I have found there is basically zero cost to using Rails instead.
I totally understand the desire for a minimal and clean codebase. If I’m not going to use 80% of Rails, why would include it, right?
But in practice, I have found there is basically zero cost to using Rails instead.
At the company I used to work for we built our invoicing system's API with it and it was fantastic, plain succinct Ruby with Sinatra, Sequel and not much else.
For public-facing apps that require signup, clever routing, image uploads and other non-trivial functionality, Rails definitely makes more sense.
I think the answer to 90% of these "framework A vs. framework B" discussions comes down to "use the best tool for the job".
The simplicity of these frameworks allows arbitrary changes with minimal friction, patterns, restrictions, and other people's opinions, i.e. conventions.
Just thought I'd provide some counter data here. I've built small services in Sinatra, which did not warrant the usage of Rails and never had to change anything, having them in fully functional operation for years.
I could have built these little apps in Rails, but I did not need it, never did, and my code/deployment/etc. is cleaner and smaller because of it.
Also these services have always been quite small (a few endpoints or functions), which is what I think Sinatra is best for.
Non optionated means that I can really easily setup the model that I want/need without having any framework in my way. Love it. One caveat: I am a senior engineer 7+ years of experience. I would not have been comfortable having to do those design choices earlier in my career and Rails would have been better suited then.
I don’t know if the codebase has stabilized but the transition between 2.x to 3.x to 4.x was pretty rocky from my recollection. Hopefully it’s better, since Rails is probably the best framework to get a site up and running quickly.
v2 -> v3 also was the merb merging and a pretty significant rewrite, so it's pretty impressive that we didn't have even more trouble IMO.
Since that time both ruby and rails have stabilized their upgrades significantly. The biggest issue since then was updating to strong params, and that was only an issue for apps with a large CRUD surface area.
These days I think Rails is the perfect balance of stable and flexible for a wide swath of prototypes and apps. The areas where I'd look for an alternative would be web sockets, heavy concurrency (ie. needing more than background workers), or where raw compute is the bottleneck.