Hasn't this been extensively discussed already?
The topic of Vue+Drupal has been discussed, but they had to do with choosing a framework for the Decoupled Admin UI component of Drupal's Admin UI & JavaScript Modernisation initiative.
This discussion is regarding the addition of Vue to improve existing core JavaScript, not to create an entirely new decoupled admin UI.
(It's also worth noting that progress on the Decoupled Admin UI stopped ~2 years ago (as of Spring 2021) and it is unlikely to resume)
For reference, those prior not-directly-relevant discussions can be found here #2913628: Proposal to use Vue.js for building Drupal’s administrative UIs, and here: #2913321: Proposal to experiment with React for building Drupal’s administrative UIs.
Problem/Motivation
I recently discovered that Vue works very nicely with Core Javascript.
I explored Vue as a possible replacement for Backbone, a library that needs to be removed from Core. #3145958: [META] Re-evaluate use of Backbone.js in core. I built prototypes for replacing Contextual's use of Backbone in Vanilla JS and Vue. The Vue prototype was easy and pleasant to build! It did an excellent job cooperating with preexisting JavaScript. Vue seemed like an option that could be gracefully added to Drupal without requiring the massive changes of the now-dormant Decoupled Admin UI.
However, the Vanilla option did its job well enough that it couldn't justify the addition of a large library like Vue. I liked the Vue version better, but Vanilla was good enough 🤷♂️.
The experience got me very interested in the possibility of Vue in core. I want to know if there are examples beyond by Backbone-replacement one.
What should be happening in THIS issue?
This is to get feedback regarding the ways that the community feels adding Vue could benefit core. For example, I discovered that Vue is a great replacement for Backbone - great benefit, but not great enough to justify core inclusion.
There seems to be sufficient information regarding why Vue itself is good, so this will focus on how Vue would be used to improve Drupal.
Full disclosure: this issue summary was written by someone enthusiastic about Vue. It's also an acknowledgement that there needs to be concrete justification for why it should be included. This issue could just as easily demonstrate that there is not enough incentive to add it as a library
Comments
Comment #2
bnjmnmComment #4
soul88It seems like @nod_'s comment here: https://www.drupal.org/project/drupal/issues/3145958#comment-14151987
Can at least partially address this statement:
Comment #6
luksakI know a lot has been talked about this... I'd opt for Vue, since I develop Vue apps and it would be beneficial to the Drupal ecosystem because. Here are my toughts:
Here are my pros:
Opposed to that there are a few clear cons:
Comment #10
anybody+1 for #6! Nothing to add, perfect!
So from my perspective, the bottom-up community from Vue is a super important point for Vue (and against React) but how can we find out, if it's really worth the dependency in core and if it will help us or become the next jQuery?
Perhaps this would need its own initiative or a Drupalcon workshop to find out? How should we proceed here?
Comment #11
freelockWe've done a dozen Vue projects, mostly using Drupal as a back end. I'm a big fan of Vue. But I'm struggling to see what benefit this would have getting added to core, and if it was added, how it might be used by contrib modules...
In our most recent projects, we're building Vue with our code using Vite. This creates a directory of assets that browsers load directly. We treat these apps as a complete standalone module built all at once, and bootstrapped into the browser all at once.
So if this is for a decoupled admin UI, I would think this would be built for, and within, a single admin theme, or encapsulated by a single module -- making this a module- or theme- specific library, not something directly in core.
If this were added to core, how could contrib benefit from it? What does the build process look like? What if a contrib module is depending on Vue functionality from an older, or newer, version than is in core?
Comment #12
catchGoing to move this to 'postponed, needs more info' until there's a use-case in mind. More recently project browser is using Svelte.
Comment #13
bnjmnmIf we ever have to discuss again lets just open a new issue instead of looking at graying tumbleweeds.