DEV Community

loading...
Cover image for  Don't come in "Guns-A-Blazing'"

Don't come in "Guns-A-Blazing'"

Gage
Programmer working in Hilo, Hawaii. Love Elixir, and sometimes JavaScript.
・3 min read

Have you ever learned something that just blew your mind and goes against common knowledge or beliefs?

This recently happened to me when I realized, Single Page Apps (or SPAs for short) are actually way more expensive to build than traditional Server Rendered Multi-page apps (MPAs). When I realized this all I could think was, "I have to tell EVERYBODY! 😱" .

So what do I do? First step, make sure nobody's saying anything false on Twitter.

I quickly found a guy spreading the doctrine of, "Learn React + APIs" and sharing it with defenseless beginners. So I "set him straight" (typos and all 🙂🤦‍♂️)

alt text

I even tried to soften the blow with the 2nd comment, but it was still a blow after all.

His response was quite telling

alt text

I had basically just took a guy who was innocently trying to get followers and share some useful information with beginners and had attacked him. What the heck.

Made me realize my strategy wasn't effective, let alone nice.

Thing is when I walk into these types of conversations guns raised and ready to attack false ideals I usually just catch innocent bystanders in the crossfire (sorry Vlad).

Let's try listening

I recently posted a simple question on dev.to asking why people chose to make SPAs instead of traditional Server Rendered apps. You already know I'm super biased on the subject, but at least I was also more curious now.

I got a response from a nice person about how they built their app using AWS lambda functions, Next.js, Amazon SQS, and more. It sounded ridiculous on the surface, why would they subject themselves so much vendor lock in on top of the complexity of a normal SPA when normal Postgres, Redis, and some nice MVC framework would have got the job done?

Luckily instead I decided to just listen and ask questions to understand why they thought the way they did.

We had a long back and forth conversation and you know what happened? Their arguments made perfect sense!

They were able to not have to worry about any server upgrades and didn't have to shard their database anymore! Not only that they didn't have to worry about where their server was running, but it would also just run at the nearest data center. What about local development? Well, there's some local DB mocking for that. Sure there was some vendor lock-in but they traded off a lot of the effort normally being put into keeping a traditional app up and running. Huh 🤔.

After all this questioning I was tempted to open my mouth again, still sounded harder than how I would build it, but then realized... I had never made an app this way before! I had NO experience, zero, zilch, nada.

I felt like before I had so much experience, having seen both sides (SPA and MPA), well it turns out there was another side 🤯, even a whole spectrum of choices that I've never even tried.

Maybe I'm right, maybe he is, doesn't really matter. I learned a lot from putting down my "guns of justice" down and talking around a campfire, and I think you could too.

andreas-wagner-eI-nOb1K5gE-unsplash
(Photo by Andreas Wagner on Unsplash)

DON'T FORGET TO LIKE COMMENT AND SUBSCRIBE, RING THAT BELL ICON SO YOU CAN KNOW WHEN ALL MY NEW BLOG POSTS COME OUT.

J/K, but you can leave a comment if you want.

Peace ✌️.

  • Gage

P.S: My coworker shared this with me and I think it relates

image

Discussion (0)