Vue.js

 

Introduction to Vue.js

Vue is a progressive framework for building user interfaces. Unlike other monolithic frameworks, Vue is designed from the ground up to be incrementally adoptable. 

The core library is focused on the view layer only and is easy to pick up and integrate with other libraries or existing projects. 

On the other hand, Vue is also perfectly capable of powering sophisticated Single-Page Applications when used in combination with modern tooling and supporting libraries.



What is the best fit for Vue.js?

As there are so so many Js Framework are there let me clear up what is the best fit for Vue.js

Considering all the conceptual and technical aspects of Vue.js, you might question where it might fit the best. Besides its direct purpose, building one-page applications and working on web pages, it’s also suitable for a number of tasks.

Dealing with prototypes (without too much skill)

First and foremost, Vue.js was designed for prototyping. With the proper data-binding, it’s also great to handle a lot of animations, interactive elements, and graphics. Learn your front-end, install Vue CLI, and you’re good to go with clickable prototypes.

Keeping the focus on UI

Vue.js keeps a solid focus on working with UI, as it requires only HTML, CSS, and JS to work with it, without too much Vue-specific stuff. For example, IBM used Vue as a front-end framework for its Hybrid Cloud, because of its light weight, gentle learning curve, and reliance on HTML, CSS, and JS.

Integration demand

If you have an existing application, and you want to add some interactivity to it, Vue can help with that. Since it’s based on JavaScript, it can be easily integrated in any project using JS. Moreover, it’s compatible with many back-end technologies and frameworks like Laravel, Express, Rails, and Django. Also, add here ease of learning to cover the aspect of team training.



Architecture of Vue.js

Vue corresponds to the traditional Model-View-Controller (MVC) architecture. 

Simply put, the view is a UI of an application/website, and the core library of Vue.js focuses on the view layer by default. But, MVC doesn’t mean that Vue.js can’t be used with a different architectural approach like the Component-Based Architecture (CBA) used in React.



In its current form, Vue.js, developed by Evan You on a full-time basis, benefited by contributions from community members and was funded mainly by Patreon. Without the financial support of enterprises like Facebook (React) and Google (Angular), Vue still has achieved wide adoption on Github.



Installation 

Use one of the following commands as per your preference. You need to give Administrator privileges

npm install -g @vue/cli
# OR
yarn global add @vue/cli

After installation, you will have access to the binary in your command line. You can verify that it is properly installed by simply running it, which should present you with a help message listing all available commands.

You can check you have the right version with this command:

vue --version

Now, To upgrade the global Vue CLI package, you need to run

npm update -g @vue/cli
# OR
yarn global upgrade --latest @vue/cli

Here, the Installation part get over now we see developing a new Vue.js project.



Creating a Project 

Now, it’s super easy to create the project using the Vue CLI tool; it’s a matter of one command. Now, navigate to the selected folder where you want to create your app in the command line and then run the following command, where vue_demo is the name of our project.

vue create vue_demo

You can choose any different name for your app, depending on your preferences. After the command runs, you will see an instruction to pick a preset and two options like in the screen below:




To make it easy and not overcomplicate, I’ll select the default preset, and press enter. Then the installation will start, and it may take a few seconds. After it’s finished successfully, you will see a new vue_demo folder (or different depending on the name selected), and you are able to run your project.

Now, with Below command will open the vue.js project in the Visual Studio Code.

Code vue_demo

Then, let's run it.

npm run serve
# OR
yarn serve

if you used npm. After loading, you should see the following screen in your command line:




The app starts on http://localhost:8080/ by default, but you can change the port number if you wish. Let’s open the browser to check what’s inside our newly created project by running the localhost address in the browser window. You should see the following screen.



Great, it seems our app works fine, so now let’s create a new component and display it!



Pros of Vue.js

Simplicity

Integration

User-Friendly

Customization

Few Restrictions

Good Documentation

Support



Cons of Vue.js

Lack of Support for Large Projects: 

In the JavaScript world, adopting a certain technology can always be considered a bet against the stability of a platform. The greater flexibility and lots of options can also become a problem when large projects are deployed as the involvement of different developers can be difficult to handle.

Future Contenders:

A small development team also means that the absence of active research may provide an opportunity for another fresh framework to catch the interest of the community. In such a case, the development of the framework can slow or even stagnate. Such threats are valid as major corporations such as Google and Facebook are actively involved in the development of similar concepts.

Lack of Plugins:

As Vue.js is still in the development phase, support for important plugins is missing. It means that developers need to switch to other languages for assistance. For example, it is not uncommon for developers to resort to vanilla JavaScript when using Google Maps. On a similar note, the fast evolution of Vue.js means that some of the important information on the Internet may be outdated forcing developers to revert to documentation.

Overall, Vue.js is a powerful framework for developing user-interface. Its small size and customization features make it a solid choice for developers looking for a user-friendly framework for web applications. Most of the drawbacks of Vue.js can be rectified easily keeping developers optimistic that this framework will continue to improve in the future.

Comments

Popular posts from this blog