DEV Community

Discussion on: Tell us what your top unpopular tech opinion is 😈

Collapse
 
leastbad profile image
leastbad • Edited

If you start your projects by asking which SPA instead of why SPA you're doing it wrong.

There's an entire generation of developers who are hive-minded about the idea that monolith = bad, React/Vue = good. They are being lied to because it's profitable for their employers. It's a hegemony and a cult. From the outside, it looks like the inmates are running the asylum.

Seriously: use your favorite stable and proven server-rendered framework, devise a caching strategy where Redis is hot with a >99% hit rate, use Turbolinks to make things load faster than the eye can see, and use Stimulus to manage what little client logic you truly need.

Collapse
 
brunodrugowick profile image
Bruno Drugowick

I came down here searching for your comment. That's exactly my opinion.

I'd add that not only this generation of developers, but the not-so-tech and not-so-young managers generation (specially some business tech-ish decision-makers I had to deal with) is sometimes so toxic that I found myself having to throw a buzzword out of the blue, without making any sense, to be taken seriously or have my requests approved. It sounds absurd, but it's true and it works... and that's sad!

Collapse
 
leastbad profile image
leastbad

Collapse
 
patarapolw profile image
Pacharapol Withayasakpunt

At this point, I don't even know if I need SPA <Link /> in my multi-page website?

Collapse
 
cryptoquick profile image
Distributed Hunter Trujillo • Edited

Software would be a lot less complicated to develop if you didn't have to use the "industry standard" approach that billion dollar corporations developed to serve billions of users.

And it's pretty clear that developers will martyr themselves for their religions.

Collapse
 
qm3ster profile image
Mihail Malo

Static hosting is cheaper and faster at every level and scale.
Why would you interpolate html on your server?
You're winning nothing, it's not even less complexity.

Collapse
 
leastbad profile image
leastbad

That sounds like a great strategy, if you're only hosting static documents.

Beyond that, I can loudly declare that I can cast all AD&D 2nd mage spells up to 6th level - but for some reason not the 4th level spells - and have the same amount of credibility as your assertion that I'm "winning nothing".

Seriously, have you ever built anything credibly sophisticated with a server app? I don't believe for a moment that you would voluntarily choose to use whatever nifty combination of Vue + Firebase or whatever you have convinced yourself is best if you could see how quickly we can build reactive applications using Rails, TurboLinks and Stimulus vs maintaining client state and serializing everything as JSON "because better".

Honestly, I don't think your position has a leg to stand on.

Thread Thread
 
qm3ster profile image
Mihail Malo

That is a view of nothing but pure inertia.
Imagine using last resort hacks like TurboLinks on a greenfield project and claiming you're "using the platform".
Will you have API endpoints? Yes. Will you have some interactivity on the client, including network calls (without a seamless page reload)? Yes.
Why add to that a third thing in a separate language?
And this scales from "one person updating both the API and the UI in one commit" to "here's the GraphQL/Swagger/gRPC spec from the team for that backend feature, use it to generate mocks".
You're paying extra money for servers just to have more things to worry about, avoid scary things like offline-first, websockets, p2p and for what? To say "look, mom, I am generating HTML just like WordPress"?
What's one thing that's easier to do on a frontend server than anywhere else?

Thread Thread
 
qm3ster profile image
Mihail Malo

That is a view of nothing but pure inertia.
Imagine using last resort hacks like TurboLinks on a greenfield project and claiming you're "using the platform".
Will you have API endpoints? Yes. Will you have some interactivity on the client, including network calls (without a seamless page reload)? Yes.
Why add to that a third thing in a separate language?
And this scales from "one person updating both the API and the UI in one commit" to "here's the GraphQL/Swagger/gRPC spec from the team for that backend feature, use it to generate mocks".
You're paying extra money for servers just to have more things to worry about, avoid scary things like offline-first, websockets, p2p and for what? To say "look, mom, I am generating HTML just like WordPress"?
What's one thing that's easier to do on a frontend server than anywhere else?

Thread Thread
 
leastbad profile image
leastbad

Mihail, you've been doing this since 2015. Is it possible that you still have some things to learn? Right now you're equating mature/stable == old/bad. You've come up at a time when it's been super trendy to push everything to the client, and I promise you that this works in a pendulum cycle. Meanwhile, if you keep drinking your own KoolAid, you'll convince yourself that you just happened to luck out and learn the methodology that you're going to fight to prove is the best. It's not a good look, and long term, it's not the hill you want to die on.

Also, this notion that everything has to be done with microservices and all-static front-end everything is just the regurgitation of propaganda. The massive pushback against this march towards the edge is already well underway. I've been building and scaling teams since the late 90s. You don't have to agree with me, but you don't get to squirt testosterone all over the carpet and bleat about how my views are "pure inertia". You're being a dick.

Straight-up, the first and best thing that comes to mind that is easier to do with server rendered UI is state management. You can suggest that Turbolinks is a "last resort hack" all you want, but frankly it's just not a credible statement. Using Turbolinks and a library like StimulusReflex, I can build reactive user experiences that load faster and smaller, render and update faster, and I drastically reduce the complexity of the logic by not keeping any state on the client at all. It's a breeze to develop, it's easy to employ Russian doll caching, it's actually a lot of fun, and gosh, it's good enough for 6 of the top 10 YC companies of all time.

Honestly, everything I do with Rails, TurboLinks, StimulusReflex and Stimulus, I can build it faster than a team of JS devs. I'm not sure that I believe you've ever actually tried these tools, or you wouldn't be saying what you're saying.