Live data from Hacker News

Rails 7.1 Released

github.com

91–100 of 245 posts

Re: Rails 7.1 Released

#91
post #66

Rails is great, and better than ever. I've spent most of my early years in the field working with Django and Laravel, then moved to frontend doing [all the usual stuff we do nowadays] and this year I was assigned back to a Rails + Hotwire project. I'm truly amazed how much simpler things are. I feel sad most of us have forgotten how easier things could be, and I'm terrified about new people joining this industry that…

I'd like to throw in Phoenix LiveView here.

Rails wins every battle for initial development speed, as the conventions are so thorough and well thought out that nothing even remotely comes close. Laravel is creeping in, but it's not there yet IMO.

LiveView however, scales better (in every sense of the word). It also comes with batteries included (auth, database access, jobs, mailer, complete testing kit etc), little-to-no-DIY-JS, and one of the finest VMs there is (BEAM).

If nothing else, I'm happy that these projects all fight the "let's take a step back"-fight. At $DAYJOB I write React with Relay and the amount of hoops one needs to jump through is exhausting, even though I've been writing frontend JS for many years now and consider myself half decent in it.

Re: Rails 7.1 Released

#92
post #2

Currently stuck on a fairly large code base on rails 6 with a ton of react and trying to upgrade to the new “non”-JS way with Hotwire. Wish me luck Rails is great when you stick with the defaults and a land of pain as soon as you leave them.

> Rails is great when you stick with the defaults and a land of pain as soon as you leave them. You just described every framework. Frameworks are great if your application is fairly simple and aligns with its way of doing things. Libraries are where to look if you need a more complex, flexible setup.

There's something I never see mentioned in this discussion: you can be flexible with what libraries/frameworks you pick, but you can also be flexible with what you build with those.

If doing things exactly the way you envision involves building the world from scratch, it's often better business to go with a "less elegant" solution that can be rapidly pieced together from mainly ready-made components.

I've often earned long-lasting trust and cooperation of clients by asking whether they would like to adjust (or forego entirely) that one feature, if the project ended up being 20 or more % cheaper/faster to deliver. And given that choice, it's surprising how flexible businesses can be.

Re: Rails 7.1 Released

#93
post #55
post #38

Earlier quoted context omitted.

Please name a few with the same comfort of having most things built-in. One example: database migrations. In the JS world it is knex all over and it is much less comfortable than ActiveRecord.

Personally I would rather use Fastify+MikroORM. Or Asp.Net. Or Flask with SqlAlchemy + the migration and validation libs(marshmallow?) Or whatever is good in Golang.

> Or whatever is good in Golang.

There is no such thing in Go and most likely will never be given the perspectives held by the greater Go community (less is more).

Comparatively, the Ruby community is the complete inverse: any perceived friction can and should be abstracted to be (subjectively) nicer. It's why some people love the language, and it's also why some people dislike the language.

Re: Rails 7.1 Released

#94

Would anyone start a new project with Rails today? If someone suggested using Rails for a new project to me today, I would show them the door. There are so many more mature frameworks in more robust and performant languages. IMO the only reason to use Rails today is if you’re too uncurious to learn something better.

Looking at the new Hotwire stuff. It’s neat from a technical perspective but looks dreadful to me. Why double down on a sloppy backend language when hardly any of the needed logic for a web application is backend? Especially when the alternatives include a full stack of TypeScript, a robust, performant, strongly typed, fantastically tooled language? I was an RoR developer for a decade. These code bases do not age wel…

What would be fully stack TS alternative to rails?

Re: Rails 7.1 Released

#95
post #62

Earlier quoted context omitted.

Comparing the two: I have a hard time understanding how one could write FE code using classes (Stimulus) in 2023, when simple functions with inputs and outputs are there for the taking. It's just asking for trouble and hidden complexity. Choose wisely!

> when simple functions with inputs and outputs And the state library, and the hooks for side effects, and the SSR, and the hydration, and the VDOM, and... It's not that simple.

I know react is moving towards SSR quite a lot but I don't think hydration or SSR are actually common for react devs to care about. You also have very similar issues with hotwire, so I'm not sure it makes React more complicated.

For all its flaws, React is still extremely "small" as far as front end and server side front end goes.

That might change with the increased push towards next.js and SSR though.

