Servage Magazine

Information about YOUR hosting company – where we give you a clear picture of what we think and do!

What is Vue.js?

Tuesday, August 1st, 2017 by Servage

vueVue.js is a framework for building interactive user interfaces. It has gained quite a bit of popularity among front-end developers for being easy to use and working well in different types of projects. What is Vue.js more specifically and how does it work? Let’s find out.

Vue for Views

As the name might suggest, Vue.js is the V in MVC. You can use it to build the view side of your application without worrying about the rest of your technology stack because Vue.js works well with almost any type of back end.

Vue utilizes the same approach with a virtual DOM as React, making it fast to render changes on a page. It is also built around the same component-based workflow as React and Angular.

Since Vue is for the UI, it does not handle data persistence directly. Instead, if you want to store data permanently outside of a browser’s own local storage, you have to make it communicate with an API that has access to a database.

Vue.js uses a template engine similar to what you can find in other frameworks. Vue templates are built with HTML, and variables are put inside double curly brackets like usually in template engines for JavaScript. This is also called the mustache syntax.

Vue also supports directives which you can use to apply some additional effects to DOM elements. Filters are similar to pipes in Angular. They can be used to transform data to a different format inside elements. You can for example use a filter to convert a username to contain only lowercase letters.

Since Vue.js is a tool for building single-page applications, there is a router library that you can use to support multiple “virtual pages”. This is also similar to other frameworks. React and Angular have their own implementations for routing between pages.

Why Vue.js?

There are many other frameworks and libraries for building the UI of web applications like Angular and React. Why would a developer choose Vue over the other two popular choices?

We already covered one aspect of this. Vue is quite tolerant when it comes to choosing a back end for your project. It can be built with Lumen, Laravel, Phalcon or API Platform among many others.

Another advantage of Vue.js is being small and lightweight. The framework is under 20kB in production, which makes it load fast even on mobile devices. Even though Vue itself is small, it is capable of handling projects of any size.

Vue also claims to be easy to get started with, although what framework or library wouldn’t? The best way to find this out is to give it a try yourself!

What is Vue.js?, 5.0 out of 5 based on 1 rating
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

No comments yet (leave a comment)

You are welcome to initiate a conversation about this blog entry.

Leave a comment

You must be logged in to post a comment.