<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sridharrajanvenkataramani on Medium]]></title>
        <description><![CDATA[Stories by Sridharrajanvenkataramani on Medium]]></description>
        <link>https://medium.com/@sridharrajanvenkataramani?source=rss-7735fdd6d9e0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*_wntyFORyFnDdlri</url>
            <title>Stories by Sridharrajanvenkataramani on Medium</title>
            <link>https://medium.com/@sridharrajanvenkataramani?source=rss-7735fdd6d9e0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 11:55:04 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sridharrajanvenkataramani/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Introduction to Vue JS]]></title>
            <link>https://medium.com/@sridharrajanvenkataramani/introduction-to-vue-js-a9120a037d24?source=rss-7735fdd6d9e0------2</link>
            <guid isPermaLink="false">https://medium.com/p/a9120a037d24</guid>
            <category><![CDATA[vue]]></category>
            <category><![CDATA[front-end-frameworks]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[vuejs]]></category>
            <category><![CDATA[javascript-frameworks]]></category>
            <dc:creator><![CDATA[Sridharrajanvenkataramani]]></dc:creator>
            <pubDate>Wed, 25 Dec 2024 19:14:41 GMT</pubDate>
            <atom:updated>2024-12-25T19:14:41.970Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Introduction to Vue JS" src="https://cdn-images-1.medium.com/max/1024/0*PcRfrO-WsMJEeU-n" /><figcaption>Photo by <a href="https://unsplash.com/@rahuulmiishra?utm_source=medium&amp;utm_medium=referral">Rahul Mishra</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Vue.js is a progressive JavaScript framework. It is a lightweight framework designed for building user interfaces. The term “progressive” means that Vue can be gradually introduced into an application, starting with small features and scaling up to complex, fully-featured applications using its ecosystem and tools. Vue.js is an excellent choice for incrementally enhancing existing web applications, such as those built with frameworks like ASP.NET MVC, allowing developers to add modern, interactive components without rewriting the entire application, in contrast to frameworks like Angular. Angular requires building the entire application as angular enforces a way of organizing and structuring the application.</p><p>Vue projects can be created using the modern build tool Vite, which provides a fast and efficient development environment. The Vue CLI, while still functional, is no longer actively maintained and is considered less optimal compared to Vite for new projects. Vue applications can be written in either JavaScript or TypeScript.</p><p>Vite simplifies the process of creating boilerplate code and managing dependencies, offering an efficient and developer-friendly way to set up Vue.js projects.</p><p>The following example demonstrates a simple web page showcasing both the one way and two way data binding feature. In this example message variable is bound to UI and 2 way data binding is implemented using v-model which is similar to [(ngModel)] in angular. Any changes made by user in the HTML text box are automatically reflected in message property and applied to the span element. “el” specifies the id of the element where the vue js application should be mounted. V-model is an in built directive in vue js which is used to implement 2 way data binding. The below example uses vue 2 which is included via CDN using script tag.</p><pre>&lt;!DOCTYPE html&gt;<br>&lt;html&gt;<br>&lt;head&gt;<br>    &lt;title&gt;Simple Vue.js App&lt;/title&gt;<br>    &lt;script src=&quot;https://cdn.jsdelivr.net/npm/vue@2&quot;&gt;&lt;/script&gt;<br>&lt;/head&gt;<br>&lt;body&gt;<br>    &lt;div id=&quot;app&quot;&gt;<br>        &lt;span&gt;{{message}}&lt;/span&gt;<br>        &lt;br&gt;<br>        &lt;label&gt; Edit : &lt;/label&gt;<br>        &lt;input v-model=&quot;message&quot; type=&quot;text&quot; &gt;<br>    &lt;/div&gt;<br>    &lt;script&gt;<br>        new Vue({<br>            el:&#39;#app&#39;,<br>            data:{<br>                message : &#39;sample&#39;<br>            }<br>        })<br>    &lt;/script&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;</pre><p>The following code demonstrates the same functionality as above, but it is written in vue 3. Vue 3 introduces createApp method for creating the application. Mount method is the replacement for ‘el’ property used in vue 2 for mounting the app. Mount method is used for linking the vue application to html element — div tag. createApp is used for initializing the vue application.</p><pre>&lt;!DOCTYPE html&gt;<br>&lt;html&gt;<br>&lt;head&gt;<br>    &lt;title&gt;Simple Vue.js App&lt;/title&gt;<br>    &lt;script src=&quot;https://cdn.jsdelivr.net/npm/vue@3&quot;&gt;&lt;/script&gt;<br>&lt;/head&gt;<br>&lt;body&gt;<br>    &lt;div id=&quot;app&quot;&gt;<br>        &lt;span&gt;{{message}}&lt;/span&gt;<br>        &lt;br&gt;<br>        &lt;label&gt; Edit : &lt;/label&gt;<br>        &lt;input v-model=&quot;message&quot; type=&quot;text&quot; &gt;<br>    &lt;/div&gt;<br>    &lt;script&gt;<br>      const {createApp } = Vue;<br>      const application = createApp({<br>        data(){<br>            return{<br>                message : &#39;sample message&#39;<br>            }<br>        }<br>      }).mount(&quot;#app&quot;);<br>    &lt;/script&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;</pre><p>Similar to Angular we can structure the web application as hierarchy — Tree of components interacting with each other. Angular uses Shadow DOM feature of browsers to encapsulate the css styles within components whereas the vue js uses scoped styles feature to achieve the same.</p><p>Angular is a full-fledged framework, it provides a large set of features and enforces a certain way to build the applications which may suit large applications but it may be an over kill for smaller applications. Vue JS uses virtual DOM Concept to manage updates to user interface. Virtual DOM is a lightweight representation of actual DOM in memory. Vue updates UI Instantly when data changes in the model, it uses the ES6 Proxy concept to achieve this reactivity. The process is complicated in angular, where angular runs change detector to find the properties modified and update the UI accordingly. This is a complicated process which may be a performance bottleneck in certain applications.</p><p>Also check out my article on angular : <a href="https://www.linkedin.com/pulse/angular-refresher-key-concepts-developers-sridhar-rajan-venkataramani-82vbc">https://www.linkedin.com/pulse/angular-refresher-key-concepts-developers-sridhar-rajan-venkataramani-82vbc</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a9120a037d24" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>