Re: Rails 7.1 Released

#96

Would anyone start a new project with Rails today? If someone suggested using Rails for a new project to me today, I would show them the door. There are so many more mature frameworks in more robust and performant languages. IMO the only reason to use Rails today is if you’re too uncurious to learn something better.

Looking at the new Hotwire stuff. It’s neat from a technical perspective but looks dreadful to me. Why double down on a sloppy backend language when hardly any of the needed logic for a web application is backend? Especially when the alternatives include a full stack of TypeScript, a robust, performant, strongly typed, fantastically tooled language? I was an RoR developer for a decade. These code bases do not age wel…

Last time I checked it is perfectly possible to use anything including TS via jsbundling-rails and esbuild, so honestly I don’t understand what is the problem here.

I’m also on a fence re Hotwire, but apparently it works for them in Basecamp and Hey, so that’s what they are investing into.

Anecdotally, recently in Ruby shops I see an increase in new projects using Hotwire as a push back against bloated and hard to maintain React front ends and people are delighted how everything is easier now. RoR codebases are not the only ones which did not age well, I’ve seen quite a few React/NextJs legacy projects I would prefer not to touch at all. So I don’t think technology is the main culprit here.

Re: Rails 7.1 Released

#97
post #5
post #2

Currently stuck on a fairly large code base on rails 6 with a ton of react and trying to upgrade to the new “non”-JS way with Hotwire. Wish me luck Rails is great when you stick with the defaults and a land of pain as soon as you leave them.

I'm working on a fairly recent Rails 7 code base. We initially started using Stimulus, but are now considering switching to React for a few reasons: - if you're looking to hire frontend engineers, the candidate pool for React is a few orders or magnitude bigger - it's getting harder and harder to find vanilla JS packages that you can wrap in Stimulus controllers for common tasks, compared to finding React packages -…

> if you're looking to hire frontend engineers, the candidate pool for React is a few orders or magnitude bigger

The trick is not to look for React developers, or Stimulus developers, but to look for frontend developers. Those who can competently write javascript/typescript, have a good understanding of browser apis, and are competent in css and html.

Re: Rails 7.1 Released

#98
post #2

Currently stuck on a fairly large code base on rails 6 with a ton of react and trying to upgrade to the new “non”-JS way with Hotwire. Wish me luck Rails is great when you stick with the defaults and a land of pain as soon as you leave them.

I've been doing Rails since 2005 and love it, but - and that's just my personal preference! - I wish they'd have a stable release cadence (calver like vscode maybe?) and a clearer roadmap/governance. Maybe it's just me but I just don't like DHH's governance lately. Not in a bad way, but following him on Twitter I just no longer respect him.

> Maybe it's just me but I just don't like DHH's governance lately.

It's not really governance, that's kinda the problem. To be fair, he never claimed that he was providing governance. Rails was extracted from basecamp. The impression I get is that he sees Rails as a gift to the community created from the profit-making Basecamp. Which is great; and I appreciate the fact that I've been able to build a career using Rails.

But there is no governance really. Rails goes in the direction that 37signals wants it to, which is largely pretty good. You and I don't get much of a say in it though; especially if DHH disagrees.

Re: Rails 7.1 Released

#99
post #66

Rails is great, and better than ever. I've spent most of my early years in the field working with Django and Laravel, then moved to frontend doing [all the usual stuff we do nowadays] and this year I was assigned back to a Rails + Hotwire project. I'm truly amazed how much simpler things are. I feel sad most of us have forgotten how easier things could be, and I'm terrified about new people joining this industry that…

I love rails. Hardly anyone is using it in my country, and the companies that do are looking for absolute wizards. Because I can’t find jobs using it, I do t get enough experience and lose out to said wizards (after the jobs stay open for 12+ months). Instead, I’m spewing yet more JS into the world because that’s where the demand is :/

Re: Rails 7.1 Released

#100
post #2

Currently stuck on a fairly large code base on rails 6 with a ton of react and trying to upgrade to the new “non”-JS way with Hotwire. Wish me luck Rails is great when you stick with the defaults and a land of pain as soon as you leave them.

Loose typing is a nightmare. The youngins always learn the hard way.

Ruby is dynamically typed and strongly typed.
Post reply on HN