Getting started with VueJs.
2 min read
Vue can be used to create a whole website with multiple pages and components. These websites are mostly called Single Page Applications.
Single Page Applications (SPA) are websites that initially sends only a single HTML page to the browser. Vue intercepts subsequent request and handles page changes in the browser by changing which components shows on the page, which results to faster and smoother websites. All routing is done in the browser and not on the server.
These SPAs run on the the client side, but can be used to create full-stack applications by making HTTP requests to a server.
Vue can also run on the server-side by using a Server Side Rendering (SSR) framework such as NuxtJS. SSR enables an application to display web-page on the server instead of rendering it in the browser.
The need for a framework
- Import it as a cdn package on your html page using a script tag
The most common way of installing VueJS is with npm. This is mostly used with large applications. To get started with npm, you have to download nodeJS.
To ensure you have node installed, go to your Command Line Interface (CLI) (or terminal), type
This should be bring up a version of the node you downloaded. You get something like
Next is to install the Vue CLI, still in your terminal, type
npm install -g @vue/cli.
Same way you checked if node was installed, also run
If you're here, I believe this article has given you a great introduction to Vuejs and I hope this marks the beginning of your journey with Vuejs...
Visit The VueJs Docs for more clarifications, if you need any...