Ruby on Rails (RoR) dominates web development in Ruby. It's rich in features, but it's also a heavyweight framework.
Do you eschew RoR and use an alternative Ruby web development approach? (Example: different framework, or writing your own framework)
The Neocities frontend is basically something much simpler built on top of Sinatra and I haven't regretted that decision at all. It's (relatively) clean and simple, and if I need to do something weird that doesn't conform to the paradigm (this happens a lot), it quickly gets out of my way. You can generally do anything you want with Rails, but in my experience that more frequently involves digging through a bunch of documentation and google searches to try to figure out how to get the framework out of my way.
I've also found ruby to be a really solid language for doing lower level glue tasks, for an unusual example I use it to glue a redis database to powerdns, which serves a lot of query requests, it's plenty fast and very reliable. I've never had to rip out ruby from something more performance-oriented and replace it with something "faster".
At the same time if I had a team of 10 people I was working with I might appreciate Rails keeping everybody on the same design structure so I there's not an endless battle over how it should be put together, but in my past experience this kind of just happens with Rails too.
Hey good job on Neocities btw.
I've noticed that a lot, and while it's not wrong to adhere to the "golden path", I take issue when it becomes instilled as rhetoric in a developer and precludes them from understanding or dignifying someone else's choices or questions when deviating from it.
There's always this aggression-of-curiosity in response, never a "well you'd do x, y, and z, but it's not recommended". It's always "Well why would you do that? That's wrong, you're supposed to..." and then an hour later after someone is red in the face just asking a question it comes down to "yeah I've never used 0mq before with rails, sorry maybe try Slack"
[edit: The comment I was originally replying to has gone from 1 sentence to a paragraph and is still receiving edits. Including this note for posterity just in case it looks like I'm talking to myself in a closet.]
(I'm not saying it's better than Rails, just that it's better than Rails for me.)
Rails 7 has been my favorite version since 3. Version 3 was probably the peak of metaprogramming and when basically anything you tried worked which was fun but really cowboy.
> We’ll be doing some deep dives into our new infrastructure in the future, including discussing how we built our own anycast network
(https://blog.neocities.org/blog/2017/03/26/huge-space-increa...)
This!!! I can't express this enough, Ruby is the sweet spot for gluing things togheter and rapid prototyping.
I've built a few Sinatra/Flask systems since, so I'm definitely a fan of the virtue of simplicity, no matter the language.
The design mistake here is not applying lessons learned reading Danny Greenfeld's book (which I don't believe shipped before 2012) on Django and realizing the chapter on "vanilla Django" applies just as much to any system, like "vanilla Rails", because they are the same "stranger in a strange land" problems where the system as we know it becomes undocumented and unbounded by architectural style - a kind of McMansion Hell for system design.
The use of DSLs is complex territory. When in the hands of a master, amazing work can happen, but when too many DSLs are combined together, you wind up with exactly the opposite of what Greenfeld described in the chapter on vanilla Django, you wind up with byzantine Rails, because the boundaries that Alan Kay described decades earlier are not architectural. As with much software, there is no physics, real or implied, that applies to the phenomenological understanding of the system, the individual and social human scaling of brains that turns out to be a larger problem than computer hardware and software scaling.
There is a semantic asymptote, if you will, where the problem leaves the empirical world and becomes phenomenological - very difficult to share socially unless you are Kay, Knuth, or one of their contemporaries.
Jeremy Evans is the creator and maintainer of both of these Ruby gems and is super helpful in resolving ask kinda of issues.
[0]: https://roda.jeremyevans.net/
[1]: https://sequel.jeremyevans.net/
I started the codebase over a decade ago now, and at the time Rails felt a little heavy (inline with your comments). That said, Rails does let you get started pretty quickly without needing much of anything else.
Rails has more magic. If you prefer less magic, then Sinatra is the way.
0: https://www.enchant.com
See https://richstone.io/why-do-we-call-it-ruby-and-rails-magic/
What problem are you trying to solve by asking these questions? What context is this question for? Are you curious how many people use a non-rails solutions for enterprise apps? Cloud apps? Personal projects? Apps you want users to pay for? A blog?
I'd suggest stating what problem you'd like to solve by asking this question so you can receive more detailed feedback. For example, if your company is spinning up a new app and you're evaluating choices, someone may respond that they used sinatra but found themselves reinventing rails so they wish they would have used rails. I'd say this is more insightful than "yea, we use sinatra". Alternatively, maybe someone used sinatra for a personal project and found the experience of reinventing rails rewarding and educational on their own time. Let us help you!
Rails latest release (7.0.4) have 386,970 lines of code in total, 310,779 of it being Ruby code. 3000 files in total. Just the `lib` directory of `activerecord` has 33,036 lines of code, across 369 files.
By most metrics, RoR is pretty heavyweight, as their literal taglines are "Ruby on Rails scales from HELLO WORLD to IPO" and "A web-app framework that includes everything needed to create database-backed web applications according to the Model-View-Controller (MVC) pattern", so it needs to be pretty big to support those use cases.
Full `cloc` report in case someone is curious:
Not sure what do you mean by "most metrics". Framework supporting features is not same as they being used all at once in every app.
PostgreSQL has more than 1.3M lines of code and it gets used by projects of all sizes, would you call it "heavyweight" too?
And does ANYONE here want to compare Rails with the standard "enterprise" stack of Java and React, and all their implied dependencies (Spring, Lombok, etm.)?
One issue I could think of when a framework dominates a language is that it could steer changes in that language that benefit itself more than the language.
The whole service (which isn't too complex) is a file script in Ruby managed through SystemD. This script turns off/on the screen based on API calls, and is also in charge of scheduled/remote restarts, pinging the backend and stuff like that.
What I like the most is how easy and reliable is. Beeing a below average guy, ruby makes really easy to combine system calls, API calls and shell commands within the same context.
I first started writing my APIs using Sinatra about 10 years ago. I had started with Rails when it first came out around 2005, liked it, but then ran up against a lot of issues. Sinatra and the Sequel gem were amazing so I switched to that, since I didn’t need most of what Rails had.
Now I just use those two out of habit. Rails is a LOT better now, but i still just reach for Sinatra and Sequel usually.
I started with Rails when migrations were just .sql files you wrote by hand. I switched to Sinatra mostly to use Sequel, because ActiveRecord at the time would do horrible queries unless you wrote them by hand. I know they have solved that issue, so I should try Rails again… but my Sequel muscle memory is pretty strong at this point.
It does seem to be much more the exception than the rule. But it may be getting more common with kubernetes deployments which make lots of individual services a bit easier to manage.