Interviews / Technology / Top Stories /

Meet Vue.js, the Flexible JavaScript Framework

2 Aug 2017 6:00am, by

The JavaScript-based Vue.js front end framework has been gaining popularity since its first release in 2014. One recent Quora question tracked the growth of the framework and compared it favorably to Angular and React. This year, the framework has continued to grow in popularity, even in a time where most other non-Google, non-Facebook front-end frameworks JavaScript frameworks have been on the decline.

The reason for this popularity and growth seems to be the flexibility of the framework. Vue.js doesn’t try to shoehorn you into doing things one specific way, as some other popular JavaScript frameworks might. This means small the framework is equally adept at being a small piece of a larger application as it is being the entire front-end.

The center of the Vue.js community was in Poland last month for VueConf, where the best and brightest spoke about the framework, and how it’s evolving. We caught up with Damian Dulisz, one of the conference’s organizers, and a contributor to the Vue.js framework after the Polish “rendezvous” (get it?), and asked him some questions about the project and its users.

How was VueConf? 

VueConf was a one of a kind experience and for me probably the biggest challenge I’ve faced as a developer. Around 350 people from all around the world came to Wrocław, Poland. Which I think is a huge success given the fact that it was an unknown city for most of the attendees. I can say “most,” because around 3/4 of all attendees were not from Poland.

I think every talk was really good, but I might be biased as an organizer. However, I really enjoyed the talks by Roman Kuba about testing — he had an incredible connection with the crowd. Filipa Lacerda also gave a very insightful talk about the approach GitLab has taken to migrate it’s app to Vue. Most of the talks are already on our YouTube Channel. There’s also a really cool after movie!

What are some of the problems you have encountered in front-end development in the past that are solved by using Vue?

I think it really depends on how far into the past you want to go since all the modern front-end frameworks try to solve similar problems.

Where I think Vue does really shine is at making complex things much more approachable. It’s not as verbose as React, in that it automates the repeatable stuff, but still keeps the API surface very small compared to frameworks like Angular and Ember. Due to the way the API is designed, it also makes it much harder to write sub-optimal code or bad code in general.

Additionally, I really love is the idea of Single-File Components that connect the template (which is just a domain specific language [DSL] for a render functions — unlike some popular belief), the JavaScript part and the styles into a self-contained component. This makes the code so much easier to understand and reason about. This is especially true in a development agency model, where the people inside a project tend to rotate more often. This makes it much easier to introduce someone new to the project and significantly shortens the time the person needs to be productive.

Why did you choose to use Vue in your client work? Is there a specific benefit, ROI, or something else that made you choose it?

There are several reasons but I think the most important one is how flexible Vue is. It really deserves the “progressive framework” name! I think that’s very important for an agency, given the wide spectrum of projects we get. Not every project needs to be a full blown single page application.

Not every project is started from scratch. Sure, one should always pick the right tool based on the project needs. However, sometimes you just want to start small and move fast. Vue can be used in the same, effective way both as a simple jQuery replacement without a build step as well as a server-side rendered isomorphic app and everything in between. Just watch the mentioned talk about GitLab to learn more about their transition from jQuery to Vue. All without a need for a huge refactoring. It can grow along with your project and easily adjust to its needs.

Additionally, being able to use the same tool for multiple use cases helps with the overall exchange of knowledge within the whole company. Cross-project code reviews are also much easier.

How big is the community? is Vue moving fast? Too fast? Is it stable?

I’d say it’s actually quite large already. VueConf might just have been a nice example of that. The community also thrives in places like the official Vue forum and Gitter channel. More recently there’s also an official Discord channel. A large community also means a wide range of supporting libraries and that’s how it looks currently — just take a look at awesome-vue. Additionally, the Vue Core Team is working on Vue-curated, which is a list of recommended and battle-tested libraries for different problems, which should solve some of the “fatigue.” I already feel that there’s a library in the ecosystem for everything you need.

Is Vue moving fast? Certainly. Too fast? Wouldn’t say so. Is it stable? Definitely yes!

Evan You, (Vue creator) along with the core team has a really great sense of what features should make it into the core libraries (not just Vue itself, but also vue-router, vuex and others). Even though the 2.0 release was a complete rewrite, the migration was painless as most of the API (more than 90 percent) stayed the same. The team also released the vue-migration-helper that analyses your app and generates a list of the needed changes, how to implement them and why often suggesting already migrated code. Not just for Vue itself, but for the supporting libraries as well.

What would you hope to see in the future from Vue? Additions, new capabilities? Fixed issues?

I actually think that the API is great as it is right now. The additions I would like to see are mostly related to testing experience — which currently is just “OK”, but could be improved. Thankfully, this is being worked on as we speak by several contributors and members of the Core Team. I think we can expect a really helpful testing-library along with a comprehensible guide.

However, what I wish got some love is Weex (a React-native-like solution for Vue) that was recently transferred to the Apache Foundation. Technically it’s production ready and several Chinese companies already use it (Alibaba among them), sadly it’s still quite a mystery outside of Asia due to limited learning resources. Hopefully, this gets better in the coming months.

Feature image via Pixabay.


A digest of the week’s most important stories & analyses.

View / Add Comments