News for hackers. Stuff that matters.
Re:Rails 7.1 Released by roboben on Friday October 06, 2023 @12:48AM (#37787193)
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.

Re:Rails 7.1 Released by eikenberry on Friday October 06, 2023 @01:01AM (#37787254)
> 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.

Re:Rails 7.1 Released by jshen on Friday October 06, 2023 @01:28AM (#37787365)
I've worked on tons of old code bases over decades. I've never seen a library based one that's in good shape either. They usually evolve into some half baked homegrown framework that no one understands.
Re:Rails 7.1 Released by bambax on Friday October 06, 2023 @03:25AM (#37788050)
It seems that, at least in the enterprise world, eventually every software project evolves into a hairy monster "that no one understands", choke-full of traps and side-effects that turn around to bite you at the worst and least-predictable moment.

As a result, projects are frozen in time because everyone's afraid of touching anything, less it triggers Armageddon.

Maybe AI can help? Instead of copilot writing new code, or chat systems explaining a couple of lines, there could be an app that ingests a huge code base at once (spanning multiple languages and subsystems) and

- explains what each part does

- is able to spot potential side effects for each new addition

- suggests simpler ways of doing things / nice refactoring

There are some startups trying to address this but none seems to be there yet (I think); the market is huge though and people would pay through the nose for this.

Re:Rails 7.1 Released by jshen on Friday October 06, 2023 @01:22PM (#37793490)
That's a really interesting observation. Having been in enterprise for a long time I think there are 3 things that I've seen make a big improvement on the health of a system after a decade or more.

1. Longevity of Engineers: Attrition is a killer from a knowledge perspective. Teams that keep their engineers have healthier systems

2. Avoid Over Abstraction: Simple understandable code is easier to maintain. Too many mid level engineers go overboard with abstraction and bad abstraction is worse than no abstraction.

3. Choose tech that is likely to be well maintained decades later. It's better to pick tech that will be well maintained than to pick tech that is better in some way but more obscure and more likely to poorly maintained in decades.

Re:Rails 7.1 Released by eikenberry on Friday October 06, 2023 @02:55PM (#37794726)
This is almost 100% due to developer churn. Every mid-level developer introduced to the project will think they have the new abstraction that will fix everything. Eventually you end up with a monstrosity partially implementing half a dozen different abstractions with no overall architecture. I've seen it many times.

The fix for this is pretty easy though. Keep employees and avoid the churn.

Re:Rails 7.1 Released by jshen on Friday October 06, 2023 @08:05PM (#37797865)
Yes! See my reply to the commenter above you.
Re:Rails 7.1 Released by lolinder on Friday October 06, 2023 @01:43AM (#37787451)
This distinction is frequently emphasized in online discourse, but I've never found it to be super useful. Pretty much everyone can agree that Ruby on Rails is a framework, while underscore.js is a library, but things get really fuzzy in the middle.

The usual explanation is inversion of control—you call into a library, but a framework calls you. But now that pretty much every language has closures, it's a lot harder to use that as a distinction: is React a library since it all starts with createRoot/render (you called it), or is it a framework because from that point on it's calling you? There are tons of people who are highly opinionated in both directions, which suggests that this dichotomy is artificial and doesn't reflect a deeper reality.

Re:Rails 7.1 Released by eikenberry on Friday October 06, 2023 @02:45PM (#37794581)
It's generally considered a heuristic or rule of thumb. It is not meant to contain any hidden truth and if you've moved past the need of this level of basic heuristic it wouldn't be useful anymore.
Re:Rails 7.1 Released by TJSomething on Friday October 06, 2023 @01:48AM (#37787485)
I don't know. I've always found that Symfony in PHP is pretty flexible with its setup. I feel the complexity to be proportional to how far off the beaten path I'm going. I've heard that Spring is also like this.
Re:Rails 7.1 Released by pdntspa on Friday October 06, 2023 @02:24AM (#37787687)
Rails is really flexible, though.
Re:Rails 7.1 Released by silversmith on Friday October 06, 2023 @02:42AM (#37787813)
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 by ywain on Friday October 06, 2023 @12:57AM (#37787235)
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

- Stimulus doesn't really offer a way to write unit tests for your controllers. With React, you can use jest and react-test-renderer like normal.

Additionally, the recent Turbo TypeScript debacle did not instill confidence in the long term stewardship of the Hotwire ecosystem.

We're still on the fence about it. Stimulus does feel like a very Railsy way to write frontend code, which is definitely a plus for small teams of people who're already familiar with Rails.

Re:Rails 7.1 Released by technion on Friday October 06, 2023 @01:35AM (#37787400)
Mastodon runs as a rails api with a react frontend. Last time I discussed this people mentioned it was the worst of both worlds and I get the argument.

But doing things that way means nearly every fronted dev can work with their favourite patterns and frameworks. I love that they can debate replacing create-react-app and i do not have to care beyond saying "as long you meet the openapi spec". Moreover, everything you've described along with most of what has changed recently in the ecosystem goes away. I don't have to care what is happening to hotwire, or the asset pipeline in general or around scss gems being deprecated.

Re:Rails 7.1 Released by 0xblinq on Wednesday October 11, 2023 @12:55AM (#37841020)
> fronted dev can work with their favourite patterns and frameworks

And this is a big problem in my opinion. We should decide the stack that better solves the problem, and then hire people that are happy to work with that, not the other way around.

It's like saying you're in the business of putting screws into walls, but you do it always with hammers because most people like to use hammers.

Re:Rails 7.1 Released by sibeliuss on Friday October 06, 2023 @01:33AM (#37787386)
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!
Re:Rails 7.1 Released by 0xblinq on Friday October 06, 2023 @02:04AM (#37787570)
> 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.

Re:Rails 7.1 Released by pulse7 on Friday October 06, 2023 @02:29AM (#37787718)
Functional/OOP flamewar is starting...
Re:Rails 7.1 Released by sibeliuss on Friday October 06, 2023 @10:33AM (#37791312)
On the FE, this is already a settled topic. Who wants to go back to `this`? Um... nobody.
Re:Rails 7.1 Released by mardifoufs on Friday October 06, 2023 @02:55AM (#37787885)
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 by sibeliuss on Friday October 06, 2023 @10:32AM (#37791305)
Very true. For every day dev, all the framework bits are stuff the average dev doesn't need to know at all. Ie, none of the devs at my company know anything about that, and that's just fine. We get a ton of work done.
Re:Rails 7.1 Released by bradgessler on Friday October 06, 2023 @01:33AM (#37787390)
> if you're looking to hire frontend engineers, the candidate pool for React is a few orders or magnitude bigger

Can't these candidates quickly learn Hotwire? Seems like its much simpler than React (less moving parts)

Re:Rails 7.1 Released by technion on Friday October 06, 2023 @01:37AM (#37787407)
You'd be surprised how many candidates would prefer to just take another job. If for no other reason than resume building with the word react.
Re:Rails 7.1 Released by 0xblinq on Friday October 06, 2023 @02:05AM (#37787574)
Then that was not a good candidate from the get go? What about hiring people that really care about the product they're building and not just tool fanatics?
Re:Rails 7.1 Released by mplewis on Friday October 06, 2023 @02:24AM (#37787690)
One good reason to avoid a job doing Hotwire is so that you can take a job doing React for a similar amount, where your experience applies better and where you'll gain more transferrable experience.

In short, it's probably better for your career to work on React.

Re:Rails 7.1 Released by 0xblinq on Friday October 06, 2023 @02:29AM (#37787726)
As a developer, I get it.

What I don't get is why as an owner/stakeholder/CTO/lead would pick the worse tool (in some context) just because everyone is using it. Well, I do get it... I just don't agree.

If you read between the lines here, everyone is just picking React because everyone else is picking React, that's the only reason apparently. It drives me mad, but honestly I do understand it.

Re:Rails 7.1 Released by kurupt88 on Friday October 06, 2023 @04:26AM (#37788343)
Yeah, especially for crud apps when you get to implementing forms. So much easier with rails and hotwire.

But I would be tempted to go react and inertia js for MUI or EUI for the predesinged components and nice datagrids.

- https://eui.elastic.co - https://mui.com

Re:Rails 7.1 Released by 0xblinq on Friday October 06, 2023 @02:32AM (#37787751)
Also, I'm not 100% sure it's for the "same amount". To me it looks like Rails jobs have higher salaries, at least around here. But that could be because most Rails devs have many years of experience, I don't know.
Re:Rails 7.1 Released by ulizzle on Friday October 06, 2023 @02:14AM (#37787617)
No because every job wants you to hit the ground running. They’ll start asking for “10 years experience in Rails Hotwire” at some point
Re:Rails 7.1 Released by gedy on Friday October 06, 2023 @07:21AM (#37789263)
> Can't these candidates quickly learn Hotwire?

Main issue I've seen is Rails shops don't hire devs without Rails experience, or expect you to interview well with backend OOP type code.

I guess that's okay for someone wanting to get away from frontend and be "full stack", but it's not for a lot of people.

Re:Rails 7.1 Released by brennopost on Friday October 06, 2023 @08:17AM (#37789724)
Stimulus is considerably simpler than React, imo. Turbo, with frames and streams, might take a little time to get the hang of, but it's not overly complex either.
Re:Rails 7.1 Released by 0xblinq on Friday October 06, 2023 @01:35AM (#37787396)
[delayed]
Re:Rails 7.1 Released by azangru on Friday October 06, 2023 @02:56AM (#37787890)
> 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 by JeremyNT on Friday October 06, 2023 @09:51AM (#37790804)
Agreed, Stimulus is so simple that there's almost no prerequisite other beyond a basic understanding of HTML and javascript, both things that any "React developer" and even most "backend" web developers should already have.

Maybe I'm biased but I feel like rails + stimulus makes it incredibly easy for anybody with any kind of programming background to grok the entire project, and maybe you can reconsider even even having dedicated "frontend developers" at all. I know that specialization is a thing, but it's just so easy to be a "full stack" developer on such an app that I think almost anybody could pick it up.

Re:Rails 7.1 Released by tarsinge on Friday October 06, 2023 @03:03AM (#37787925)
If you have to hire dedicated frontend engineers maybe you have overgrown Rails or it’s not a good fit for your site? I find Rails is awesome when it fits in the model Fullstack engineers with designers, HTML-heavy with JS enhancements on specific views. It’s so simple and efficient when the views nicely match the URL routes and they are mostly HTML, even the designers can work on the codebase.
Re:Rails 7.1 Released by 0xblinq on Friday October 06, 2023 @03:13AM (#37787973)
BTW, if you end up using React with Rails, consider https://inertiajs.com/. It works great with Rails.
Re:Rails 7.1 Released by gls2ro on Friday October 06, 2023 @09:18AM (#37790393)
> if you're looking to hire frontend engineers, the candidate pool for React is a few orders or magnitude bigger

Two comments on this - I know it will not change your mind, but maybe other people will read this:

1. Of course, the candidate pool for React is bigger, I think Hotwired - in its current form was released in 2021 (November or December). So this expectation is kinda “Planning to fail” right? If you put this as a criteria of course you are going to choose React. Are you sure you are not already decided to use React and then found reasons for the decision. It is totally fine if you did as we are all doing this constantly (first deciding and then finding reasons or explanations for the decision)

2. I think if you have a React developer (so a person who should know JS and HTML) who cannot write Hotwire code, that is a big problem. Anyone with a good foundation of JS and HTML should be able to write Hotwire code (Stimulus + Turbo)

Recommendation: Don't put in your job ad "Required skill: Hotwired". Just hire people who understand how the web works (browser + HTML ...) and they will be able to write Hotwire-compliant code.

> 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

I am not sure what packages are you trying to find. But I would suggest if you are trying to find an 1-on-1 corresponding React package to Stimulus package the way the UI and UX is designed is not for Hotwire. You should not choose Hotwire to replace React but keep the same page behaviour. You should think your UX web experience different - more back to basics with interactivity sprinkled around

> Stimulus doesn't really offer a way to write unit tests for your controllers

Again if you have an application like say Figma UI then probably you need unit tests. But if you think the UX to be Rails 7 + Hotwire, you will not write so much JS code that you need unit tests for it.

Testing an end-to-end feature should be enough.

Of course, this is just me talking about a product (yours) that I don't know what it is an I am making so many assumptions.

Re:Rails 7.1 Released by itake on Friday October 06, 2023 @12:57AM (#37787236)
I lost faith in rails JS integrations.

I either do SSR with slim or do API only with a separate frontend.

Rails changed direction too many times trying to do JS (coffee script, asset precompiling, webpack, etc)

Re:Rails 7.1 Released by roboben on Friday October 06, 2023 @01:23AM (#37787337)
What is SSR with slim?
Re:Rails 7.1 Released by groggo on Friday October 06, 2023 @01:28AM (#37787367)
I think they mean Server Side Rendering (normal rails controllers/views), and Slim is just the name of the templating engine. It's a little nicer than the default ERB. https://github.com/slim-template/slim

There's also SSR with react and other js frameworks, but I don't think that's what they meant.

Re:Rails 7.1 Released by aaronbrethorst on Friday October 06, 2023 @01:35AM (#37787401)
I haven't used Slim before, but looking at the examples shown on the repo's README, it immediately brought to mind the thought experiment: 'what if Haml but Yaml?'

n.b., I've been building Rails apps since 2007. I was a diehard Haml user up until about 2021 when I made an all-in bet on Tailwind and had to switch back to ERB because Haml with Tailwind felt too obtuse.

Re:Rails 7.1 Released by andrei_says_ on Friday October 06, 2023 @05:05AM (#37788519)
I’ve used slim for years and it’s incredible. Writing erb now feels painful. Slim is clean, terse, and correct.

The only downside is I am now spoiled.

Re:Rails 7.1 Released by petepete on Friday October 06, 2023 @05:40AM (#37788730)
Slim is really nice for some things but the moment you want to style words within sentences or paragraphs it gets really messy and you have to start using unintuitive syntax like `|<` or `|<>` to get the spacing right.

You can of course just drop to `markdown:`.

Still, I use it where I can on personal stuff, but tend to opt for Erb when collaboration with others is needed.

Re:Rails 7.1 Released by throwthrow5643 on Friday October 06, 2023 @06:14AM (#37788884)
I'd like to use haml on the front end rather than ugly ternary ridden JSX. I always thought haml was very tasteful.
Re:Rails 7.1 Released by itake on Friday October 06, 2023 @02:34AM (#37787761)
yep that ^
Re:Rails 7.1 Released by lettergram on Friday October 06, 2023 @01:55AM (#37787524)
I’ve taken a rails 4 through to rails 7. Kind of interesting each major version is basically denoted by a change in the way they handle JavaScript.

Rails 5 & 6 were rough, you forgot yarn! That was my biggest pain point. I still have Coffeescript code, we have been slowly converting as needed.

Rails 7 has been a lot better to deal with, we use vanilla JavaScript (outside the coffeescript lol). Makes it pretty easy tbh. We load partials as needed (via js) and the site is fast and light.

My recommendation is to stick close to html with rails or as mentioned, a separate front end. What we have works super well for us, but definitely custom

Re:Rails 7.1 Released by throwthrow5643 on Friday October 06, 2023 @06:18AM (#37788902)
I'd like to see coffeescript make a comeback.
Re:Rails 7.1 Released by crystaln on Friday October 06, 2023 @01:29AM (#37787371)
Loose typing is a nightmare.

The youngins always learn the hard way.

Re:Rails 7.1 Released by bdcravens on Friday October 06, 2023 @01:42AM (#37787445)
20+ years of experience here, I happily reach for loosely typed languages in most circumstances.
Re:Rails 7.1 Released by lolinder on Friday October 06, 2023 @01:55AM (#37787526)
Can you elaborate on what circumstances you're referring to?

The field is extremely diverse these days, and tools that are appropriate for small data science teams may not work as well in enormous monorepos maintained by thousands of developers (and vice versa). What's missing from most discussions of static/dynamic typing is context—each career is unique and what projects you've worked on will have a huge impact on your perception of which is preferable.

Re:Rails 7.1 Released by bdcravens on Friday October 06, 2023 @11:25AM (#37792053)
You perfectly illustrated the point: that there are no maxims like the grandparent comment made. Myself, I work on very small teams, usually building applications that are backend-heavy web apps or filled with tons of async background processing on the server. Applications that are funded by revenue, not VC. Applications where I typically have a high degree of autonomy and responsibility as to maintainability, with usually no insulation between me and stakeholders.

Given different parameters, I'm sure the decisions would be different as well.

Re:Rails 7.1 Released by lolinder on Friday October 06, 2023 @11:47AM (#37792342)
Oh, for sure, I wasn't endorsing OP's position! I had another recent thread [0] that was full of highly dogmatic claims on my mind, where I noticed that very few people brought in the context for their opinions.

[0] https://news.ycombinator.com/item?id=37764326

Re:Rails 7.1 Released by crystaln on Friday October 06, 2023 @02:21AM (#37787667)
For quick scripts sure.

For writing an application or something that actually require design and libraries? Why bother? You need to be meticulous anyway, why not be meticulous in code?

Re:Rails 7.1 Released by bdcravens on Friday October 06, 2023 @11:18AM (#37791942)
Literally every application I work on requires design, libraries, and meticulous code.

The focus for me is on the tools and frameworks, not the underlying language. Show me a Typescript-based or Go-based language that can go from zero to production as fast as Rails with the same-sized team with no productivity loss, and I'd happily use it.

Re:Rails 7.1 Released by hw on Friday October 06, 2023 @02:11AM (#37787600)
Loose typing is a blessing. Reading and writing code with type declarations everywhere is a nightmare. YMMV.
Re:Rails 7.1 Released by caseyohara on Friday October 06, 2023 @03:03AM (#37787923)
Ruby is dynamically typed and strongly typed.
Re:Rails 7.1 Released by adamors on Friday October 06, 2023 @06:56AM (#37789123)
Good thing that Ruby is actually strongly typed.
Re:Rails 7.1 Released by stevebmark on Friday October 06, 2023 @01:23AM (#37787333)
Goodreads is an example of a Rails victim like yours. They customized the app on top of Rails, and it's been so bad that Goodreads is dead in the water and has not received major tech updates despite Amazon throwing engineers at it. Ruby is a dangerous language to refactor, so often you're locked for a long time. See also: Every blog post about Rails upgrades ever (see also: Stockholm syndrome)
Re:Rails 7.1 Released by yxhuvud on Friday October 06, 2023 @02:23AM (#37787684)
> despite amazon throwing engineers at it

Yeah, that is one way of phrasing it. Another way to phrase it is that Amazon took it over, turned it into an ingestion funnel to their book store, and has done as little as possible after that.

Re:Rails 7.1 Released by stevebmark on Friday October 06, 2023 @10:58AM (#37791648)
Don’t speculate. Listen to engineers who work there https://news.ycombinator.com/item?id=36577444
Re:Rails 7.1 Released by imperfectcats on Saturday October 07, 2023 @06:43AM (#37800607)
That's rather ironic, because I read your comment you linked to, and it is pure speculation.

The Goodreads dev said "the site was originally built as a giant pile of Rails spaghetti with views mixed with business logic and such and then a fuck ton of weird features built and left to sit there". I'm not sure why you think that is or ever was "the Rails way", but it seems more like the classic "move fast and break stuff" startup engineering than anything resembling rails to me.

Re:Rails 7.1 Released by gardenhedge on Friday October 06, 2023 @04:54AM (#37788453)
It's just that amazon isn't that good. See the alexa app as another example
Re:Rails 7.1 Released by steve1977 on Friday October 06, 2023 @05:16AM (#37788613)
See pretty much everything Amazon. AWS, Kindle, you name it. Successful, yes. Technically good, oh no.
Re:Rails 7.1 Released by gls2ro on Friday October 06, 2023 @10:29AM (#37791257)
Are you sure Goodreads did not received updates because of Rails?

Here is a competitor build with Rails https://thestorygraph.com/

Seems kinda cool. So I think Rails is not the problem here.

Re:Rails 7.1 Released by stevebmark on Friday October 06, 2023 @12:01PM (#37792501)
Yes. Goodreads received lots of updates, and they were slow and difficult because of Rails (and Ruby) https://news.ycombinator.com/item?id=36577444
Re:Rails 7.1 Released by ulizzle on Friday October 06, 2023 @01:14AM (#37787306)
It could take a lot more than luck. If it turns out to be a rabbit hole stick with react unless you have a really good reason for that kind of refactor
Re:Rails 7.1 Released by roboben on Friday October 06, 2023 @01:24AM (#37787343)
The react code base is written by me, a backend/infra person and it was the first time I used it. It is a mess and the worst is that all the system tests are super flaky because of weird react DOM stuff.
Re:Rails 7.1 Released by ulizzle on Friday October 06, 2023 @02:04AM (#37787567)
In that case you’re probably alright with the rewrite. My opinion is to stick to React and rewrite the parts you think are nasty.

That’s only because this can turn into a real rabbit hole in my experience. But at that size maybe it won’t be so bad.

Best of luck!

Re:Rails 7.1 Released by FBISurveillance on Friday October 06, 2023 @12:55AM (#37787220)
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.

Re:Rails 7.1 Released by itake on Friday October 06, 2023 @12:59AM (#37787246)
Coding in rails since 2012 here. I lost faith in rails at 5.2. Active storage was so terrible.
Re:Rails 7.1 Released by roboben on Friday October 06, 2023 @01:26AM (#37787357)
Looking forward to see if and how it evolved in rails 7. In 6 it was really bad too and my tests are flaky because of some weird active storage async stuff. Can't find the id of blobs I have no idea
Re:Rails 7.1 Released by nerdwaller on Friday October 06, 2023 @01:18AM (#37787318)
What is terrible about active storage?
Re:Rails 7.1 Released by itake on Friday October 06, 2023 @02:18AM (#37787639)
My memory is fuzzy, but...

1. all data flow through the rails app (no pre-signed s3 upload or download links for direct uploading).

2. no support for CDNs (I think newer rails versions added support)

3. blobs and attachments were unnecessary abstractions.

3a. Querying was annoying (extra joins) and easy to add n+1 queries.

3b. In my app, images are moderated and it was unclear where to put the moderation metadata (on blobs? attachments? create a new table? why so many tables?) or `deleted_at` type columns.

4. GraphQL gem didn't support it: https://github.com/rmosolgo/graphql-ruby/issues/1777

Re:Rails 7.1 Released by dham on Friday October 06, 2023 @08:52AM (#37790118)
1. Rails has had direct upload since it introduced Active Storage. No one has uploaded files through their servers in a decade

2. What do you mean? Point whatever CDN you want at your origin

3. Maybe

3a. Yes

3b. Metadata or a new table

4. GraphQL is the single worst technology that has ever been adopted. We adopted at my company...twice. Twice we made the same mistake now we're stuck with it for mobile clients. In fact we're stuck on the old Graqphl RB gem that used a DSL instead of classes, which also blocks our Rails upgrade. We've been able to revert everything back to good ole Rest for another part of the app. Be cautious adopting technologies of large companies.

Re:Rails 7.1 Released by itake on Monday October 09, 2023 @08:52AM (#37819939)
1. You are correct for upload, but not for download. Looks like rails 7 added support for presigned urls: https://blog.saeloun.com/2021/09/14/rails-7-adds-expiring-ur...

2. CDN support is via monkey patch: https://github.com/rails/rails/issues/44136

3. yep

4. yep

Re:Rails 7.1 Released by maxehmookau on Friday October 06, 2023 @03:00AM (#37787909)
> 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 by ivandenysov on Friday October 06, 2023 @03:05AM (#37787930)
Try https://vite-ruby.netlify.app/guide/rails.html

It was almost a drop in replacement for webpack for me

Re:Rails 7.1 Released by stevepike on Friday October 06, 2023 @09:07AM (#37790272)
I wouldn't necessarily recommend moving from an existing react frontend to hotwire at the same time as upgrading Rails itself. I'd get to Rails 7.1 first/independently.

FWIW the Rails 7+ way of doing single page app JS is also more reasonable than it used to be. You pretty much just use whatever build tool you want in isolation from your rails app. You have to run something like `yarn build --watch` alongside `rails s` in development but IMO that's not so bad and makes things a lot simpler.

My company builds software to automate Rails upgrades, and offers a full service where we'll upgrade Rails for you. steve (at) infield.ai if that's interesting or you can generate a free rails upgrade plan at https://app.infield.ai/users/sign_up (no cc required). https://docs.infield.ai/docs/creating-an-upgrade-path for some more details.

Re:Rails 7.1 Released by yxhuvud on Friday October 06, 2023 @11:25AM (#37792041)
Don't upgrade your architecture all at once. First bump yourself to rails 7 (including any other gems you can upgrade), then do any other changes you want.