PrestaShop introduces a new front-end technology in the PrestaShop back office: Vue.js. I am discussing here why PresatShop needs vuejs , why they choose vuejs and how they implement vuejs in PrestaShop.
What is Vue.js?
Why Vue.js need in Prestashop?
It is really best for developers to think in a component way as much as we could, and to mutualize as much code as possible and a progressive framework is the best way to do the same.
PresatShop implements a Vue.js in there back office on Product controller and translation page. as we know the admin panel interface should be more convenient to use for users, it was a nice idea to introduce a progressive framework.
Why Prestashop choose vue.js?
So let’s talk about what made VueJS so attractive for PrestaShop. I have already cleared some points above like PresatShop used vue.js to improve the User Experience in an iterative way Vue.js allows the interface to work as a “Single Page Application”, which removes the need to reload the page at each user action. its also better to have a “Single File Components”, meaning that you have one HTML component per file. this technique makes it easy to re-use them everywhere in your modules’ interface and have the same UI easily.
There are several state management systems like Redux or Flux, but Prestashop chose to use Vue.js and its state management library, Vuex. the reason they tell for the same is Vues.js is simple for developers also the library is lightweight.
|Angular 2 + Rx||766K|
|React 0.14.5 + React DOM||133K|
|React 0.14.5 + React DOM + Redux||139K|
|React 16.2.0 + React DOM||97.5K|
How Prestashop implement vue.js?
Vue.js components are currently used for stock and translations pages. You can find all the work done on these pages (and others as they appear) in the “pages” folder: \admin\themes\new-theme\js\app\pages and in the “widgets” folder you can find all the common components that have already been created: \admin\themes\new-theme\js\app\widgets as we can see, PrestaShop developers have done a great job of implementing Vue.js in PrestaShop. And they will not stop there. These guys are planning to create even more components and use Vue.js on other pages. here you can find the official doc for vue.js to understand it more click here.