The need for Vue.js
There are a number of frontend frameworks available, and this is an ever evolving and changing landscape. The Vue.js ecosystem is, at this point in time, a very mature landscape, which offers numerous plugins and tooling built on top of it.
Vue.js is a community-driven open source project maintained and developed by people from all over the world. It originated as a personal side project by Evan You and has grown to a framework with high adoption by all types of organizations, such as NASA, Apple, Google, and Microsoft. Being funded by sponsorships from both companies as individuals, Vue.js is an independent framework.
Vue.js is currently on version 3, a breaking change from the previous version, although most patterns are still applicable. Vue.js 3 supports all ES2015-compatible browsers.
Let’s look at some reasons to choose Vue.js to build web applications:
- It’s performant because it was built to be optimized from the ground up.
- It’s lightweight, tree-shakeable, and ships only the code that is needed to run your application. The minimal code (after being optimized in a build step) is about 16 KB in size.
- It’s highly scalable, using preferred patterns such as Single File Components and the Composition API, which makes it suitable for enterprise applications.
Single File Components are part of the Vue.js philosophy where the template, script, and styling of a component are encapsulated in a single file, with the goal of improving the organization, readability, and maintainability of code.
The Composition API allows better organization and reuse of code throughout the application, which makes code more modular and easy to maintain.
On top of all these benefits, the learning curve is very accessible for entry-level developers. With syntax that is similar to classic HTML, JavaScript, and CSS notation, it’s easy to get started and find your way around.
In this chapter, we will guide you through the initial setup and go through the steps and setup that you can use as boilerplate for all future Vue.js projects. We will be adopting the recommended setup to make sure you will learn and apply best practices from the start.
We’ll first make sure that you have the developer environment set up so that you can start creating interactive web applications!