Mobile sales tools

7 Reasons to Use Vue.js

In the large pool of JavaScript frameworks and libraries, anyone could easily get lost in all the choices. Some frameworks have a lot of resources behind them, or hopeful hype that the framework will be the next great thing. At Pop Art, we took some time to evaluate a few potential choices for our project, BAM!, and decided that Vue.js fits in with our needs and how we like to work. Here are 7 factors that helped us determine that Vue.js was right for us.


1. Lightweight and ready to go

When dealing with front end development we often try to combine and reduce our filesdown to the smallest possible size. The less a user has to initially download, the sooner they can start using our products. Vue.js by itself comes in at a small 21kb download, which compared to other frameworks, is one of the smallest out there.

2. Components. Components for everything!

Modularity in development is a great thing. We can break down each section of ourprogram into reusable bits that all contain the logic they require in one small bundle. Vue.js does a great job with this, in that everything is a component. This is a small change from other frameworks where you may have a route, controller, view, and even component file. Knowing where to put your code when having so many choices can cause confusion, especially if you can place the same code in each part and still have similar outcomes.

3. Few opinions, greater options

Vue.js has very few opinions when it comes to building things with it. Coming from other frameworks where you’re dealing with very specific ideas and coding structures based directly on the framework, it’s refreshing. I actually feel like I’m writing JavaScript and can step back from the framework when dealing with a problem and approach it in a way I would do so with plain JavaScript. When dealing with too many opinions it’s sometimes questionable if I can do it the normal way, or if I will have to do it the specific framework’s way.

4. It’s just JavaScript

At Pop Art we have a heavy investment in JavaScript. We use Node.js for our back-end development on most projects and as work continues, we all learn and develop better standards when using JavaScript. While front-end development is very heavy in JavaScript already, it reinforces our knowledge of JavaScript to be able to write plain JavaScript in Vue.js. Framework blindness is a thing. You want to solve a problem, but you’re uncertain of how to solve it because you’re too busy looking at the documentation for whatever framework you’re using. Because Vue.js is so close to plain JavaScript, the solutions aren’t hidden behind some crazy function in the framework.

5. Documentation is key

When trying to learn something new, some of us tend to enjoy diving right in, while others may want to read the entire documentation before starting. My approach is to just start building, but regardless of your preference, documentation is key. Vue.js comes really well documented; in fact, it probably has some of the best documentation I’ve seen. The writing is very oriented towards humans, which is a great plus, and the code examples relate directly to the reading. The documentation is almost like reading a book on Vue.js. It’s easy to understand and pick up while helping guide you through the entire library. There is also a well documented API for Vue.js, which lists all the functions and their roles as well.

6. Popularity, hype, or large corporate backing?

When you ask a front-end developer what framework they use, you’ll often hear two main answers come up: Angular and React. We can agree that they’re both great in their own way, but for us, we evaluated Angular on the idea that we would jump into Angular 2. Being that it’s still in beta, we couldn’t really justify working with that right now. React would have been our other choice, and came really close to being picked, but the use of JSX really lost our interest.

While you have Google and Facebook backing their own frameworks, Vue.js comes down to one guy and the help of various contributors. Evan You is the creator of Vue.js, and he’s done a great job at taking some of the better parts of Angular and React and combining them together into one small package.

7. An evolving ecosystem

By itself, Vue.js only provides the “view” layer of our application. While that may be enough for some uses, we wanted to look further and bring more functionality to our projects. For a simple routing mechanism, Vue-Router does a great job. It’s very lightweight and allows for promises to resolve and authorization checks before enabling a route. Vuex is another library inspired by Flux, which defines a better approach to handling data throughout the application. Instead of sending data down a chain of nested components and sending the actions back up to the parent components, Vuex allows us to have a central store to create actions and different trees of data for our application.

It Is Decided

In the end, we decided to go with Vue because it’s lightweight and fits easily into existing websites, but also has all the power needed to develop new projects from the ground up. In addition with the recent announcement of Vue 2.0, we’re excited to see the development made by Evan and other collaborators on Vue.