Archives
- Newer posts
- November 2024
- April 2024
- November 2023
- October 2023
- August 2023
- May 2023
- February 2023
- October 2022
- August 2022
- July 2022
- May 2022
- April 2022
- March 2022
- February 2022
- June 2020
- March 2020
- February 2020
- January 2020
- December 2019
- November 2019
- October 2019
- September 2019
- August 2019
- July 2019
- June 2019
- May 2019
- April 2019
- March 2019
- February 2019
- January 2019
- December 2018
- November 2018
- October 2018
- September 2018
- August 2018
- July 2018
- June 2018
- May 2018
- April 2018
- March 2018
- February 2018
- January 2018
- December 2017
- November 2017
- October 2017
- September 2017
- August 2017
- July 2017
- June 2017
- May 2017
- April 2017
- March 2017
- February 2017
- January 2017
- August 2016
- June 2016
- April 2016
- March 2016
- February 2016
- January 2016
- July 2015
- June 2015
- Older posts
Vue.js – A JavaScript Framework
Over the last 10 years, websites are becoming more dynamic and powerful. Different tools and better techniques are being used by the developers to make the applications faster, more attractive, and user-friendly.
Vue.js is amongst one of the JavaScript frameworks that is used worldwide for web development.
Vue.js is a progressive JavaScript framework used to build user interfaces, which means; if you have a server side application you can use Vue tools in your application. The core library is mainly used on the view layer and can be easily used with other libraries or existing projects. Vue follows a model view architecture which is far superior compared to angular which is based on the model view controller architecture.
Tools in Vue.js:
Vue CLI (Command Line Interface) provides the full system for rapid vue.js development. Vue CLI allows you to select which modules your project will be using and then you can easily plug them into your project. You can configure Webpack. So when you deploy your app all the JavaScript files, CSS, and dependencies get optimized, minified, and properly bundled together resulting in a faster loading speed.
Vue-loader is a loader for Webpack that can reconstruct Vue components written in the following format into a plain JavaScript module.
Webpack is a module bundler that takes your development assets (like Vue components and Javascript files) and combines them into bundles. This is different from concatenating and minifying JavaScript files. Webpack bundles only the modules required and loads it on the current page.
Vue Router is one of the vital components in a Vue application. A router reads the currently displayed view with the help of the browser address bar content. It allows you to create a single page application in which, the user does not have to reload a page while navigating across the website. Instead, the router fetches the component and renders it within the same HTML page. This makes the pages load faster resulting in a better user experience.
Organizing Components
An HTML page comprises div tags. Whereas, in Vue terminology, there are no div tags instead there are components that are saved as .Vue files. Components are reusable blocks of code that are used to create modular and more maintainable codebases. One can build these components on their own and reuse the components multiple times. When building the application you might have the components in the header, sidebar, navigation links, blog posts, etc. In order to use these components, they must be registered. The application should be organized into a tree of nested components.
Also Read: React.Js
Pros of Vue.js
Easy to Understand – Vue.js has a simple and straightforward structure making it easier for developers to understand. This indeed helps them to save a lot of development time.
Reusable Components – Components can be built and reused wherever needed. As we code the bundle size grows over time which may increase the load time.
We can write reusable components which can be used in other components thus reducing code size and the bundle size.
Cons of Vue.js
Too Flexible – A large number of frameworks built on Vue.js may become an issue when working on a big project that involve many developers. It can lead to errors within the code which in turn will delay the project deadline.
The high-speed rendering, efficient component operation, and simplicity of code make it one of the fastest-growing libraries, as it becomes easier for developers to create cross-platform web applications. If you have to develop a web application then Vue.js might be a good fit for you as it has many sets of frameworks built on it. It is proven that Vue.js has a lot of benefits in the development of simple applications that run directly from browsers.
Blog written on: 04-06-2019