Skip to content
tezvyn:
Menu

Vue: The Progressive Framework Philosophy

Source: vuejs.orgEasyHow cards are made

Vue's progressive philosophy means you can use as little or as much of it as you need. Use it for a single interactive widget, or scale it up to a full SPA with official libraries.

Why it exists

Web development isn't one-size-fits-all. Some projects need a massive, structured framework from the start, while others just need to make a small part of a page dynamic. The "all or nothing" approach of many frameworks creates friction, forcing developers to adopt a heavy tool for a simple job. Vue was designed to bridge this gap.

The mental model

Think of Vue as a toolkit that grows with you. You can start by using just one tool—the core library—to add interactivity to a static HTML page, much like you would with jQuery. As your needs grow, you can reach back into the toolkit for more powerful, specialized tools like a router (Vue Router) or a state manager (Pinia) to build a full-blown application. You only carry the weight you need.

How it works

At its core, Vue is a library for rendering user interfaces that builds on standard HTML, CSS, and JavaScript. You can include it with a single script tag and start using it on any part of your page. This is the "library" end of the spectrum. For more complex applications, Vue provides an official ecosystem of libraries that are designed to work together seamlessly. By adding these, you "progress" from using Vue as a library to using it as a full framework.

When to use it

Use Vue when you value flexibility. It's ideal for teams that work on a variety of projects, from enhancing existing server-rendered pages (like a WordPress or Rails app) to building large-scale Single Page Applications (SPAs). It's also great for projects that you expect to start small but might grow in complexity over time.

When not to use it

If your team requires a highly opinionated, "batteries-included" framework where all major decisions are made for you from the start, a framework like Angular might be a better fit. The progressive approach requires you to make conscious decisions about which parts of the ecosystem to adopt, which can be a hurdle for teams preferring a single, prescribed path.

One canonical example

A common use case is enhancing an e-commerce site built with a traditional backend. You could use Vue to power just the shopping cart component. It would be a self-contained, reactive widget on an otherwise static page. If the site later evolves into a full SPA, you can expand Vue's role, add Vue Router to handle product pages, and use Pinia to manage the cart state across the entire application.

Interview question

What is the primary advantage of Vue's progressive philosophy for a project starting small but potentially growing into a full SPA?

  • a.It provides a highly opinionated structure that guides all development decisions from the start.
  • b.It enables developers to integrate only the necessary parts of its ecosystem, scaling functionality as needed.Correct
  • c.It offers a comprehensive, built-in suite of tools, eliminating the need for external libraries.
  • d.It mandates a complete frontend overhaul to ensure optimal performance and maintainability.
Why?

The progressive philosophy allows Vue to be adopted incrementally, starting with its core library for small enhancements and gradually integrating more of its ecosystem as the project's complexity grows. Option A is incorrect because Vue is designed to be less opinionated, offering flexibility rather than strict guidance from the outset.

Just read this? Test yourself on what you have been reading.

Read the original → vuejs.org

Put your scrolling time to good use

Learn one idea, try a quiz and save useful cards for revision. Tezvyn makes it easy to learn and stay current in your tech field, a few minutes at a time.

The iPhone app is on the way

We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.

Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.

Get it on Google PlayiPhone app coming soon

We are hiring for this. Open roles that interview on vue — each one lists the topics its interview covers.

See open roles