Divante.com Blog

Vue.js is one of the most important JavaScript frameworks in modern web development. This framework is a winning technology for agencies, but many are not so keen to shift from React or Angular. Why should agencies exploit Vue.js? Here’s my short analysis.

Personally, I think that the most interesting way to assess the advantages of Vue.js will be to compare it with a very similar (in my opinion) solution – more precisely with React.

Criteria for selecting a framework in an agency

The basic features of a framework that should be beneficial for any agency or software house are technical parameters like a small framework size, and efficiency of the compiled code.

Moreover, the framework should be well known and popular with programmers, or be easy to learn so that even a less experienced frontend developer can learn it and start using it in a short time. The framework should be secure and mature, but at the same time flexible, allowing you to adapt it to your own needs.

Does Vue.js meet these criteria? Let’s find out.

What is Vue.js framework?

Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UIs on the web. This solution is available under the MIT license. As of today, Vue.js has over 130,000 Github stars and is trusted by many followers worldwide.

What is important is that developers working with Vue.js simply enjoy it. The State of Vue.js Report claims that over 92% of respondents would use Vue.js again for their next project.


React and Vue.js top the list of Most Loved, dreaded and wanted web frameworks by Stack Overflow (source)

Vue.js vs React – basic similarities

What are the main similarities between React and Vue.js? Primarily, both are lightweight javascript libraries (in contrast to Angular). They are both set to use small, reusable components. The communities and popularity of these projects on Github are quite close and, therefore, we can expect similar popularity of both frameworks in the near future.

Both projects work with a Virtual DOM to increase the speed and efficiency of refreshing the DOM. Creating an application using Vue or React is easy thanks to dedicated CLI’s – Vue CLI and the Create React App. Both have very similar capabilities, built-in options and community support.

 

Headless eCommerce - Download FREE Book

 

As you can see, both frameworks work similarly, have similar possibilities and developing applications with them is equally enjoyable. So why then would I rather choose Vue?

Reasons to use Vue.js over React

Learning curve

The basic difference discussed very often, and with a huge impact on the profitability of using a framework, is its learning curve and low entry threshold. Getting started with Vue (for a JavaScript programmer) is achieved without a great effort. In my opinion, Vue is a much easier framework than React.

Simplicity of the framework

In addition to the simplicity of the library, official documentation also plays a critical role. In both cases documentation is complex, but for me, the Vue.js docs are much more readable, better systematized and more accessible. In combination with the ease of Vue, even a beginner Frontend Developer can quickly master the capabilities of this framework and begin developing his first applications based on this framework (much faster than with React).

Code readability

Another important aspect is code readability. In the case of React, the usage of JSX, and hence practically writing HTML, CSS, and JavaScript in one, common syntax, slightly reduces code readability. A clear division into sections of HTML, CSS and JavaScript code in Vue.js single file components makes the code much more readable. As a result of this, application maintenance is easier and requires fewer resources. At the same time, Vue.js also allows you to use JSX syntax – thanks to this, the framework is so flexible and allows programmers to choose which syntax suits them best.

Tools customization

Vue.js allows for strong customization of the used toolset, including: using Pug as an HTML framework or SCSS for CSS syntax. The possibility of using a scoped range of CSS is also extremely convenient. All these elements have a huge impact on the ease of both creating and maintaining an application written in Vue.js. Introducing a new developer to an existing project (in my opinion) is also much easier than in React projects, because of the high transparency of the application created using this framework.

Objects mutations in Vue.js

Each developer will also appreciate the easier (at least for the sake of clarity) mutation of the data object (Vue.js) rather than the mutation of the state object (React). It is also worth paying attention to much more transparent component lifecycle hooks. Vue.js also provides a convenient way to communicate between components (using EventBus). I will not, however, discuss this feature due to the possibility of using a global data store (Vuex and Redux) in both frameworks.

All the above-mentioned advantages of Vue influence, in my opinion, the much more productive work done with this framework.

Vue.js as a community-driven solution

Another advantage of Vue.js is the fact that it is a fully community-driven solution (in contrast to React). This is, in my opinion, a big advantage of Vue.js, not only for open source projects. Vue.js is a framework fully created by the community, which means that users can have an impact on the further development of the library.

The young age of Vue.js

In my opinion, another advantage of Vue.js is that it is a framework that is younger than React. Both libraries are stable and safe. While React as a product has had more time to achieve its present shape, Vue.js was able to learn from its predecessors. Thanks to this, Vue.js is a solution with such wide possibilities, high performance but is still so easy to implement.

The growing number of Vue.js specialists

I also think that, based on the interest of Vue.js on portals like Github, it is likely that, in the future, it will gain popularity much faster than React or Angular. Thanks to this, the labor market will also be filled with specialists in this library.

Benefits of Vue.js for agencies

So why then would I choose Vue.js? First of all, it is a framework which is much easier to master. Developers working with other frameworks can get to know Vue very quickly – when it comes to this, it is definitely unbeatable. We know this well, because Vue.js is the core of Vue Storefront – used in the Divante frontend PWA for eCommerce, which has already reached 4.5 thousand stars on Github, and the use of Vue.js is an important part of this success.

 

Enrich your eCommerce with a progressive web app. Start now >

 

Current trends indicate a significant increase in the popularity of this framework in the coming years. As the State of Vue.js reports, almost 60% of the survey participants believe Vue.js will become even more popular within their organizations in the next 12 months.

This will also greatly facilitate the recruitment of specialists already familiar with Vue. Vue is also a solution allowing for more productive and pleasant work (thanks to the wide adaptability of the framework to your own work preferences).

All these features, as well as the fact that Vue is a fully community-driven solution, make it the best choice for an open source framework, like Vue Storefront.

***

Check out how to create a successful product in the agency: www.divante.co/blog/building-a-successful-product-in-an-agency/

 

Krzysztof Krakos

Standard Frontend Developer at Divante eCommerce Software House. Passionate about Vue.js, React and other JavaScripts.

Share your comment