WordPress needs to stay JavaScript framework ‘agnostic’

, ,
Screenshot of the WordPress homepage

WordPress currently stands at a fork in the JavaScript road.

For a long time, it seemed like a formality that the core team would select ReactJS as the JavaScript framework for WordPress. After all, Automattic, the company that runs WordPress.com, started using it, and the new post editor, Gutenberg, was being built with it.

But React had one fatal flaw — it’s license. Facebook owns ReactJS and it’s BSD+Patent license for React which is more restrictive than the other open source licenses. And last month, the Apache Software Foundation put it on a list of disallowed license for its members. That made developers hesitant about WordPress incorporating it and eventually Matt Mullenweg, the co-founder of WordPress, decided against using it in WordPress core.

Facebook has since changed the React license to be more open. But the damage has been done, so to speak. The WordPress core team is looking at different frameworks to work with. And now there’s a new contender: being JavaScript “agnostic”.

Essentially, being JavaScript agnostic means that parts of WordPress, like Gutenberg and potentially the whole admin, wouldn’t be built with a specific JavaScript framework, like Angular, React or Vue. Instead, it would be written in a way that would allow others to use their framework of choice.

And it’s the best move for WordPress going forward.

Makes it easier for new developers

WordPress is a great entry point for people looking to get into web development. I mean, that’s how I got into web development from being a journalist. And after attending WordCamp San Antonio and the Ft. Worth meet up, it’s clear that others have as well.

But switching to a framework like Angular and React might change all of that. Right now, HTML, PHP, CSS and vanilla JS are very easy to learn. And for those wanting to get into the frameworks business, VueJs is a great entry point to that realm. But Angular and React have a massive learning curve. I’ve spent

This is after five years or so of serious web development. Now imagine someone new trying to jump into the web development world. Now they hit a massive roadblock with Angular and React. And I’m willing to bet about half of those folks will give up because of the learning curve. I honestly would have been one of those folks. And while yes, they can go learn vanilla JavaScript and then work their way up, that takes patience and time, which are two things that seem to be in short supply these days.

Keeping the JavaScript framework behind WordPress simple and agnostic will continue to allow developers to learn web development through WordPress. And hopefully it will encourage them to continue learning and to eventually be able to use Angular and React.

Avoids pesky licensing issues

Of course, this whole debate really picked up steam with Facebook’s license issue with ReactJS. And it brings to light a big factor that can be overlooked by many in the web development world.

Currently, anything that goes through the WordPress sphere must have an MIT License or General Public License or something similar. These licenses are favored for open source software, which WordPress is. WordPress core and plugins and themes in their respective WordPress repositories must have one of those licenses.

The problem Facebook ran React with the BSD+Patent licenses, which effectively does the opposite of open source. The license means that Facebook owns the copyright to anything you do with React as well as grants you patent rights. That is until you sue them for something, in which case that all goes away.

For small projects, like creating a basic starter theme to learn React, that’s not an issue. But when it comes down to using React in software that powers about a quarter of the internet, the risk becomes way to great.

Even though Facebook has now changed the license to remove that patent issue, staying away from those frameworks in something WordPress must do. Remaining JavaScript agnostic keeps WordPress from using other licenses that could, albeit not likely, be changed at a moments notice, potentially collapsing the entire thing. That’s something no one wants to happen.

Keeps WordPress neutral in JavaScript framework ‘battle’

Finally, staying agnostic keeps WordPress out of the JavaScript framework battle. While there’s the big three — Angular, React and Vue — there are a ton of other smaller frameworks that seem to pop up every week. Seriously. It’s quite interesting.

It’s an incredibly competitive area. And while WordPress’ main choices will no doubt come from one of the big three, it has so much clout that it could inadvertently pick a “winner” in this battle. Once a decision is made to pick a framework, that framework is going to be as the go to framework for a quarter of websites at least. And there’s a possibility that the others might not be seen as that good since they’re not in WordPress.

This isn’t WordPress’ place to pick winners and losers. While I have a lot of trust in the team of core developers, I don’t know if they should hold this type of power. Instead, I think it should be up to the everyday developers to pick which framework is the best for each of their projects. If they all decide to go to one framework and the others die out, then so be it. That’s how thinks work in an open market. But I don’t think WordPress should be a part of that game.

Right now, WordPress is in a pretty good spot when it comes down to this decision. There aren’t too many bad picks in the JavaScript debate. All of them can help WordPress accomplish its goals.

But it can also accomplish its goals with vanilla JavaScript. And in that decision no one needs to worry about license, new web developers can still learn the craft through WordPress and the content management system doesn’t unnecessarily pick a winner or loser in the framework battle. It’s a win for everyone.

Here’s to hoping that WordPress remains JavaScript agnostic.

Leave a Reply

Your email address will not be published. Required fields are marked *