{"id":18313,"date":"2018-04-12T11:30:00","date_gmt":"2018-04-12T11:30:00","guid":{"rendered":"https:\/\/www.heartinternet.uk\/blog\/?p=18313"},"modified":"2018-04-12T11:30:00","modified_gmt":"2018-04-12T11:30:00","slug":"5-reasons-developers-are-switching-to-vue-js-from-other-frameworks","status":"publish","type":"post","link":"https:\/\/www.heartinternet.uk\/blog\/5-reasons-developers-are-switching-to-vue-js-from-other-frameworks\/","title":{"rendered":"5 reasons developers are switching to Vue.js"},"content":{"rendered":"<p>The <a href=\"https:\/\/vuejs.org\/\">Vue.js<\/a> framework is quickly gaining in popularity, and although it won\u2019t have the market share of other frameworks for a while, more and more companies are considering it for projects. So let\u2019s dive into how it compares with other frameworks and some of the reasons why it might be your next framework. I\u2019ve built a similar application using <a href=\"https:\/\/github.com\/planetoftheweb\/jquery-interface-645062-\" target=\"_blank\">jQuery<\/a>, <a href=\"https:\/\/github.com\/planetoftheweb\/reactinterface\" target=\"_blank\">React<\/a> and <a href=\"https:\/\/github.com\/planetoftheweb\/vueinterface\" target=\"_blank\">Vue.js.<\/a> You can see <a href=\"http:\/\/planetoftheweb.com\/exercises\/vueinterface\/\" target=\"_blank\">a sample of the working app built with Vue.js here<\/a>.<\/p>\n<p align=\"center\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-18318\" src=\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/vujs-example-e1522837246915.png\" alt=\"Screenshot of the github repository for the Vue.js app\" width=\"650\" height=\"465\" \/><\/p>\n<h2>Installation<\/h2>\n<p>In a way, getting started with Vue.js is similar to getting started with a framework like jQuery and the original AngularJS (Angular 1). Although you can install the framework in a couple of ways, just like with jQuery, you can simply load up a script tag from either a CDN or a single script tag to get started.<\/p>\n<p><code>&lt;script src=\"https:\/\/cdn.jsdelivr.net\/npm\/vue\"&gt;&lt;\/script&gt;<\/code><\/p>\n<p>That\u2019s all you need for most simple applications. Compare that with <a href=\"https:\/\/angular.io\/guide\/quickstart\" target=\"_blank\">Angular\u2019s quickstart<\/a>, or even <a href=\"https:\/\/reactjs.org\/docs\/add-react-to-a-new-app.html\" target=\"_blank\">React\u2019s installation process<\/a> where you must depend on a complex terminal Command Line Interface (CLI) to get even simpler applications working. Simplicity matters when you either want to get simple things working without a lot of overhead or are just starting to learn the features of a framework or library.<\/p>\n<p>What do you get with that script tag? You get a lot of powerful features like a built-in data-binding and templating engine. If you look at the simplest Vue.js example, this becomes obvious:<\/p>\n<p><code>&lt;div id=\"app\"&gt;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;p&gt;{{ message }}&lt;\/p&gt;<br \/>\n&lt;\/div&gt;<br \/>\n&lt;script&gt;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;new Vue({<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;el: '#app',<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;data: {<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;message: 'Easy templating'<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});<br \/>\n&lt;\/script&gt;<\/code><\/p>\n<p>The templating language is tightly coupled into Vue.js. Like many other templating engines, it uses double curly braces <code>{{ }}<\/code> to bind data to your template. That means the information in our data variable we pass after our new Vue statement is immediately available inside our application. You declare a Vue application using regular JavaScript that passes along a configuration object, which is similar to what you do when you configure an element in jQuery. This configuration object includes things like the element <code>el<\/code> that you want the application to target in the DOM as well as some JSON data that you want to pass as a variable.<\/p>\n<p>From jQuery\u2019s perspective, you can see that Vue.js is an entirely different animal. Templating or data-binding is something that you have to add to jQuery as additional plug-ins. Let\u2019s look at a more complicated example and the next reason why people are switching to Vue.js.<\/p>\n<h2>State vs DOM Management<\/h2>\n<p>Another reason why Vue.js is becoming popular is something introduced in other frameworks like React and that is a focus on <strong>state<\/strong>, which is the status of the data in your application. In a library like jQuery or regular JavaScript, you have to target some element in the DOM and then do something based on an event related to that element.<\/p>\n<p align=\"center\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-18320\" src=\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/vujs-appointment.png\" alt=\"Screenshot of the Vue.js app with an arrow pointing to Add Appointment\" width=\"650\" height=\"547\" \/><\/p>\n<p>So, let\u2019s say you wanted to toggle the visibility of an element. In jQuery, you could do something like this:<\/p>\n<p><code>$('.apt-addheading').on('click',function() {<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$('.card-body').toggle(300);<br \/>\n});<\/code><\/p>\n<p>This says, look for an element with a class of <code>apt-addheading<\/code>, and when the user clicks on it, then look for another element with a class of <code>card-body<\/code>. If that element is visible, hide it and if that element is hidden, then show it. Vue.js\u2019 approach to this is wildly different:<\/p>\n<p><code>&lt;div class=\"panel-heading apt-addheading\"<br \/>\n@click=\"hidepanel=!hidepanel\"&gt;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;span class=\"glyphicon glyphicon-plus\"&gt;&lt;\/span&gt; Add Appointment<br \/>\n&lt;\/div&gt;<br \/>\n&lt;!-- panel-heading --&gt;<br \/>\n&lt;div class=\"card-body\" :class=\"{ hide: hidepanel }\"&gt;<br \/>\n...<\/code><\/p>\n<p>First, you\u2019ll notice that while we do things in jQuery inside JavaScript and outside our HTML code, in Vue, the JavaScript as well as the HTML live together in one place. The template in Vue.js has HTML code with references to scripts. It\u2019s why the Vue.js version seems longer. In this version, we are tracking the click with the <code>@click<\/code> event handler. This handler uses a variable called <code>hidepanel<\/code>. The value of that variable is toggled every time we click on the <code>panel-heading<\/code> element. In our Vue.js version, the element with the class of <code>card-body<\/code> gets a parameter called <code>:class<\/code> that will assign the value of a class called <code>hide<\/code> if the value of <code>hidepanel<\/code> is true.<\/p>\n<p>If you\u2019ve never seen this type of coding before, it will probably freak you out, because it requires a shift in thinking. In Vue.js and other modern frameworks, the application\u2019s state is what drives what is happening in your interface. We don\u2019t worry so much about manipulating elements in the DOM because our application \u2018reacts\u2019 to the value of data instead. From now on when the value of the <code>hidepanel<\/code> variable changes, the visibility of that panel changes as well.<\/p>\n<p>So then it become easier to modify your interface because all you have to do is modify the data. Let\u2019s say, for example, that you wanted to hide the panel when a user submits a new appointment. With jQuery, you\u2019d have to remember to issue a <code>.hide()<\/code> method on the DOM element. With Vue.js, you simply set the <code>hidepanel<\/code> variable to <code>true<\/code>. The difference is that with Vue you\u2019re never really worried about what the DOM is doing, you\u2019re always just changing values in your application.<\/p>\n<p>This reminds me of the third reason why people switch to building applications with Vue.js and that\u2019s the Virtual DOM.<\/p>\n<h2>Virtual DOM<\/h2>\n<p>The virtual DOM isn\u2019t something that\u2019s unique to Vue.js. It\u2019s one of the reasons that the React framework is so popular. The virtual DOM means that the framework takes care of making changes to the DOM for you. The DOM is a representation of what the page looks like. Frameworks like React and Vue.js create an intermediate DOM, called the virtual DOM.<\/p>\n<p>This virtual DOM gets updated only when it needs to be.<\/p>\n<p>Say, for example, that you create an application that shows the first 10 records worth of data and then you fill out a form that causes a record to be added at the end of that list (an 11th record). Instead of redrawing the website, the framework writes the changes to the virtual DOM as if it were the regular DOM. Then Vue.js compares the virtual DOM to the regular DOM. Since you\u2019re only displaying the first 10 records, it notices that no changes need to be made to the real DOM.<\/p>\n<p align=\"center\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-18322\" src=\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/vuejs-apt-1.gif\" alt=\"Animated GIF of the Vue.js example in action with the Console also in view\" width=\"650\" height=\"469\" \/><\/p>\n<p>If you take a look at this application, you can see that Vue.js injects your DOM with lots of data attributes and updates it on the fly as your data changes. The data drives the interface when you do a search or when you delete an element. Here\u2019s some code for a component in Vue.js that displays this list.<\/p>\n<p><code>&lt;template&gt;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ul class=\"appointment-list\"&gt;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;appointment-item <br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;v-for=\"(item, i) in appointments\"<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:appointment=\"item\"<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:key=\"i\" \/&gt;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;\/ul&gt;<br \/>\n&lt;\/template&gt;<br \/>\n&lt;script&gt;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;import AppointmentListItem from '.\/AppointmentListItem.vue';<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;export default {<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name: 'AppointmentList',<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;props: ['appointments'],<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;components: {<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'appointment-item': AppointmentListItem<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, \/\/components<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} \/\/export<br \/>\n&lt;\/script&gt;<\/code><\/p>\n<p>This code is pretty simple and it doesn\u2019t show the template for the individual list items, which is being imported in line 11. <a href=\"https:\/\/github.com\/planetoftheweb\/vueinterface\/blob\/master\/process\/AppointmentListItem.vue\" target=\"_blank\">You can find that code here<\/a>. \u00a0But you can see that this component receives some data from the main component in a variable called <code>appointments<\/code> and then lists the items in that list.<\/p>\n<p>The important thing is that this component has a single, very focused job\u2026 to display the list. It doesn\u2019t care about what happens when someone adds or deletes a record. The virtual DOM works with Vue.js to react to changes in our appointments list. When it notices a change, it looks at this component and writes any changes from one of those operations into the virtual DOM. Vue.js then compares that with the actual DOM and updates it only if it needs to. The virtual DOM is Vue.js\u2019 killer app. It just works and makes working with the DOM faster and more efficient.<\/p>\n<h2>Components<\/h2>\n<p>All modern frameworks like Angular, React and Vue are based on a component architecture. That means that we no longer write huge applications, but break them up into mini components that we put together in order to create larger apps. This is especially powerful when combined with the rest of the reactive virtual DOM we\u2019ve been looking at.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-18326\" src=\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/vuejs-appointment-3.png\" alt=\"Screenshot of the Vue.js app indicating the three pieces of the application\" width=\"650\" height=\"541\" \/><\/p>\n<p>You can break an application up into pieces and each piece can focus on performing a specialised task. So, you could break an application into a component that displays a list of records, another component that allows you to search through those records and another one that allows you to add a record. Here\u2019s the actual code in our main component.<\/p>\n<p><code>&lt;template&gt;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div id=\"main-app\"&gt;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;add-appointment<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@addRecord=\"addAppointment\" \/&gt;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;search-appointments <br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:myKey = \"filterKey\"<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:myDir = \"filterDir\"<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@searchRecords='searchAppointments'<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@keyChange = \"changeKey\"<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@dirChange = \"changeDir\" \/&gt;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;appointment-list<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:appointments = 'filteredApts'<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@remove = 'removeItem' \/&gt;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;\/div&gt;<br \/>\n&lt;\/template&gt;<\/code><\/p>\n<p>This code is beautiful in its simplicity, but it also reveals that our components only need to worry about few things. Data is passed to a component via <code>props<\/code> or properties that look like HTML attributes, so our appointment list gets passed <code>:filteredApts<\/code>. These are appointments that have been pre-sorted by search or sort. It also receives information should a <code>@remove<\/code> event take place (more on that later).<\/p>\n<p>The beautiful thing about Vue.js is that our components don\u2019t need to be worried about what the other components need to do. Our list component is only concerned with listing data, our search and our add components only worry about their individual functionality.<\/p>\n<p>Let\u2019s say that our <code>add-appointment<\/code> component adds a record to our data. Our <code>appointment-list<\/code> component will simply notice that a change has been made to the app\u2019s data and redraw our list based on the new data. With something like jQuery, you have to do two things, modify the data and update the DOM based on that modification. With Vue.js, you only worry about modifying the data. Each component works independently from each other to do its small tasks. It makes applications easier to manage and update.<\/p>\n<p>If you need to, you handle communication between the components through internal events by emitting custom events when things happen. The events pass information between components and can make it easier to manage the application. That\u2019s another reason people really love these new framework structures.<\/p>\n<h2>Event Architecture<\/h2>\n<p>Events in Vue.js can help you make your application easier to manage because they can be passed along through the components up to your main application. Let\u2019s take a look at how we would go about deleting a record in our application.<\/p>\n<p><code> &lt;button @click=\"requestRemoval\"&gt;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;...<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;methods: {<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;requestRemoval: function() {<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.$parent.$emit('remove', this.appointment);<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, \/\/requestremoval<\/code><\/p>\n<p>This simplified example from our <a href=\"https:\/\/github.com\/planetoftheweb\/vueinterface\/blob\/master\/process\/AppointmentListItem.vue\" target=\"_blank\">AppointmentListItem component<\/a> shows you that you can capture events inside individual components, but because our events are designed to modify data, it\u2019s better to send these events up our component chain to the main component. So we have a local method called <code>requestRemoval()<\/code> that passes information about the appointment to be deleted to our main <a href=\"https:\/\/github.com\/planetoftheweb\/vueinterface\/blob\/master\/process\/App.vue\" target=\"_blank\">App.vue component<\/a>. This component runs a separate event, called <code>removeItem<\/code>, that deletes the data. Here\u2019s that entire function.<\/p>\n<p><code>removeItem: function(apt) {<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.theAppointments = _.without(this.theAppointments, apt)<br \/>\n}, \/\/removeItem<\/code><\/p>\n<p>I\u2019m using the awesome <a href=\"https:\/\/lodash.com\/docs\/4.17.5\" target=\"_blank\">lodash library<\/a> to remove an element from our data, but you\u2019ll notice that at no time do I worry about the DOM in this sample. I simply have events navigate through the components to modify data. The rest of the app is similar, my search or sort modifies the <code>fiteredApts<\/code> variable. When that changes, the list will automatically be re-drawn.<\/p>\n<h2>Conclusion<\/h2>\n<p>Clearly Vue.js presents a new way of thinking about applications. It\u2019s vastly different from the approach you\u2019d use if you were building something with jQuery or JavaScript. Angular gives you some of these features, but has a significantly higher barrier to entry and a much more complex installation process. React is closer in features, but it uses a special language called JSX. While JSX is very similar to the way you work with Vue.js components, Vue.js has a language that is closer to and feels more like JavaScript.<\/p>\n<p>If you really want to see the differences, take a look at the projects I built with <a href=\"https:\/\/github.com\/planetoftheweb\/jquery-interface-645062-\" target=\"_blank\">jQuery<\/a>, <a href=\"https:\/\/github.com\/planetoftheweb\/reactinterface\" target=\"_blank\">React<\/a> and <a href=\"https:\/\/github.com\/planetoftheweb\/vueinterface\">Vue.js.<\/a> You can also watch my courses <a href=\"https:\/\/www.linkedin.com\/learning\/vue-js-building-an-interface\/binding-classes-and-triggering-events?trk=insiders_6787408_learning\" target=\"_blank\">Vue.js: Building an Interface<\/a> and <a href=\"https:\/\/www.linkedin.com\/learning\/building-a-web-interface-with-react-js\/updating-search-dynamically?trk=insiders_6787408_learning\" target=\"_blank\">Building a Web Interface with React.js<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Find out why Vue.js is gaining in popularity as a JavaScript framwork and why it might be right for your next project in this introductory guide by Ray Villalobos, a full-stack design and development instructor.<\/p>\n","protected":false},"author":2,"featured_media":18371,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,24],"tags":[],"class_list":{"0":"post-18313","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-guest-posts","8":"category-web-design"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>5 reasons developers are switching to Vue.js - Heart Internet<\/title>\n<meta name=\"description\" content=\"Find out why Vue.js is gaining in popularity as a JavaScript framwork and why it might be right for your next project in this introductory guide by Ray Villalobos, a full-stack design and development instructor.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.heartinternet.uk\/blog\/5-reasons-developers-are-switching-to-vue-js-from-other-frameworks\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"5 reasons developers are switching to Vue.js - Heart Internet\" \/>\n<meta property=\"og:description\" content=\"Find out why Vue.js is gaining in popularity as a JavaScript framwork and why it might be right for your next project in this introductory guide by Ray Villalobos, a full-stack design and development instructor.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.heartinternet.uk\/blog\/5-reasons-developers-are-switching-to-vue-js-from-other-frameworks\/\" \/>\n<meta property=\"og:site_name\" content=\"Heart Internet\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/heartinternet\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-04-12T11:30:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2018\/04\/glasses-on-laptop2.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"433\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Eliot Chambers-Ostler\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@heartinternet\" \/>\n<meta name=\"twitter:site\" content=\"@heartinternet\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Eliot Chambers-Ostler\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"13 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.heartinternet.uk\/blog\/5-reasons-developers-are-switching-to-vue-js-from-other-frameworks\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.heartinternet.uk\/blog\/5-reasons-developers-are-switching-to-vue-js-from-other-frameworks\/\"},\"author\":{\"name\":\"Eliot Chambers-Ostler\",\"@id\":\"https:\/\/heartblog.victory.digital\/#\/schema\/person\/58ed7f27cc0f3ab6e69135742a5eee28\"},\"headline\":\"5 reasons developers are switching to Vue.js\",\"datePublished\":\"2018-04-12T11:30:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.heartinternet.uk\/blog\/5-reasons-developers-are-switching-to-vue-js-from-other-frameworks\/\"},\"wordCount\":1937,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\/\/heartblog.victory.digital\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.heartinternet.uk\/blog\/5-reasons-developers-are-switching-to-vue-js-from-other-frameworks\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2018\/04\/glasses-on-laptop2.jpg\",\"articleSection\":[\"Guest Posts\",\"Web Design\"],\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.heartinternet.uk\/blog\/5-reasons-developers-are-switching-to-vue-js-from-other-frameworks\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.heartinternet.uk\/blog\/5-reasons-developers-are-switching-to-vue-js-from-other-frameworks\/\",\"url\":\"https:\/\/www.heartinternet.uk\/blog\/5-reasons-developers-are-switching-to-vue-js-from-other-frameworks\/\",\"name\":\"5 reasons developers are switching to Vue.js - Heart Internet\",\"isPartOf\":{\"@id\":\"https:\/\/heartblog.victory.digital\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.heartinternet.uk\/blog\/5-reasons-developers-are-switching-to-vue-js-from-other-frameworks\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.heartinternet.uk\/blog\/5-reasons-developers-are-switching-to-vue-js-from-other-frameworks\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2018\/04\/glasses-on-laptop2.jpg\",\"datePublished\":\"2018-04-12T11:30:00+00:00\",\"description\":\"Find out why Vue.js is gaining in popularity as a JavaScript framwork and why it might be right for your next project in this introductory guide by Ray Villalobos, a full-stack design and development instructor.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.heartinternet.uk\/blog\/5-reasons-developers-are-switching-to-vue-js-from-other-frameworks\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.heartinternet.uk\/blog\/5-reasons-developers-are-switching-to-vue-js-from-other-frameworks\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.heartinternet.uk\/blog\/5-reasons-developers-are-switching-to-vue-js-from-other-frameworks\/#primaryimage\",\"url\":\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2018\/04\/glasses-on-laptop2.jpg\",\"contentUrl\":\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2018\/04\/glasses-on-laptop2.jpg\",\"width\":1024,\"height\":433},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.heartinternet.uk\/blog\/5-reasons-developers-are-switching-to-vue-js-from-other-frameworks\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.heartinternet.uk\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"5 reasons developers are switching to Vue.js\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/heartblog.victory.digital\/#website\",\"url\":\"https:\/\/heartblog.victory.digital\/\",\"name\":\"Heart Internet\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/heartblog.victory.digital\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/heartblog.victory.digital\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/heartblog.victory.digital\/#organization\",\"name\":\"Heart Internet\",\"url\":\"https:\/\/heartblog.victory.digital\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/heartblog.victory.digital\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2025\/02\/HeartInternet_Logo_Colour.webp\",\"contentUrl\":\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2025\/02\/HeartInternet_Logo_Colour.webp\",\"width\":992,\"height\":252,\"caption\":\"Heart Internet\"},\"image\":{\"@id\":\"https:\/\/heartblog.victory.digital\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/heartinternet\/\",\"https:\/\/x.com\/heartinternet\",\"https:\/\/www.linkedin.com\/company\/heart-internet-ltd\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/heartblog.victory.digital\/#\/schema\/person\/58ed7f27cc0f3ab6e69135742a5eee28\",\"name\":\"Eliot Chambers-Ostler\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/heartblog.victory.digital\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2025\/08\/cropped-Eliot-96x96.jpg\",\"contentUrl\":\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2025\/08\/cropped-Eliot-96x96.jpg\",\"caption\":\"Eliot Chambers-Ostler\"},\"url\":\"https:\/\/www.heartinternet.uk\/blog\/author\/eliot-chambers-ostler\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"5 reasons developers are switching to Vue.js - Heart Internet","description":"Find out why Vue.js is gaining in popularity as a JavaScript framwork and why it might be right for your next project in this introductory guide by Ray Villalobos, a full-stack design and development instructor.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.heartinternet.uk\/blog\/5-reasons-developers-are-switching-to-vue-js-from-other-frameworks\/","og_locale":"en_GB","og_type":"article","og_title":"5 reasons developers are switching to Vue.js - Heart Internet","og_description":"Find out why Vue.js is gaining in popularity as a JavaScript framwork and why it might be right for your next project in this introductory guide by Ray Villalobos, a full-stack design and development instructor.","og_url":"https:\/\/www.heartinternet.uk\/blog\/5-reasons-developers-are-switching-to-vue-js-from-other-frameworks\/","og_site_name":"Heart Internet","article_publisher":"https:\/\/www.facebook.com\/heartinternet\/","article_published_time":"2018-04-12T11:30:00+00:00","og_image":[{"width":1024,"height":433,"url":"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2018\/04\/glasses-on-laptop2.jpg","type":"image\/jpeg"}],"author":"Eliot Chambers-Ostler","twitter_card":"summary_large_image","twitter_creator":"@heartinternet","twitter_site":"@heartinternet","twitter_misc":{"Written by":"Eliot Chambers-Ostler","Estimated reading time":"13 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.heartinternet.uk\/blog\/5-reasons-developers-are-switching-to-vue-js-from-other-frameworks\/#article","isPartOf":{"@id":"https:\/\/www.heartinternet.uk\/blog\/5-reasons-developers-are-switching-to-vue-js-from-other-frameworks\/"},"author":{"name":"Eliot Chambers-Ostler","@id":"https:\/\/heartblog.victory.digital\/#\/schema\/person\/58ed7f27cc0f3ab6e69135742a5eee28"},"headline":"5 reasons developers are switching to Vue.js","datePublished":"2018-04-12T11:30:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.heartinternet.uk\/blog\/5-reasons-developers-are-switching-to-vue-js-from-other-frameworks\/"},"wordCount":1937,"commentCount":2,"publisher":{"@id":"https:\/\/heartblog.victory.digital\/#organization"},"image":{"@id":"https:\/\/www.heartinternet.uk\/blog\/5-reasons-developers-are-switching-to-vue-js-from-other-frameworks\/#primaryimage"},"thumbnailUrl":"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2018\/04\/glasses-on-laptop2.jpg","articleSection":["Guest Posts","Web Design"],"inLanguage":"en-GB","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.heartinternet.uk\/blog\/5-reasons-developers-are-switching-to-vue-js-from-other-frameworks\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.heartinternet.uk\/blog\/5-reasons-developers-are-switching-to-vue-js-from-other-frameworks\/","url":"https:\/\/www.heartinternet.uk\/blog\/5-reasons-developers-are-switching-to-vue-js-from-other-frameworks\/","name":"5 reasons developers are switching to Vue.js - Heart Internet","isPartOf":{"@id":"https:\/\/heartblog.victory.digital\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.heartinternet.uk\/blog\/5-reasons-developers-are-switching-to-vue-js-from-other-frameworks\/#primaryimage"},"image":{"@id":"https:\/\/www.heartinternet.uk\/blog\/5-reasons-developers-are-switching-to-vue-js-from-other-frameworks\/#primaryimage"},"thumbnailUrl":"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2018\/04\/glasses-on-laptop2.jpg","datePublished":"2018-04-12T11:30:00+00:00","description":"Find out why Vue.js is gaining in popularity as a JavaScript framwork and why it might be right for your next project in this introductory guide by Ray Villalobos, a full-stack design and development instructor.","breadcrumb":{"@id":"https:\/\/www.heartinternet.uk\/blog\/5-reasons-developers-are-switching-to-vue-js-from-other-frameworks\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.heartinternet.uk\/blog\/5-reasons-developers-are-switching-to-vue-js-from-other-frameworks\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.heartinternet.uk\/blog\/5-reasons-developers-are-switching-to-vue-js-from-other-frameworks\/#primaryimage","url":"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2018\/04\/glasses-on-laptop2.jpg","contentUrl":"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2018\/04\/glasses-on-laptop2.jpg","width":1024,"height":433},{"@type":"BreadcrumbList","@id":"https:\/\/www.heartinternet.uk\/blog\/5-reasons-developers-are-switching-to-vue-js-from-other-frameworks\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.heartinternet.uk\/blog\/"},{"@type":"ListItem","position":2,"name":"5 reasons developers are switching to Vue.js"}]},{"@type":"WebSite","@id":"https:\/\/heartblog.victory.digital\/#website","url":"https:\/\/heartblog.victory.digital\/","name":"Heart Internet","description":"","publisher":{"@id":"https:\/\/heartblog.victory.digital\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/heartblog.victory.digital\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/heartblog.victory.digital\/#organization","name":"Heart Internet","url":"https:\/\/heartblog.victory.digital\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/heartblog.victory.digital\/#\/schema\/logo\/image\/","url":"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2025\/02\/HeartInternet_Logo_Colour.webp","contentUrl":"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2025\/02\/HeartInternet_Logo_Colour.webp","width":992,"height":252,"caption":"Heart Internet"},"image":{"@id":"https:\/\/heartblog.victory.digital\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/heartinternet\/","https:\/\/x.com\/heartinternet","https:\/\/www.linkedin.com\/company\/heart-internet-ltd"]},{"@type":"Person","@id":"https:\/\/heartblog.victory.digital\/#\/schema\/person\/58ed7f27cc0f3ab6e69135742a5eee28","name":"Eliot Chambers-Ostler","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/heartblog.victory.digital\/#\/schema\/person\/image\/","url":"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2025\/08\/cropped-Eliot-96x96.jpg","contentUrl":"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2025\/08\/cropped-Eliot-96x96.jpg","caption":"Eliot Chambers-Ostler"},"url":"https:\/\/www.heartinternet.uk\/blog\/author\/eliot-chambers-ostler\/"}]}},"_links":{"self":[{"href":"https:\/\/www.heartinternet.uk\/blog\/wp-json\/wp\/v2\/posts\/18313","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.heartinternet.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.heartinternet.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.heartinternet.uk\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.heartinternet.uk\/blog\/wp-json\/wp\/v2\/comments?post=18313"}],"version-history":[{"count":0,"href":"https:\/\/www.heartinternet.uk\/blog\/wp-json\/wp\/v2\/posts\/18313\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.heartinternet.uk\/blog\/wp-json\/wp\/v2\/media\/18371"}],"wp:attachment":[{"href":"https:\/\/www.heartinternet.uk\/blog\/wp-json\/wp\/v2\/media?parent=18313"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.heartinternet.uk\/blog\/wp-json\/wp\/v2\/categories?post=18313"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.heartinternet.uk\/blog\/wp-json\/wp\/v2\/tags?post=18313"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}