Why Ruby on Rails Is Still a Good Choice in 2022?
reintech.io
reintech.io
Unfortunately it was “clear” 8 years ago that JavaScript is the “future” and I think at latest 5 years ago everybody got the memo.
Right now I think it is “clear” that the “future” we build with JavaScript has gone horribly wrong and I see some of us reevaluating the tech stacks we came from (Ruby on Rails, Django…) and some doubling down on JavaScript with SSR (server side rendering) and static pages in JavaScript Frameworks.
I’m afraid “the ride” will continue for a while.
In my opinion we went the wrong way with JavaScript to a degree. SPAs (single page apps) where overhyped and we tried to solve problems with it that would have benefited from just plain old web applications. Now instead of sparingly using SPAs and going with traditional web apps we are sort of developing our modern SPAish frameworks in the direction of traditional web apps.
But even within the JavaScript community and the tech there I sort of like Ember.js and it grew out of the Ruby and Rails community. It is not perfect but it fits SPAs perfectly and there is integration into Rails that makes the data handling less tedious (still need to try because unfortunately I got none ember projects + rails or ember + node.js).
If I take my none Ruby and none Rails experiences of the last years I have to say I trust tech that comes from Ruby and Rails guys in other techs more. You can accuse me of Ruby chauvinism but I do believe that we as a community where better able to foster good taste in technology solutions.
I'd argue this is what's happening with mobile apps. It isn't hard to imagine the majority of consumer-facing applications delivered by mobile or tablet first, with a web app as secondary or even some vendors skipping entirely.
Lol I think I like you
Nowadays we have *awesome* ways to do frontend in these full stack frameworks, such as Hotwire/Turbo, Livewire, HTMX, Unpoly, Alpine.js, etc.
The same JavaScript is not your grandpa's JavaScript anymore, traditional MVC apps is not your grandpa's MVC apps either.
And no, Next.js + Prisma, Remix, etc... ARE NOT full stack frameworks despite their claims. They're cobbled together third party libraries all around which just allow you to submit a form to a database. That's not full stack. You need a way to do authentication, authorization, sending emails, translations, command line tasks, background jobs, input validation, caching (and many, many more things).
Why do we do SPAs? Because we as developers want to have the only one "true way" of doing things, so given you can build almost anything with JavaScript, then we want to use JavaScript for everything even if it is not the best tool. It's like when Redux showed up: suddenly *everything* had to go into redux, because that's "the way".
I've been a professional developer for about 18 years, I worked a lot with python (django), java (dropwizard) and the last 8 years or so mostly focused on frontend with JavaScript, last few years doing a lot of React (Next.js) and Vue (Nuxt.js). Playing with Sveltekit.
I love JavaScript and it is what pays my bills nowadays, but we need to realize that the tools and ecosystem (frameworks, libraries, editors, etc) are WAY more important than a language itself.
Nowadays I'm doing a side-project with Laravel, and learning PHP (as a consequence of wanting to use Laravel) and I'm finding it incredible powerful and productive. I like it a lot more than Rails, and certainly much, much more than Django. I can do html components in the server, I can add behavior with Alpine, if it is a complex one with LiveWire, and if I want to do SPA like page transitions across pages I can use Unpoly. And I can trust the next person picking up the project will have a decent documentation (Laravel's official docs) which is something you don't have when you cobble together your own library salad.
I also liked it about eight years ago, but the developers still using it like to use all the sugar and auto-magic. Which leads to spaghetti code.
That's ancient!! I need tools that are 2 weeks old tops.
The tools have evolved, even if ROR brought a lot to the table.
Speed is now a first class feature…