• Latest
  • Trending
Introduction to the VueJs Framework

Introduction to the VueJs Framework

June 22, 2022
Absa and Visa Extend Strategic Partnership to Advance Growth and Innovation Across Africa

Absa and Visa Extend Strategic Partnership to Advance Growth and Innovation Across Africa

July 29, 2025
French Telco Orange Hit by Cyber-Attack

French Telco Orange Hit by Cyber-Attack

July 29, 2025
ATC Ghana supports Girls-In-ICT Program

ATC Ghana supports Girls-In-ICT Program

April 25, 2023
Vice President Dr. Bawumia inaugurates  ICT Hub

Vice President Dr. Bawumia inaugurates ICT Hub

April 2, 2023
Co-Creation Hub’s edtech accelerator puts $15M towards African startups

Co-Creation Hub’s edtech accelerator puts $15M towards African startups

February 20, 2023
Data Leak Hits Thousands of NHS Workers

Data Leak Hits Thousands of NHS Workers

February 20, 2023
EU Cybersecurity Agency Warns Against Chinese APTs

EU Cybersecurity Agency Warns Against Chinese APTs

February 20, 2023
How Your Storage System Will Still Be Viable in 5 Years’ Time?

How Your Storage System Will Still Be Viable in 5 Years’ Time?

February 20, 2023
The Broken Promises From Cybersecurity Vendors

Cloud Infrastructure Used By WIP26 For Espionage Attacks on Telcos

February 20, 2023
Instagram and Facebook to get paid-for verification

Instagram and Facebook to get paid-for verification

February 20, 2023
YouTube CEO Susan Wojcicki steps down after nine years

YouTube CEO Susan Wojcicki steps down after nine years

February 20, 2023
Inaugural AfCFTA Conference on Women and Youth in Trade

Inaugural AfCFTA Conference on Women and Youth in Trade

September 6, 2022
  • Consumer Watch
  • Kids Page
  • Directory
  • Events
  • Reviews
Monday, 1 June, 2026
  • Login
itechnewsonline.com
  • Home
  • Tech
  • Africa Tech
  • InfoSEC
  • Data Science
  • Data Storage
  • Business
  • Opinion
Subscription
Advertise
No Result
View All Result
itechnewsonline.com
No Result
View All Result

Introduction to the VueJs Framework

by ITECHNEWS
June 22, 2022
in Data Science, Leading Stories
0 0
0
Introduction to the VueJs Framework

Introduction

Vue (pronounced /vjuː/, like view) is a progressive JavaScript framework for building web user interfaces.
It provides tools to help make websites and apps faster and more dynamic.

Built on standard HTML, CSS, and Javascript Vue is lightweight and utilizes the Virtual DOM to modify the HTML markup making it quite fast.

YOU MAY ALSO LIKE

French Telco Orange Hit by Cyber-Attack

ATC Ghana supports Girls-In-ICT Program

Why is Vue called “the progressive framework”?

Vue is progressive as you can use it anywhere from a simple drop-in feature within an existing web app to add some interactivity to a fully-featured framework for a large-scale app such as social media or a video streaming web app.

Vue is incrementally adaptable with numerous libraries inside its ecosystem beyond the core library and is flexible enough to support external libraries enabling you to create more sophisticated multi-featured apps.

Quick Start

To use Vue you can link its library in a script tag within your existing web app as demonstrated below, or use it with the support of build tools (a topic we will get into in a later post).

<script src="https://unpkg.com/vue@3"></script>
<div id="app"></div>
<script>
  let app = Vue.createApp({}).mount("#app");
</script>

You then define a HTML block whose selector preferably an id you pass inside the mount function of the Vue instance.

A simple Vue application

The anatomy of a Vue application consists of two parts, a template which is in HTML and a Vue instance.

In our case after having linked our Vue library from unpkg, we should follow suit by placing a HTML block that will serve as the part where the visible part of our app (the template) resides and the Vue instance which is the invisible part of our app where most of the logic is expected to be placed.

Let’s break down the two parts.

The Template

The template of a Vue application is a HTML block that has a unique selector attribute that we ought not to use on any other part down the DOM tree lest our Vue app produces unexpected results.

  <div id="app"> {{ greetings }} </div>

The double curly braces surrounding the variable greetings is what is known as a “Mustache” syntax. The Mustache is a prominent delimiter in many templating languages used to allow text interpolation into the final markup of the templates.
In simple terms, Vue replaces everything inside the curly braces with the corresponding JavaScript expression applied to the enclosed variable in the final markup, this will be carried out only if the variable has been declared inside the Vue instance, else Vue will throw an error.

