In The Next Few Years, 90% Of WordPress Development Could Be JavaScript Based

In March of 2013, Matt Mullenweg stopped by the Memeburn office to talk about how WordPress went from being just another blogging platform to becoming the CMS of choice for the majority of the web. The author of the article infers that Mullenweg thinks 90% of WordPress development will be JavaScript based in the next few years.

In the future, the platform will also feature a lot more JavaScript. In fact, he reckons that 90% of WordPress will be JavaScript-based within the next few years.

When Eric Lewis recently asked Mullenweg on Twitter if he said the quote, his response clarified that he thinks the majority of PHP will be used for infrastructure such as updates, API’s, and the database layer. Meanwhile, user-facing improvements will be JavaScript driven. Most already are such as the editor, media, customizer and menus.

Spurred on by the discussion, Jordi Cabot of NelioSoftware.com dove into the WordPress source code. Using graphs, Cabot shows how many JavaScript files and lines of code have been added to WordPress since 0.7 was released. He then compares the number of PHP and JavaScript lines within the source code.

PHP vs JavaScript Lines Of Code in WordPress
Image Courtesy of Nelio.com

The numbers show that JavaScript is only 16.6% of the total source code of WordPress with PHP representing 83.4%. So while JavaScript isn’t taking over WordPress development any time soon, it’s definitely a valuable skill worth knowing.

Like Greg Rickaby, I find it fascinating that JavaScript has seen a resurgence. At one point, JavaScript seemed to be one of those poisonous things on the web that caused nothing but problems for browsers.

I think various libraries like MooTools, jQuery, and Node.js are largely responsible for the renewed interest in the language. I also think the introduction of Ajax played a role as well, going back to 2004 when Google used it for Gmail and then Google Maps. Neil Taylor of Myplanet.io has a great article covering the brief history of the JavaScript language.

What factors can you come up with that explain the renewed interest in JavaScript? What advice would you give people wanting to learn JavaScript?

6 Comments


  1. “What advice would you give people wanting to learn JavaScript?”

    I would recommend learning about object oriented programming (OOP). Once I learned what that was all about, everything (not just JavaScript) made a lot more sense. Knowing those concepts makes it really easy to learn new libraries like jQuery, YUI3, Backbone, etc. quickly, which is almost a must these days as it seems like new libraries are coming out quicker than you can learn them!

    Report


    1. They sure do seem like they’re popping up left & right these days.

      Report


  2. Thanks for the reference Jeff but it´s Jordi Cabot from NelioSoftware.com . Can you please update the link? Thanks!

    Report


  3. I don’t think lines of code or number of files are particularly revealing metrics here. We could add a large external PHP library (and have — two are 15,000 and 20,000 lines, respectively) and write a new feature powered by 5,000 of lines JavaScript. That’s 7x more PHP, but the effort was clearly spent on the JS.

    And it’s not just about external libraries, either. It’s about where our focus and effort is going. Pretty much every single user feature of the last seven or eight versions wasn’t just JavaScript-heavy, but JavaScript-centric. Think the customizer in 3.4, media in 3.5, revisions in 3.6, the new themes browser in 3.8 (for installed themes) and 3.9 (the installer), tons of improved editing/media tools in 3.9. The list goes on, and will continue to grow. While PHP certainly backs a significant amount of this, it’s just the piping and the foundation. We’ve gotten really good at pouring concrete, so laying a foundation is easy. The focus and energy needs to be on the house that gets built.

    If you count lines of code, you’ll probably never hit 90 percent. But if you count ongoing development efforts, I could certainly see our frontend development eclipsing our backend development. And in many ways, it already has.

    The headline here is, possibly accidentally, a perfect way to frame it: in the next few years, 90% of WordPress development could be JavaScript-based. With that metric, we’re easily halfway there.

    (I posted this on the original blog post but it looks like the comment is still awaiting moderation.)

    Report


  4. What factors?

    The death of Flash player and rise of HTML5. A desire to see more pretty stuff happen in the browser.

    Automattic supporting socket.io was a really interesting move and I think it symbolises a reassuring commitment to different technologies like Node.js which we use on WordPress powered apps like gamefroot.com/leveleditor when PHP starts to slow things down. Exciting times for teh interwebs :)

    Report

Comments are closed.