TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

From Node to Ruby on Rails

941 pointsby mokkolover 3 years ago

79 comments

hnuser847over 3 years ago
The years when Rails monoliths were the de facto web stack were some of the best of my career. As I progressed in my career and the popular tech stack shifted to things like microservices, document DBs, serverless functions, Node, importing tiny nom packages for everything, docker containers, React, and GraphQL, the sheer cognitive overhead of getting a simple app up and running gradually took all the fun out of the job for me. The fast, satisfying feedback loop of writing a feature in Rails was replaced with weeks-long coordination efforts between independent microservices, constant discussions about tooling, and doubts over whether or not we had chosen the “right” flavor-of-the-week framework or library for our product. Every time I started a new project or a joined a new company, we had the reinvent the wheel for our bespoke Node&#x2F;serverless stack and have the same tiring conversations about naming conventions, logging, data consistency, validation, build scripts, etc., all of which Rails gives you by default. I ended up spending more time on tooling setup than actual business logic.<p>I eventually gave up and switched to a semi-technical product management role.
评论 #29579343 未加载
评论 #29582319 未加载
评论 #29579506 未加载
评论 #29578423 未加载
评论 #29578810 未加载
评论 #29581391 未加载
评论 #29579129 未加载
评论 #29580572 未加载
评论 #29582833 未加载
评论 #29581215 未加载
评论 #29581399 未加载
评论 #29578858 未加载
评论 #29578812 未加载
评论 #29589267 未加载
评论 #29580246 未加载
评论 #29578797 未加载
评论 #29581427 未加载
评论 #29590026 未加载
评论 #29580267 未加载
评论 #29582196 未加载
评论 #29582607 未加载
评论 #29580541 未加载
评论 #29578468 未加载
confidantlakeover 3 years ago
I have spent a lot of time with node(express), Java(Spring) and rails. I see a lot of complaints about node, but node with typescript has been a joy to work with. It is lightweight and has a type system. I know where every piece of code is coming from, there is no magic involved. I either wrote the function in that file, I am importing it, or it is a method on a js object. I only have know one language for both front end and back end. A better standard library would be nice.<p>Rails is nice in terms of getting the project set up, not bikeshedding about the tooling, and working with the db. But the actual coding has been painful for me. I really dislike working with a non typed language. I dislike optional parans in function calls and optional braces for hashes. I dislike all the magic of rails. I never know what is going on because there is some functionality that inherits from a rails class or some other part of the code base. I would rather write a bit more code for a bit more clarity. Maybe if python were typed I would like Django? But python has all of that nonsense around virtualenv.<p>Spring has been ok, but not great. Too much bloated abstract factory creator nonsense. Dependency injection never really clicked for me. All of these annotations. I quite liked plain Java but Spring just felt like this monster.<p>All in all node(express) has been the nicest for me.
评论 #29581354 未加载
评论 #29580156 未加载
评论 #29580474 未加载
评论 #29581470 未加载
评论 #29580724 未加载
评论 #29581666 未加载
评论 #29581439 未加载
评论 #29582640 未加载
评论 #29581595 未加载
评论 #29580892 未加载
评论 #29582944 未加载
评论 #29580749 未加载
评论 #29582055 未加载
recursivedoubtsover 3 years ago
Prediction: the big move in the next few years is going to be &quot;back to hypermedia&quot;<p>People are realizing that you can accomplish quite a bit more with hypermedia than you could in the past, and that the complexity of javascript stacks isn&#x27;t worth it in many cases.<p>Older, mature hypermedia-based technologies like rails, django, and even PHP, will experience a resurgence and a lot of older lessons and techniques in web development (caching, SQL tuning, etc.) will be rediscovered.<p>I have a dog in this fight, w&#x2F; htmx, but I think we are increasingly seeing evidence for this move.
评论 #29578444 未加载
评论 #29579679 未加载
评论 #29579987 未加载
评论 #29603452 未加载
评论 #29578401 未加载
评论 #29582627 未加载
评论 #29582862 未加载
评论 #29581484 未加载
l0rnover 3 years ago
Yeah it&#x27;s funny... Now 10 years+ in the web dev business. I occasionally got drawn by the hype, dug myself considerably deep into express based frameworks, sails.js, koa.js, nest.js... But in the end i had to conclude, my first go-to framework django always came out superior in terms of developer productivity. It even eventually covered the bases where i still thought node was superior like async&#x2F;websocket communication. Imho Django and similar batteries-included frameworks are as state-of-the-art as they&#x27;ve ever been.
评论 #29578376 未加载
评论 #29578321 未加载
评论 #29578242 未加载
shafyyover 3 years ago
I&#x27;ve said this before on here, but the Rails philosophy really clicks with me. Working with Rails is just more fun than with any other language&#x2F;framework, especially JavaScript. I understand that this is subjective, but it&#x27;s good that different choices, including Rails, exist.<p>Rails is opiniated, and I love that: <a href="https:&#x2F;&#x2F;rubyonrails.org&#x2F;doctrine&#x2F;" rel="nofollow">https:&#x2F;&#x2F;rubyonrails.org&#x2F;doctrine&#x2F;</a><p>Edit: Oops, looks like the new website they release somehow fudged the doctrine page. Here&#x27;s the Wayback Machine link: <a href="https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20211126010919&#x2F;https:&#x2F;&#x2F;rubyonrails.org&#x2F;doctrine&#x2F;" rel="nofollow">https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20211126010919&#x2F;https:&#x2F;&#x2F;rubyonrai...</a><p>Update: Oh, they changed the link, here you go: <a href="https:&#x2F;&#x2F;rubyonrails.org&#x2F;doctrine&#x2F;en" rel="nofollow">https:&#x2F;&#x2F;rubyonrails.org&#x2F;doctrine&#x2F;en</a>
评论 #29583802 未加载
评论 #29579116 未加载
czhu12over 3 years ago
Just to throw my hat in the ring, Currently CTO &#x2F;founding engineer of health tech company that runs a Rails backend that serves about 150QPS.<p>I hear over and over that rails doesn’t “scale”.<p>Performance wise, we have never had a problem scaling rails itself. The issues were always at the database level. Most slow endpoints (1.5s+) are 10% Ruby, 90% Postgres.<p>Even if Ruby was magically infinitely fast, these endpoints would go from 1.5s -&gt; 1.35s.<p>Optimizing data infrastructure gets 10x returns compared to the application code.<p>Maintenance wise, it’s a bit harder, Rails loves to put everything in the global namespace. This comes down to your team being conscious of properly namespacing different logical parts of your app.
评论 #29583102 未加载
评论 #29582654 未加载
评论 #29582698 未加载
评论 #29583502 未加载
评论 #29585567 未加载
JackFrover 3 years ago
My takeaway from this is that it’s extraordinarily important to try different tech stacks.<p>I’ve primarily worked as a Java dev for the past 20 years, but I’ve got significant time doing python and one non-trivial Rails app.<p>The funny thing is I’m most comfortable and I believe most productive in the Java ecosystem, but only because of the time spent working in other languages. Coming back to Java after python, one gets a better feel for what’s essential and what’s cruft. Similarly, when Rails first came out, it can’t be understated how revolutionary it was with respect to web development. Coming from the J2EE universe it was like the true essence of web development had been hidden from us with servlets, JSPs, wars and ears.<p>That being said - I’m happy being a Java - well JVM at least - developer. The ecosystem is alway changing and often improving, but I assure you it wouldn’t if not for the evolutionary pressures of things like JS &amp; Node, Ruby &amp; Rails and Python &amp; Django.
评论 #29578890 未加载
评论 #29579588 未加载
评论 #29579843 未加载
评论 #29580636 未加载
johntdalyover 3 years ago
The cool think about rails is not just that you don’t have to take care of the “pluming” (you get that from any halfway decent framework and could stick with JavaScript and nestjs for example to get that benefit) but the libraries that exist to get you going quickly for login, third party apis and so on. That is the bigger benefit of rails.<p>In other languages there might be multiple frameworks and multiple libs all of which might do none of just part of what you need and if you find a lib you might not find an integration into your framework and need to build that yourself.<p>Rails was so big and the community was&#x2F;is cooperative enough that you usually get fewer libs that are more complete and more likely to fit you needs and come with rails integration.<p>No need to test 10 or more libs to find out all of them sort of suck and then do it yourself or chose the least sucky one and integrate it yourself. THAT is what maid Rails productive and at times frustrating (you often only deep dive the components once something goes wrong).<p>Long term it will be interesting to see how many companies run with setups that are Node.js heavy in comparison to not just Rails but also Python, PHP and even Java, .NET and Perl (yes old but not dead).<p>Perl was one of the early languages and I don’t think there will be as many projects in it as there are in PHP. Python has a good amount of stuff and they didn’t really have a time of heavy hype (like PHP, Ruby on Rails or Node.js enjoyed) and Java and .NET are going to be more heavily traditional corporate than the rest.<p>Would be nice if somebody knows a link or two to explore this a little bit better.
评论 #29578381 未加载
评论 #29578529 未加载
pyrrhotechover 3 years ago
Comparing Rails to Express is not apples to apples. You should compare Rails to something like Next.js that has a lot of the magic and plumbing taken care of for you on both the front end and the back end.<p>I agree that for side projects, underfunded startups and especially for product&#x2F;business-focused founders, using the quickest magical prototyping framework is definitely the best idea so I agree with the overall sentiment of the post, just not the specific conclusion that Rails is the best way to go in 2021. I still believe strongly that having the same language on the front end and backend is paramount to developer productivity.
评论 #29580047 未加载
评论 #29579435 未加载
评论 #29585285 未加载
评论 #29581929 未加载
评论 #29581717 未加载
评论 #29583740 未加载
Toutouxcover 3 years ago
For me it actually boils down to the language. I hate almost everything about JavaScript, its syntax, the decisions made and steps taken in its development, and writing Ruby, any Ruby, not just the Rails flavored kind, feels like a breath of fresh air after suffocating in the JS dungeon. My productivity takes a huge hit each time I have to work on a JS codebase, because my brain just doesn&#x27;t enjoy thinking in JavaScript.<p>(Yeah I know this post isn&#x27;t terribly informative, but neither is the article, so I&#x27;m expecting some light-hearted posts)
评论 #29581543 未加载
评论 #29579262 未加载
评论 #29579370 未加载
评论 #29582063 未加载
评论 #29583973 未加载
rbosingerover 3 years ago
I can see this. I worked with Rails for years and recently switched to an all JS stack (serverless, React). I have fun with it in general. TypeScript and the intellisense I get with that in VSCode is great, but overall I feel like I&#x27;ve gone way down in productivity. At first I thought it was due to my being new to this ecosystem but it has been a while now and I&#x27;ve concluded that there definitely is some extra burden with this modern stack. Perhaps it will turn out that the extra work and headache will lead to a more performant and maintainable codebase than we might have achieved with Rails. Time will tell for that one but at the moment it feels like we drown a lot of developer time on tooling, strange issues, and reinventing things that have come with battery-included frameworks like Rails.
caspiiover 3 years ago
I firmly hope that javascript has peaked. The complexity of the tooling has increased by a factor of 10 in the last 10 years with subjectively very little to show for it.<p>Anyone starting out with backend webdev should learn Python Flask. There is no gentler and more thorough way of learning web fundamentals, whilst still being productive from day 1.
评论 #29580365 未加载
评论 #29605002 未加载
评论 #29578741 未加载
评论 #29581567 未加载
评论 #29578859 未加载
papitoover 3 years ago
What is happening? The two trending posts are about monoliths and &quot;stable&quot; languages? Are we finally breaking from the madness of unnecessary complexity, evangelized by the FAANG disciples?<p>I resurrected a Python project of mine after 7 years. Upgraded the dependency management to Poetry, upgraded the <i>major</i> version of Flask. Boom. Back in business. Try that with a modern Node project after 7 months.
评论 #29579468 未加载
评论 #29579494 未加载
otrahuevadaover 3 years ago
This is kinda sorta equivalent to &quot;from Apache HTTP Server to Phoenix Framework&quot; though.<p>Like, yes of course an actual RAD framework has more things built into it than a server runtime. That&#x27;s kind of why they exist.<p>Your programming environment should more or less reflect your requirements, strengths, and priorities, and starting with plain Node makes sense for a development style that OP just doesn&#x27;t seem to want to follow, so he&#x27;s spending a ton of time building &#x27;boilerplate&#x27; to try and shim his process into his tools when the tools should be the ones doing the work for him.<p>Like, all that stuff about CRUD and auth. Just use Prisma and Passport?. No need to twist yourself into a knot building the same abstractions over and over by hand, the things exist and are there.
hank-bitelineover 3 years ago
Supabase (or similar) is going to change all of this very soon. I can&#x27;t wait for open source technologies like postgrest and typescript RPC to mature. No more boilerplate HTTP code, no more boilerplate database endpoints. Need a backend function? Just define the interface, and boom you are writing backend code that you can call directly from your frontend. Really really exciting stuff is right around the corner IMO.
评论 #29579354 未加载
评论 #29586881 未加载
评论 #29584296 未加载
评论 #29583024 未加载
kderbymaover 3 years ago
I would have enjoyed an example or two. The author didn&#x27;t really make their case...<p>They made vague statements that to me seemed laughable without examples.<p>2 weeks in expressJs? doing what?<p>2 days in ruby? again....what?<p>is the author bad at bootstrapping perhaps? do they overcomplicate it.? I need examples to appreciate their insights. otherwise I cannot fathom Hello world taking two hours in modern node.
评论 #29582099 未加载
评论 #29582198 未加载
评论 #29578463 未加载
petemsover 3 years ago
I think the coolest thing about Rails is actually the great amount of high quality Ruby gems for Rails.<p>For instance, you can bootstrap a powerful Admin panel for your Rails project in no time with <a href="https:&#x2F;&#x2F;github.com&#x2F;motor-admin&#x2F;motor-admin-rails" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;motor-admin&#x2F;motor-admin-rails</a> gem.
mmikeffover 3 years ago
Whilst I don&#x27;t have and direct experience of Rails I get the frustration with how the JS ecosystem can force me to spend a lot of time learning and deciding about things very unrelated to the core of the product I am trying to build. I am quite excited to try out Redwood JS though which is approaching a 1.0 release and aims to bring that same opinionated ethos that Rails has to JS.<p>Clearly it is not going to be as mature as RoR for a long time, but as someone who knows enough JS to be dangerous it looks like an appealing option, especially when faced with having to learn an entirely new language.
评论 #29579536 未加载
mfrye0over 3 years ago
While I get the argument for Rails, I find I&#x27;m much more productive when working in one language (Javascript) across both the frontend &#x2F; backend.<p>As to the low level nature of Node&#x2F;Express vs something like Rails or Django, I&#x27;ve tried SailsJS and Loopback, which are probably the closest comparisons in Node, and ending up regretting it. Every time I chose a high level API framework &#x2F; ORM, I felt like I was fighting it or trying to find a workaround for the simplest things.<p>I now choose Express or Koa for most projects.
65over 3 years ago
&gt; I decided to try Rails after writing boilerplate in Node for two hours with Express, Postgres, EJS, Knex, etc and having a simple ‘hello world’ to show for it.<p>Well there&#x27;s your problem. If you were to `npx create-next-app` you&#x27;d have most of what you want already done for you.
评论 #29578484 未加载
评论 #29582134 未加载
IceDaneover 3 years ago
&gt; Building the web app in Rails took me 2 days – the same thing in Node would have taken 2 weeks. I’ve also included things I wouldn’t have attempted to build on Node&#x2F;Express until I proved the idea out (editing a profile? Psht please - I’ll wait till someone requests that<p>I would love to hear more about what you are doing, and perhaps more importantly, <i>how</i> you are doing it if everything is so incredibly difficult for you.<p>Ruby only has one thing going for it, and it&#x27;s not a very unique thing and you can get the same thing in a lot of other places: it has batteries included(and then some). This can make you very productive from the start, yes, but it can also constrain you to work in exactly the way the authors intended and otherwise make your life difficult if you have needs that just fall slightly outside of the garden path.<p>With node, you have nearly an infinite number of choices. But if you pick a stack, and you set it up properly, there is nothing preventing you from moving at speeds similar or surpassing RoR, and usually without any of the same limitations.<p>I am currently building a full-stack application in TypeScript using React and GraphQL on top of Next.js. It is easily the most productive stack I have ever tried, even though it took some work to get there. I can change a database model and the change will propagate through my entire stack all the way to the frontend, giving me type errors in every place I need to change anything, and things like that. There are great &quot;plugins&quot; for nextjs like next-auth which make auth laughably simple, and then you can pick between whatever ORM you want(We are using Prisma, which has been great).<p>With that said, if RoR fits your use case and meets your performance demands and it makes you more productive.. well, that&#x27;s great news. Seems like a no-brainer to go with it then.
评论 #29582786 未加载
sheunlover 3 years ago
I have observed this but with Laravel&#x2F;PHP. If you are a specialist NodeJS is not bad. But if you are a generalist with deadline and business logic to implement a more mature development ecosystem is advisable, in my opinion.
评论 #29580101 未加载
jaredcwhiteover 3 years ago
It feels really good to be in a &quot;post-justification&quot; phase now for Rails. With the release of Rails 7, the successful marketing of Hotwire, the resurgance of Ruby (don&#x27;t call it a comeback!) with v3 and beyond, and the amazing vitality of web-scale platforms built on top of Ruby&#x2F;Rails like GitHub and Shopify, we&#x27;re way past the point of having to &quot;justify&quot; why someone should pick Rails for their web stack. We&#x27;re here to stay and kicking ass. There are plenty of stacks out there to build web software with, and everyone has a favorite, but Rails is a solid choice—arguably the best choice in certain categories—and there&#x27;s no need to explain why you&#x27;ve picked Rails for a project. It continues to be one of the most productive and rewarding frameworks in the business.
jjiceover 3 years ago
The biggest thing holding me back from moving to Djagno or Rails is the DB interaction. As someone who is comfortable and prefers raw SQL, do I just have to man up and embrace the ORM for everything but situations where I _need_ to make raw queries?<p>I&#x27;ve also grown like sqlx (both the Rust and Go versions, despite them not being related as far as I know). The methods for mapping directly to structs work really well and captures one of the biggest issues I&#x27;ve had (literally the object-relational mismatch).<p>I feel like I&#x27;m in a state of decision fatigue with web frameworks. I&#x27;ve used many shallowly, but I just never know if I&#x27;m making the right decision. It&#x27;s probably safe to assume the best bet is the one I choose and stick to though...
评论 #29579263 未加载
评论 #29579707 未加载
评论 #29579183 未加载
评论 #29579167 未加载
评论 #29581170 未加载
评论 #29579520 未加载
评论 #29579532 未加载
dncornholioover 3 years ago
Is Rails really a thing of the past or are people just not talking &#x2F; posting about it much?
评论 #29578252 未加载
评论 #29578482 未加载
评论 #29578513 未加载
评论 #29578223 未加载
评论 #29578227 未加载
评论 #29578366 未加载
评论 #29578334 未加载
评论 #29578339 未加载
评论 #29578301 未加载
评论 #29578261 未加载
评论 #29589508 未加载
progxover 3 years ago
I switched from Ruby on Rails on my side project to PHP. Building the web app in PHP took me 2 hours – the same thing in Rails would have taken 2 days. Now i have time to read HN.
评论 #29579077 未加载
评论 #29578496 未加载
评论 #29579529 未加载
vrodicover 3 years ago
If there was only a good Ruby in browser implementation, I&#x27;d be more than happy to go Ruby everywhere.<p>New Rails with turbo streams is great, but often times it&#x27;s desirable to do data processing on the client, and then getting back to JS feels like a step down.
评论 #29578216 未加载
xutopiaover 3 years ago
I&#x27;m reminded of this all the time whenever I want to do a side project. I think to myself I should checkout a new framework or language and aside from Phoenix&#x2F;Elixir and Rails&#x2F;Ruby I have not found any that use conventions that allow you to concentrate on features and your product decisions as much. Node is a clusterfuck of technical decision making at every step in comparison.
hwersover 3 years ago
In my eyes this kind of feels like another sign that things have stagnated in tech (on the fundamental innovations front, not the &#x27;people are doing things&#x27; front). There was a massive explosion of thing happening a decade ago but today not so much, even to the point that you can get away with using years old tools without really much disadvantage.
评论 #29583121 未加载
评论 #29585449 未加载
didipover 3 years ago
But why? Seriously though, the performance degradation and the &quot;too much magic&quot; problems are not worth it.<p>You could use one of many project bootstrapping tools to quickly spin up web applications in Node, Go, or Rust.<p>If you still insist on using a dynamic language, then at least try the Phoenix framework in Elixir. It offers so many more good ideas.
评论 #29583482 未加载
_wlduover 3 years ago
IMPO, the only significant advantage of micro services and JS is client-side rendering. If you need to publish content to hundreds of millions or billions of clients, then that makes sense. But for most systems, a Linode VPS running Rails, PHP or whatever (with a CDN in front of it) is more than adequate.
jkaplanover 3 years ago
This comparison feels like it&#x27;s less about Node vs Rails and more just about &quot;batteries-included framework&quot; vs not. (Although, perhaps there isn&#x27;t really a Django&#x2F;Rails equivalent in Node yet? I&#x27;m not definitively sure.)<p>&gt;I’ve always found it hard to climb out of the plumbing, forget about it.<p>This is the crux it of it, and it&#x27;s true for any web project not relying on &quot;magic&quot; frameworks. And of course, it comes with tradeoffs. Namely, frameworks can be inflexible, and they can be difficult to understand&#x2F;debug under the hood.<p>There is no escaping these tradeoffs, with any framework or language. More magic means less plumbing and more initial speed, but less flexibility and potential issues as complexity&#x2F;scale increases. It&#x27;s all about trying to choose the best tool for the job.
KingOfCodersover 3 years ago
&quot;Building the web app in Rails took me 2 days – the same thing in Node would have taken 2 weeks&quot;<p>From my experience with Rails and Node, I could not believe a Node framework, e.g. Nestjs takes 5x more effort than Rails (nothing against Rails, it&#x27;s a perfectly fine choice today for projects).
评论 #29579870 未加载
qnsiover 3 years ago
One thing I want people to consider when choosing new tech stack is what startups are using. At the beginning of december I analyzed random 39 startups from last 3 years in YC. This is what they recruit people for (backend technologies)<p>node 15<p>python 15<p>java 2<p>C++ 1<p>Java 2<p>ruby 2<p>go 1<p>elixir 1
评论 #29584683 未加载
评论 #29579714 未加载
评论 #29579702 未加载
overgardover 3 years ago
I think Rails is great (although some of the &quot;magic&quot; tends to concern me), but I gotta say Typescript is the biggest factor for me sticking with node. I just really love type annotations even if the underlying runtime is dynamic.
gmaster1440over 3 years ago
Comparing Node to Ruby on Rails seems misguided, wouldn&#x27;t a more apt comparison be something like Next.js or Svelte Kit to Ruby on Rails? Ruby has its fair share of minimalist[1] web libraries and small gems that aren&#x27;t very different from Node web servers and npm packages.<p>[1] <a href="http:&#x2F;&#x2F;sinatrarb.com&#x2F;" rel="nofollow">http:&#x2F;&#x2F;sinatrarb.com&#x2F;</a><p>Edit: I&#x27;ve noticed at the bottom the author mentions that they use &quot;Node&quot; to mean Node web frameworks, but still I think there&#x27;s something lost to not mention the new wave of frameworks like Next and Svelte Kit.
评论 #29581977 未加载
morphicproover 3 years ago
No one tell them that most of us rails devs moved on to elixir&#x2F;phoenix
bern4444over 3 years ago
I&#x27;ve been using Remix a bit and absolutely love it as a framework. It has a great mechanism of separating server and client side code where you can colocate server side code that only applies to a given route on your page.<p>This makes it trivial to write awesome web apps that don&#x27;t need any JS on the client to work. Of course if JS is enabled client side you can do a lot more but this way the app is good to go without needing to parse any client side JS.<p>All data can easily be fetched on the server and passed down to the client for any route.
z5hover 3 years ago
20+ years of experience here, including a decade of Rails in the middle. And Ruby&#x2F;Rails have certainly caused me enough headaches. And as a proponent of pure fp, I’m not fully convinced anyone should be using a dynamic language if they have a reasonable way to avoid it. Still… I will admit, you can get a lot done quickly with Rails. And if I had to build a db-backed CRUD-ish website&#x2F;API, Rails would be on my list of choices. AND AND, as a fan and believer in SQL, I still actually like ActiveRecord.
cblconfederateover 3 years ago
I d like to see a sociological analysis of this. It seems to me that the JavaScript fad (which is fading now) came from a generation of developers who have different priorities. While RoR came at a time when developers wanted to ship working websites fast, it seems javascript serves other priorities, like showing off your colorful code to investors or impressing your superiors in Megacorp Inc with your new 11 level abstraction that is perpetually compiling. In the end people always get what they incentivize
评论 #29581134 未加载
cushychickenover 3 years ago
This is validating as hell to read.<p>I built the site I&#x27;m currently working on in Python (Flask) based purely on the fact that I knew it best.<p>I&#x27;ve been toying with the idea of adding a React&#x2F;Vue frontend for months but I can&#x27;t bring myself to do it because, well, it&#x27;s <i>complicated</i>. I barely know where to start.<p>It&#x27;s not a 1:1 comparison to Rails (I&#x27;d love to try it someday), but I feel a lot of what the author is talking about. Boring, well developed, well proven tech makes rapid featured development a breeze.
评论 #29582976 未加载
Zababaover 3 years ago
I&#x27;m interested in the opinion of people that have experience in both the &quot;classic MVC&quot; frameworks (Rails, Django, Laravel, Spring) and in the &quot;frontend first&quot; frameworks (React, Vue, Angular). If you had to build a web app that&#x27;s a subset of Excel, sold as SaaS, as a solo developer, what would you pick and why? I know that you can use both together, but I worry that by doing so you lose part of the productivity that&#x27;s associated with MVC frameworks.
评论 #29580224 未加载
pocketsandover 3 years ago
What Rails has done with HotWire and the Laravel community has done with Livewire is the sweet spot for me. Everything is in one place, very little doing things twice -- like validation -- in the front-end and back-end, one router, HTML over the wire, a single auth layer, cost-effective and straightforward infrastructure (db, cache, queue, load balancer, app), and well-defined idioms&#x2F;conventions to do just about everything. Never looking back.
winridover 3 years ago
Blaming Node is like giving pros to Ruby instead of Rails in this case. You&#x27;re comparing a framework to a runtime with poorly chosen frameworks.<p>I bet rails is very productive. But getting a SSR hello world up with Node should take two minutes. Express, EJS, done. Most of the admin pages on fastcomments are server rendered and we add features pretty quickly (IMO).
smitty1eover 3 years ago
My experience of light tinkering with frameworks in the Rails&#x2F;Django mode is that they are outstanding if the task at hand falls withing their paradigm.<p>If one has a requirements shift, and is told to integrate some other prior art, then deep exptertise on both the language and the framework are needful.<p>That is: the silver bullet is mainly available at the gun range.
friedman23over 3 years ago
This seems like this is mostly based on their choice of technology<p>&gt; Building the web app in Rails took me 2 days – the same thing in Node would have taken 2 weeks<p>This is ridiculous, you are comparing a language framework with a runtime. Anyway, my problem with rails and other template based server side rendered frameworks is that the output looks decidedly un-modern and extending it to add the interactivity you can get from modern JS frameworks is hard. I have worked with code bases that were django or rails that bolted on react and other javascript frameworks and the result was not pretty.<p>For my personal projects today what I do is the following, I use nextjs to build the frontend and I use nestjs with prisma for the api (a lot of the plumbing you were talking about is autogenerated here). I probably can&#x27;t get up and running in 2 days but I can do it in under a week and adding new features is painless.
评论 #29578264 未加载
评论 #29578291 未加载
评论 #29578323 未加载
nahtnamover 3 years ago
I fully agree with this post but it&#x27;s missing one important (to me) factor. With TypeScript I can reduce the number of tests I have to write and I can be significantly more confident when writing code solo. So I&#x27;m more than happy to spend 2 weeks (more like a day) to set up the boilerplate.
评论 #29582473 未加载
andrew_over 3 years ago
Oodles of anecdotes and hyperbole. As someone who moved from Ruby&#x2F;Rails to Node, my happiness index has been steadily higher. Why is it that we get a rise out of bashing one ecosystem to favor another?
评论 #29585464 未加载
streamofdigitsover 3 years ago
I think it really matters whether the core of added value of your solution is on the client side or the backend processing.<p>For example (in a parallel but similar universe to ruby) you have python, django and vast sea of data science &#x2F; machine learning &quot;plugins&quot; you can just pull into your project.<p>Add to that that the idea of creating &quot;desktop like&quot; experiences in the browser seems to go against the grain of what the web is and we may indeed have reached &quot;peak javascript&quot;<p>Maybe the success of vue and the emergence of htmx point to this underlying reality
josefrichterover 3 years ago
I keep saying, half-jokingly: write it in Rails, if you hit Rails limits, it means you&#x27;ve made it! There are very few projects that need something else than Rails from the very beginning.
lnxg33k1over 3 years ago
I think learning new things is always good, if anything I have worked along the years primarily with Symfony&#x2F;PHP, but as a freelance you try to get projects regardless of tech stack, I&#x27;ve worked on projects using ASP.NET MVC, Phoenix, I&#x27;ve done iOS with ObjC&#x2F;CocoaTouch back in the days, or Django, and I have the impression that being exposed to different kind of solutions is always enriching and you can bring back to your main stack some fresh ideas&#x2F;approaches
dangerfaceover 3 years ago
Comparing a language like node to a framework like rails is like comparing a language like C++ to a database like H2 they both have different goals and use cases.<p>Sure you can build a database like H2 in C++ and yes doing so will take ages which I think is why most people don&#x27;t do that and just use MySQL instead of reinventing the wheel. Does this mean we should switch from C++ to H2? Obviously not, what am I missing?<p>Wouldn&#x27;t a more useful comparison be something like Node vs Ruby or Rails vs Sails
评论 #29578815 未加载
alifazizover 3 years ago
Comparing node vs rails is weird. Rails might have been designed with productivity first approach.<p>Are there any node.js based framework that has similar productivity speed with Rails?
评论 #29578448 未加载
评论 #29579568 未加载
cryptosover 3 years ago
After trying ruby on rails some years back I didn&#x27;t really liked the framework. I see the benefit of the &quot;batteries included approach&quot;, but I didn&#x27;t like several design choices and back than also the configuration of rails was not fun.<p>I&#x27;d prefer Spring, Quarkus, or Micronaut with Kotlin, because I think these frameworks have better APIs and the performance is better. I also enjoy static typing with a modern language like Kotlin.
arbugeover 3 years ago
This is probably going to generate a lot of controversy around these parts, but I&#x27;d argue that PHP is an equally good option to try these days if you&#x27;re coming from the Node world and want to try something &quot;new&quot;. If you keep an open mind, I think you&#x27;ll be pleasantly surprised, and end up being able to build actual products much faster, as the author here did with Rails.
chiycover 3 years ago
I was similarly motivated to go with PHP and Laravel instead of Node for a personal project recently. Does anyone with experience in both Laravel and Rails have thoughts on how they compare? Both the frameworks themselves and the surrounding ecosystem?
评论 #29578637 未加载
mikotodomoover 3 years ago
I am looking into learning app development with no programming experience. Should I learn Node.js or Ruby on Rails? I hear opinions like Ruby on Rails is obsolete and then other people say it&#x27;s better because it&#x27;s more traditional. If it really is obsolete then how are people still using it? But then is Node.js easier and more useful?
评论 #29581728 未加载
评论 #29587595 未加载
评论 #29582082 未加载
评论 #29583058 未加载
vishal_newover 3 years ago
When I started my web dev career. I have to say Rails was the easiest to get into(It was Rails 4 then). You need to give into the magic in the beginning. I still love it and is main goto thing unless scalability is millions of requests per second. Some problems I had - Upgrade from Rails 4 to 5 was a pain - Memory was a big problem in some apps
danvoellover 3 years ago
&quot;I feel like I’ve struck on a magical treasure from the past&quot; - dang I feel old. Recently got to dig into a MERN stack application. Seemed really easy to build but I still have no idea how the plumbing works. I&#x27;m using 5 applications where I used to use 2.
leodrieschover 3 years ago
I really want to start learning Rails, does somebody know a great course or interactive site?
评论 #29580533 未加载
robertwt7over 3 years ago
Curious how the comparison of &quot;battery-included&quot; frameworks instead of un-opinionated like express.<p>I think Rails would be comparable to something like NestJS in node. Probably it will take both 2 days? However different experience for sure.
truth_seekerover 3 years ago
Here we go again. ;)<p>This issue is not about choosing RoR vs NodeJS, this is about Framework Vs Libraries or more technically speaking being lazy and choosing what other people say Vs doing proper research what best suits your project needs.
rgloverover 3 years ago
For those looking for a legit Rails-like experience in Node: <a href="https:&#x2F;&#x2F;github.com&#x2F;cheatcode&#x2F;joystick" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;cheatcode&#x2F;joystick</a>
ilrwbwrkhvover 3 years ago
Maybe try a full stack framework like blitz js?
评论 #29579933 未加载
评论 #29579377 未加载
ankit70over 3 years ago
I built a project with Express, custom authentication, Turbolinks&#x2F;StimulusJS, Mongoose and ended up using the similar approach to Rails anyway.<p>Rails with Hotwired seems to be the ultimate one person framework DHH wrote about today - <a href="https:&#x2F;&#x2F;world.hey.com&#x2F;dhh&#x2F;the-one-person-framework-711e6318" rel="nofollow">https:&#x2F;&#x2F;world.hey.com&#x2F;dhh&#x2F;the-one-person-framework-711e6318</a>.<p>Really want to try and use Rails for future projects but the magic is just too much for someone new to Ruby&#x2F;Rails. I had to rewrite the routes with brackets in Rails to understand the working.
评论 #29579688 未加载
unixheroover 3 years ago
Ruby on rails is simply amazing to work with.
montblancover 3 years ago
Will JS&#x2F;Node become further fragmented by Typescript&#x2F;Deno? That could make it a bit nasty to build with JS.
atlantageekover 3 years ago
One thing that often gets ignored is the importance of getting new developers up to speed. You go to an existing C# ,node.js or Java app and its painful to twist your mind around the architecture. Ruby on Rails helps you with that. Oh db change well lets jump in to models. Oh the business logic change well jump into the controllers. Its easy to get up to speed when joining an existing project.
评论 #29581819 未加载
charlieyu1over 3 years ago
I don’t like all the webpacker, but Rails 7 is released 15 hours ago maybe I can enjoy it now
janglezzover 3 years ago
Rails just keeps getting better and better. It’s an exciting time to be a Rails dev.
haolezover 3 years ago
Can someone with experience in both Rails and Nest.js compare the two?
ingend88over 3 years ago
What is the best place to learn Rails now ?
评论 #29579674 未加载
maxdoover 3 years ago
not worth reading , Summary: baseless claims I love &lt;X&gt; and it much better compares to mainstream &lt;Y&gt;
评论 #29579743 未加载
moneywoesover 3 years ago
What about Django vs Rails?
tomerbdover 3 years ago
wait until you find out about vaadin
globular-toastover 3 years ago
Wait until you try Django.
评论 #29578199 未加载
评论 #29578495 未加载
评论 #29580251 未加载
gjmacdover 3 years ago
then he gets more than 10 users on it...
评论 #29584470 未加载
mdomsover 3 years ago
I guess things are different in the USA market but at my current gig we cannot hire Rails devs for love nor money. We offer competitive rates and we will even train up non-Rails folks on our dime, but in my country Rails is considered an obsolete joke by most developers and there is no interest in pursuing it as a career.<p>Going forward we are writing new parts of the system in other stacks partly as a hedge against the impossibility of hiring for Rails.
johnnymonsterover 3 years ago
How is this #3 on the front page… no comments and 23 points…
评论 #29578173 未加载
评论 #29578174 未加载