Building Without Frameworks: Why Simplicity Wins

A deep dive into why sometimes the best solution is not another framework, but pure HTML, CSS, and JavaScript. Exploring performance, maintainability, and developer happiness.

The Framework Paradox

We live in an era of abundance when it comes to web frameworks. React, Vue, Angular, Svelte, Astro—the list goes on. Each promises to solve problems, increase productivity, and make development easier. But what if the problem isn't the lack of a framework, but the framework itself?

I've spent the last five years working with various frameworks, and I've learned something valuable: not every project needs one. Sometimes, the best solution is the simplest one.

The Hidden Cost of Frameworks

When you adopt a framework, you're not just adding a library to your project. You're committing to:

  • Learning curve - New developers need to learn framework-specific patterns and conventions
  • Build complexity - Webpack, Babel, TypeScript configurations that feel like magic
  • Dependency management - Keeping dozens of packages up-to-date and handling breaking changes
  • Bundle size - Even minimal frameworks add kilobytes to your payload
  • Vendor lock-in - Migrating away becomes exponentially harder as your codebase grows
The paradox: The more we optimize for development speed, the more we complicate deployment and maintenance.

When Simple is Sufficient

Consider this: my personal portfolio site (anjaniraj.live) is built with pure HTML, CSS, and JavaScript. It's fast, responsive, and has every feature a modern portfolio needs:

  • Dark/light theme toggle with localStorage persistence
  • Responsive design for mobile, tablet, and desktop
  • Contact form with real validation
  • Newsletter signup integration
  • GitHub stats dashboard fetching real-time data
  • Smooth animations and transitions
  • Full accessibility support

Total size: 41 KB. No build process. No dependencies. No framework drama.

The JavaScript You Need to Know

Modern JavaScript (ES6+) is incredibly powerful. You don't need React's virtual DOM abstraction to:

  • Manage state with localStorage and data attributes
  • Handle dynamic UI updates with innerHTML and appendChild
  • Create responsive layouts with CSS Grid and Flexbox
  • Fetch and process API data with fetch()
  • Build smooth animations with CSS transitions and JavaScript timing

The key insight: JavaScript's native APIs have improved dramatically. What required jQuery 10 years ago, you can now do with vanilla JavaScript more elegantly.

Performance Matters

Let's talk metrics. A minimal React app, even with code splitting, typically loads at:

  • React library: ~40 KB (minified + gzipped)
  • App code: ~20-50 KB
  • Other dependencies: ~50+ KB
  • Total: 110+ KB minimum

A vanilla JavaScript site with similar features:

  • HTML: ~15 KB
  • CSS: ~10 KB
  • JavaScript: ~8 KB
  • Total: 33 KB

That's a 3x size difference. On a 4G connection, that matters.

Speed insight: The fastest code is the code you don't ship. Less JavaScript means faster page loads, better SEO, and happier users.

Maintainability Without Magic

Here's what I've learned about maintainability: code you understand is code you can maintain. When you write vanilla JavaScript, there's no "magic" happening behind the scenes. What you see is what you get.

Compare debugging experiences:

  • Framework: "Why isn't my component re-rendering?" → Check React DevTools → Check lifecycle methods → Check hooks dependency arrays → ???
  • Vanilla: "Why isn't my DOM updating?" → Add event listener → Update DOM → Test → Done

Simplicity is a debugging superpower.

When Frameworks Make Sense

I'm not anti-framework. Large single-page applications with complex state management absolutely benefit from React or Vue. When you have:

  • Thousands of lines of JavaScript logic
  • Complex state that changes frequently
  • Team of multiple developers needing shared patterns
  • Need for component reusability across projects

...then frameworks shine. They provide structure, tooling, and a common language for teams.

But for most websites, blogs, landing pages, and even moderately complex applications? Vanilla JavaScript is not only sufficient—it's superior.

The Future is Simple

I see a trend emerging: developers are rediscovering the power of simplicity. Projects like HTMX, Alpine.js, and Astro are gaining traction because they embrace a hybrid approach—adding just enough abstraction where it helps, but keeping the fundamentals simple.

The future isn't about finding the perfect framework. It's about finding the minimal viable solution that solves your specific problem.

Key Takeaways

  • Every framework has a cost—evaluate if the benefits outweigh it
  • Modern vanilla JavaScript is powerful enough for most use cases
  • Simpler code = easier to maintain, debug, and scale
  • Performance matters, and fewer dependencies mean faster delivery
  • Choose frameworks intentionally, not by default

The best code is the code that solves problems without creating new ones. Sometimes that's a framework. Often, it's not.