The Vue Instance

The second part of our app is the Vue instance. A new Vue instance is initiated with Vue.createApp() then is attached to the template by passing the special selector from our template in the mounted function, rendering everything inside our template part of the Vue app.

<script>
  let app = Vue.createApp({
    return{
      return {
        message: "Hello there, my name is Mr. Noob"
      }
    }
  }).mount("#app");
</script>

The data property that returns an Object which contains our greetingsvariable is one of the properties of the Vue instance that provides reactive data for us to work with inside a Vue app.
More on variables and reactivity in Vue will be covered in future posts.

Below is an example of a simple Vue app that when run will display the message “Hello there, my name is Mr. Noob” on the resulting HTML page.

<script src="https://unpkg.com/vue@3"></script>

<div id="app"> {{ message }} </div>

<script>
  let app = Vue.createApp({
    data(){
      message: "Hello there, my name is Mr. Noob"
    }
  }).mount("#app");
</script>

Vue supports running multiple instances on the same page, in the example above we can add a new Vue instance as follows.

<script src="https://unpkg.com/vue@3"></script>

<div id="app"> {{ message }} </div>

+ <div id="app-two"> {{ message }} </div>

<script>
  let app = Vue.createApp({
    data(){
      message: "Hello there, my name is Mr. Noob"
    }
  }).mount("#app");

+ let secondApp = Vue.createApp({
+   data(){
+     message: "Hi, I am Jr, Mr. Noob's son, running from another Vue app instance."
+   }
+ }).mount("#app-two");
</script>

So, you can have multiple Vue apps in a single webpage carrying out different tasks, or adding multiple features.
In a real world scenario one instance could be displaying a slideshow of images while another could be submitting newsletter e-mails to a remote database via HTTP API calls.

Vue Use Cases

Vue has a wide range of use cases that span the whole scale of front-end development.
We can use it to add a bit of dynamism into an existing web app, such as adding a simple carousel or content that changes on user interaction e.g mouse movements or text input to creating complex web apps such as e-commerce stores with multiple categories and product pages supporting routing, browser-based data storage via Vue’s own libraries such as the vue-router and vuex with features such as a cart, external API call requests and so forth.

Vue enables developers to start small on using it and supports incremental addition of its features without the need for total demolition of existing apps just to accommodate it.

Whether one chooses to use “vanilla” Vue to create apps or use one of the many battle-tested Vue frameworks is down to use cases and preferences.

The following is a list of some popular Vue frameworks.

  • NuxtJs
  • Gridsome
  • VuePress
  • Quasar Framework
Source: James Sinkala
Tags: Introduction to the VueJs Framework
ShareTweet

Get real time update about this post categories directly on your device, subscribe now.

Unsubscribe

Search

No Result
View All Result

Recent News

Absa and Visa Extend Strategic Partnership to Advance Growth and Innovation Across Africa

Absa and Visa Extend Strategic Partnership to Advance Growth and Innovation Across Africa

July 29, 2025
French Telco Orange Hit by Cyber-Attack

French Telco Orange Hit by Cyber-Attack

July 29, 2025
ATC Ghana supports Girls-In-ICT Program

ATC Ghana supports Girls-In-ICT Program

April 25, 2023

About What We Do

itechnewsonline.com

We bring you the best Premium Tech News.

Recent News With Image

Absa and Visa Extend Strategic Partnership to Advance Growth and Innovation Across Africa

Absa and Visa Extend Strategic Partnership to Advance Growth and Innovation Across Africa

July 29, 2025
French Telco Orange Hit by Cyber-Attack

French Telco Orange Hit by Cyber-Attack

July 29, 2025

Recent News

  • Absa and Visa Extend Strategic Partnership to Advance Growth and Innovation Across Africa July 29, 2025
  • French Telco Orange Hit by Cyber-Attack July 29, 2025
  • ATC Ghana supports Girls-In-ICT Program April 25, 2023
  • Vice President Dr. Bawumia inaugurates ICT Hub April 2, 2023
  • Home
  • InfoSec
  • Opinion
  • Africa Tech
  • Data Storage

© Copyright 2026, All Rights Reserved | iTechNewsOnline.Com - Powered by BackUPDataSystems

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In

Add New Playlist

No Result
View All Result
  • Home
  • Tech
  • Africa Tech
  • InfoSEC
  • Data Science
  • Data Storage
  • Business
  • Opinion

© Copyright 2026, All Rights Reserved | iTechNewsOnline.Com - Powered by BackUPDataSystems

Are you sure want to unlock this post?
Unlock left : 0
Are you sure want to cancel subscription?
Go to mobile version