Dear all,
I’d like to propose to the community the adoption of a modern front-end web framework: Vue.js.
Why do we need a new font-end web framework ?
Currently, we are mainly using jQuery (and keep maintaining legacy propotype.js). And I have identified two main paint points: our front end code is difficult to reuse and to test.
There are aspect where modern front-end frameworks have made significant progress.
Why Vue.js
Vue.js is a well-maintained framework that has many advantages the major one being that we have experience with it with the development of the Live Data macro, proving its worth to:
- allow the development of large front-end components
- being easy to test
- being able to integrate in a large and heterogeneous legacy code base
Additionally, Vue provides tool support in the browser (firefox and chrome) to help debugging the UI.
Note: Vue.js is also the framework of choice for Mediawiki and Wikijs.
What are the consequences of officially adopting Vue.js
We’ll work to provide tools to develop using Vue.js on XWiki (core and extensions).
We’ll define guidelines to decide when using Vue.js (or migrating to it) is relevant.
Challenges ahead
- Uniformization of the version of the dependencies (same version of vue / npm dependencies for all extensions)
- Scaling the use of Vue from one module (Live Data) to many, and allow to reuse components between modules
- Work on guides and tooling to ease using Vue during development for all XWiki contributors
- Provide reusable components to ease the development of XWiki UIs
- Provide even more rest endpoints and clients for existing modules (for instance, the development of Live Data lead the in introduction of rest endpoints for the icons and the localization)
- Define a strategy to deal with the migration from Vue 2 to Vue 3
- Ease the modification of Vue.js components. Currently, it is possible to modify javascript code stored in XObjects or in the server. Due to the way Vue.js code is packaged, this is not true anymore. This can make “hacking” XWiki more difficult and we’ll need to introduce new features to allow it again
Let me know what you think and fell free to share you concerns and questions.
Thanks,
Manuel