Why Vue.js Creator Evan You Thinks Vue Could Be a Good Fit for WordPress

photo credit: JSConf China

After last week’s news that WordPress is abandoning React due to its unfavorable patents clause, the discussion regarding the selection of a new framework is heating up again. As Vue is once again among the leading contenders, I reached out to Vue.js creator Evan You to get his perspective on the possibility of WordPress adopting the framework.

“Yes, I had a conversation with the WordPress team mostly answering questions they had about Vue,” You said. “The discussion happened before Matt’s announcement of moving away from React. It was mostly intended for filling the team in with the state of Vue and there was no particular conclusion made from it.

“To be honest, I got the feeling that the team had already decided to go with React and simply wanted to explore other options before they make the final call. I was a bit surprised by Matt’s post, but also understand the concerns behind that decision. I think React is a technically sound choice, and the whole patent issue is unfortunate.”

Vue is back in the mix alongside Preact.js and other libraries WordPress core contributors are considering adopting. You has been active in the comments on the WordPress core development blog during the previous discussion, as well as more recently in the discussion in Gutenberg’s GitHub repo, clarifying misconceptions about the financial stability of the project.

You has been careful to disclose his bias when participating in conversations about which framework WordPress should adopt. During my interview with him, he offered the community three reasons why he sees Vue as a good fit for the project:

“Now that WP has decided to pick a different framework, as the creator of Vue, I surely hope that the WordPress team can adopt Vue,” You said. “Below is why I believe Vue would be a good fit for the choice:

  • “As an independent open source project (not born from within a major corporate), Vue provides a good alignment in terms of OSS values with the WordPress project. It’s fully MIT licensed, and its development is sustained by open financial contribution channels (via Patreon and OpenCollective). This means WordPress can easily ensure Vue’s sustainability by becoming a major sponsor.
  • “Vue is one of the most approachable frameworks out there, with an established and active community, and ever-growing amount of learning resources. Adopting Vue would provide a low entry barrier and smooth learning curve for devs just getting into WordPress development. This also aligns with what made WordPress successful.
  • “As an incrementally adoptable framework, Vue’s flexibility means it can be adapted in different use cases ranging from embedded widgets, plugin development to full single-page applications. It can be used without any compilation step in simple use cases, while being mature and powerful enough for more complex use cases such as Calypso and Gutenberg. It offers the complete stack from vdom + ability to use raw render functions, server-side rendering, routing, state management, build tooling, browser devtool extensions, to editor tooling support.”

Evan You and six others from the Vue.js core team will be participating in an AMA on Hashnode at 12PM on September 20, inviting general questions about the project, how to use it and contribute, and general programming advice. The questions are already rolling in and their answers should provide more information about the future of Vue and its place in the wider JavaScript ecosystem.

WP Tavern has also reached out to Jason Miller, creator of Preact.js to get his perspective on the possibility of WordPress selecting Preact and what it would mean for both projects. The React-alternative is another strong contender among JS libraries WordPress is looking at for use in core.

The Gutenberg team has been working to ensure that WordPress developers will be able to create “Gutenblocks” using any JS library they prefer with different explorations of framework-agnostic block rendering. Ultimately, this would make creating plugins and themes less dependent on the library that is chosen for use in core. Other community members involved in the discussion, however, are keen to emphasize that the framework selected will have an impact on the greater WordPress product ecosystem, far beyond its use in Gutenberg, and are not eager to down play it as a simple technical decision. We’ll have a more detailed look on that in a separate post.

In addition to the discussions on independent blogs, the Gutenberg GitHub issues queue and the #core-js channel on WordPress Slack are both hosting active conversations on the upcoming decision. This week’s core JavaScript chat has been cancelled due to many of those involved traveling or unable to attend. The agenda for the next meeting is to discuss the role a JavaScript framework will play in current and future core focuses (including but not limited to the Gutenberg editor). This meeting is scheduled for Tuesday, September 26, 2017, 8:00 AM CDT.


8 responses to “Why Vue.js Creator Evan You Thinks Vue Could Be a Good Fit for WordPress”

  1. Does Vue or Preact have a stance on backwards compatibility? I’d say one of the most important and under appreciated features for WordPress’ success has been its commitment to be backwards compatible (eg compare to Drupal). I haven’t seen any mention of this around that in the JS framework discussions.

    Seems like it would be good to choose a framework with the same commitment.

    • From the perspective of Gutenberg, this was a major consideration in taking an initial exploration with React. While any framework will most certainly claim to have a commitment to backwards-compatibility, from an external point-of-view it’s a matter of risk and observations of history. React and Vue are both successful in offering migration paths for version upgrades (react-codemod, vue-migration-helper). React had a slight edge in targeting a small and focused API surface area, embracing the JavaScript language in its templating, and having a deterrent to drastic changes via Facebook’s own production usage (at least not without a long and well-defined deprecation path). There were compromises here in losing out on Vue’s fantastic onboarding experience, which we hoped to remedy by simplifying the block API as much as possible, minimizing the role of React to only representing a block’s edit and save representations.

      Preact is in a unique position of following React and serving as a distillation of its core concepts. The project has been mostly successful in avoiding the need for an upgrade path (never implementing PropTypes, createClass), but it’s still an open question as to how closely it stays in sync with the upstream React project, and whether the associated risks (fewer direct contributors, likelihood of sustained maintenance given the perceived fate of the similar Inferno.js project) are worth taking on.

  2. There are valid reasons why one might pick Vue over React, but licensing isn’t one of them. Vue has the MIT license w/o Patent grant, which is doesn’t grant any patents whatsoever. If you’re worried about the React license, you should pick something that uses Apache 2.0 license.

    • Vue has the MIT license w/o Patent grant, which is doesn’t grant any patents whatsoever.

      In other words you are saying that OSS licenses with a patent clause are better than those without, implying that we’re all better off adopting licenses with patents clauses that in the case of React was written with the explicit intent to defend the interest of a single corporation.

      99.999999% of sites using and choosing WordPress will never have to deal will issues with patent trolls. We don’t need licenses with a non-standard special clauses defending the interests of a corporation. Rejecting that doesn’t mean we are only consistent if we then pick a tool with say, apache 2.0, that would imply we feel it is necessary to have a patent clause packaged with our software. WP ships with GPL and we’ve done fine without complicating matters by introducing non-standard licenses into the mix.

      For me and I suspect plenty of others the license was a blocker not because of fear of malevolence on FB’s part (although that can’t be entirely ruled out either), but about why and who put it there and what is symbolizes: a corporate with goals contrary to those who value an open web who by necessity have worded a non-standard patents clause that uniquely defends their corporate interests. The OSS licenses compatible with WP don’t have *any* wording to protect the interests of any particular business, nor should they and nor should we want other OSS projects powered by large companies to start injecting their own non-standard legalese. Nor is there any overwhelming reason to adopt a software that includes a patent grant in the first place in the space that WP operates in. There certainly was no good reason to pick a tool that has a non-standard clause when there are many solid alternatives available.

      So, I disagree strongly with you, licensing was one hell of a good reason not to go with React.

    • I’ll take my framework without license grants over one that will potentially revoke its license if I’m ever infringed on by them and don’t simply hide in a corner like a scared puppy. Which is essentially what React was forcing, under the guise of self-protection from trolls.

      I’m actually surprised it took WP/Automattic this long and burned so many cycles on dev, before comprehending this.


Subscribe Via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.