Document benefits/drawbacks of adding Vue as a core JS library

Created on 5 March 2021, over 3 years ago
Updated 21 May 2024, 6 months ago

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 🌱 Proposal to use Vue.js for building Drupal’s administrative UIs Postponed , 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

🌱 Plan
Status

Closed: outdated

Version

11.0 🔥

Component
Javascript 

Last updated 2 days ago

Created by

🇺🇸United States bnjmnm Ann Arbor, MI

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇩🇪Germany Anybody Porta Westfalica

    +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?

  • 🇺🇸United States freelock Seattle

    We'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?

  • Status changed to Postponed: needs info over 1 year ago
  • 🇬🇧United Kingdom catch

    Going to move this to 'postponed, needs more info' until there's a use-case in mind. More recently project browser is using Svelte.

  • Status changed to Closed: outdated 6 months ago
  • 🇺🇸United States bnjmnm Ann Arbor, MI

    If we ever have to discuss again lets just open a new issue instead of looking at graying tumbleweeds.

Production build 0.71.5 2024