From JS Chaos to TypeScript Zen: A Backend Programmer’s Path to Enlightenment

Dude, let me guess.

Are you a backend programmer? Spending your days with Java’s Spring, Rust’s Axum, or Python’s Django, enjoying that “everything’s under control” feeling that comes with strong types and rigorous architecture?

Then, you glance at the colorful JavaScript code on your frontend colleague’s screen, and a smirk crosses your face.

“Tch, you call that programming?”

If I hit the nail on the head, don’t worry. Because I used to be just like you.

I love JavaScript. I was there when it was a wild, untamed beast. Not because it was elegant, nor because its logic was clear, but because it had something no other language could touch:

The raw, primal power to command every screen in the browser!

Today, many people look at modern JavaScript, fully armed with TypeScript and React, and nod, saying, “Well, at least it’s usable now.”

But I saw its value long before it “cleaned up its act.”

This article isn’t a tutorial. It’s the journey of a backend veteran from “contempt” to “true love.” If you’re a backend developer who still holds a prejudice against JS, I just want to say one thing to you:

Stop resisting the web’s tide. You should be riding it!

Back in the Day, JavaScript Was the Wild West

In the distant 2010s, writing JS was like walking a tightrope blindfolded.

  • Global variables were everywhere, polluting the entire world with a single misstep.
  • The love-hate relationship between == and === could make you question your sanity during debugging.
  • No modules, no types, and don’t even get me started on linting tools.
  • IE, Chrome, Firefox were a triad of kingdoms; one piece of code, three ways to die.

Back then, you weren’t writing applications; you were dancing in a minefield.

For example, this ancient piece of code is now a “crime scene”:

// JS code from the barbaric era
function doStuff(a, b) {
  if (a == b) { // God knows what implicit conversion will happen here
    alert("They match");
  }
}

But even so, I loved that feeling. It was like “hacking” into the real world. I used raw DOM manipulation to create forms, animations, and slideshows. Although the code was hideous, it ran, and it ran on everyone’s computer!

The Dawn Before the Light: jQuery, ES6, and the Return of Sanity

Then, the wave of change arrived.

  • jQuery burst onto the scene, this “great benefactor” made DOM manipulation less anti-human.
  • JSON became the universal language of APIs, and frontend and backend finally had a common way to communicate.
  • ES6 descended like a god, with let/const, arrow functions, Promises… It made JS finally look like a “proper” language.
  • Node.js blew open the backend’s doors, and JS stepped out of the browser for the first time, starting to stir things up on the server-side.

Suddenly, JS was no longer just a “clown script” in the browser; it became a real language.

I saw many old-school developers sneer at it: “Still too loose, no discipline.”

But I dove right in. Because I could feel that this chaos was breeding a great order.

Today’s JS: Type-Safe, Framework-Powered, Armed to the Teeth

Fast forward to today. The JavaScript I write now and the one I wrote when I first started are two completely different species.

  • TypeScript brought us the type safety we backend folks love.
  • React/Vue let us elegantly abstract UI with a component-based mindset.
  • Vite/Webpack provide a lightning-fast build experience.
  • ESLint + Prettier keep your code tidier than your desk.
  • Jest/Playwright make automated testing a breeze.
  • Node/Deno/Bun are dominating in the backend and tooling space.

Look at the code now. Is this still the “weakling” you remember?

// Modern TypeScript + React code snippet
type User = { id: number; name: string };

const UserCard: React.FC<{ user: User }> = ({ user }) => (
  <div className="card">{user.name}</div>
);

This is no longer a toy. This is the industrial-grade engine driving countless real business systems.

Backend Gurus, Please, Stop Hiding from JavaScript!

If you come from the world of Rust, Go, or Java, I completely understand your hesitation.

JS feels… so different, so messy.

But if you choose to ignore it completely, you will lose:

  • Control over the frontend: You will always be at someone else’s mercy.
  • The ability to build full-stack applications: You can only be “half” a programmer.
  • Missing the wave of SSR/SPA/Edge Computing: These technologies can greatly enhance product experience.
  • Heavy reliance on third-party UI teams: High communication costs, low efficiency.

You don’t need to become a React master. But you must have:

  • Basic JS language skills
  • The ability to read and write TypeScript
  • An understanding of the philosophy behind mainstream frameworks
  • The ability to independently debug issues in the browser

Because guess what?

Even if you use Blazor or Razor Pages, your code ultimately runs in a browser that speaks only one language. And that language is JavaScript.

Connecting the Dots: When Rust and TypeScript Start Speaking the Same Language

For me, the most magical moment was when I realized I could share the same business logic between the frontend and backend without any discrepancies.

Let me tell you about a bug I once chased for days.

My UI kept telling users the order was “ready to ship,” but the backend hadn’t confirmed it yet. The users were angry, and I was on the verge of a breakdown.

Why? Because the frontend and backend had a slightly different definition of “ready to ship.”

In my Rust code, the logic was like this:

// lib.rs
#[derive(serde::Serialize)]
pub struct Order {
    pub status: String,
    pub total: f64,
}

impl Order {
    pub fn is_shippable(&self) -> bool {
        self.status == "Confirmed" && self.total >= 50.0
    }
}

But in JavaScript, the check was a bit looser, and over time, the logic here became more complex, eventually leading to inconsistency.

Until I found the magic tool ts-rs. It can directly generate TypeScript type definitions from my Rust data structures.

This means:

  • The API’s data structures are automatically generated as TypeScript types, so they can’t be wrong.
  • Enums and constants are shared between frontend and backend, always in sync.
  • A strongly-typed API client makes calling the backend as simple as calling a local method.

Now, whenever I modify the is_shippable logic in the backend, the frontend’s type definitions update automatically. Modify in one place, sync everywhere.

Friends, this isn’t for convenience; this is to save our hair!

JavaScript Was Never the Problem; Ignorance and Prejudice Are

The truth is:

JavaScript’s victory wasn’t because it was born beautiful.

It’s because it’s everywhere.

And now that it has become structured, typed, and battle-tested, we really have no excuse to shut it out anymore.

If that phrase is still echoing in your head:

“I don’t like JS; it’s just a mess.”

Then you’re still living in 2010. The 2025 JavaScript tech stack is lean, powerful, and trustworthy.

For those of us who have spent years in the backend world pursuing rigor and perfection, embracing modern JavaScript is not a step backward. It’s unlocking your next superpower.

Don’t hesitate anymore.

Go write a Hello World in TypeScript. Go play with Vue or React. Go write a command-line tool with Node.

Soon, you’ll stop asking, “Why JavaScript?”

And start exclaiming:

“Why didn’t I start sooner?”


Follow the Mengshou Programming WeChat official account to unlock more black technology.