Check out a free preview of the full JavaScript for WordPress course:
The "Learn JavaScript, Deeply" Lesson is part of the full, JavaScript for WordPress course featured in this preview video. Here's what you'd learn in this lesson:

JavaScript is becoming essential and integrated with WordPress. After reviewing one of the critical messages of Matt Mullenweg's State of WordPress 2015 talk, Zac examines current JavaScript landscape in the core WordPress and the WordPress ecosystem. - https://wordpress.tv/2015/12/07/matt-mullenweg-state-of-the-word-2015/

Get Unlimited Access Now

Transcript from the "Learn JavaScript, Deeply" Lesson

[00:00:00]
>> Zac Gordon: Stepping back from this a moment. In 2015, in December, Matt Mullenweg who is kind of a co-founder of WordPress, he was one of the two people along with Mike Little who fought it back in its early days. He gave his first homework assignment ever, and every year he gives a talk on the state of WordPress and what's latest and greatest, what's coming, what's new, all of these.

[00:00:21] And at the end of 2015, he gave his first homework assignment, which was learn JavaScript deeply. Now on a personal note, I haven't shared much about myself. But my background is in education and web development, so I've taught high school, and college, and code schools, and online schools.

[00:00:36] And now I'm here at Frontend Masters! It was funny because I was let go from a job, the exact same week that he said this. Like, we don't wanna teach WordPress anymore. So I'm like, what am I gonna do? And I show up at this talk and he's like, go learn JavaScript deeply.

[00:00:49] Everybody, go learn it. And so, I was like, okay, I'll teaching JavaScript deeply now and I have ever since I was sitting in the audience for this. So that's kind of a little bit just about me and what my focus has been on since then. I started a project called The JavaScript for WordPress Master Course.

[00:01:06] And it's gone through different revisions. I was planning to just take four months, teach JavaScript from start to finish and then take off for the rest of the year. And now a year and a half later, I'm halfway done with the project because JavaScript from start to finish is a lot.

[00:01:22]
>> Zac Gordon: The next year at the next state of WordPress he said the same thing again, go learn JavaScript deeply. And the reason for this is becoming more and more apparent. He also pointed out that 30% at that point of WordPress is in JavaScript, its core code. So to contribute to parts of it, you need to know it.

[00:01:44] But there's also more stuff going on since then, so that customizer I showed you, it's getting better and better, there are experiments on how to do more and more with it. As well as widgets and hooks in WordPress are huge, huge part of it but you've had to build all of them in PHP.

[00:02:02] So there are some projects now. The way new features in Core and WordPress work is they launch it as a plugin first, get all th traction, get all the testing done. Then it becomes a featured plugin, and then eventually [COUGH] rolled into Core. So these are the projects that I'm mentioning here, have a lot of work behind them [COUGH] and people going into them.

[00:02:22] But they're not in core yet, so this is just kind of what's up and coming. And then the biggest one is Gutenberg, and Gutenberg is a rebuild of the entire editor page. So when you go to add a post or add a page, it's going to be rebuilding that as a single page web app design with the ability to kind of drag some things around, have blocks of content instead of just one content field.

[00:02:45] And in order to build it or work with it, you're going to have to know JavaScript. And there are some debates right now. It's, I wouldn't say too out of control, but there is a lot of influence on people saying, we should build these new things in React because Calypso's built in React.

[00:03:01] And we have all these developers being paid to work on a WordPress project that's already in React. But then you have so many of the average developers out there, who've really fallen in love with Vue. And, they're like, no Vue's easier and we should use Vue instead. And so there's a lot of discussion going into this right now.

[00:03:18] And they even have open chats every week, and you could join them if you wanted to and take part of the discussion. So, this is kind of some of the stuff that's coming up in Core. And the point being, a year from now, these thing will be even further along.

[00:03:30] And to edit and work with any of them, in the past you could use just a little bit of PHP, now you're really gonna need to understand your JavaScript. And in the real world, we're seeing this as well, so plugins, building out more API support. So if you have a contact form, it's not going to work with an API powered site, unless you do some extra work behind the scenes.

[00:03:50] We're also seeing more JS driven themes. It's still at this point not always the smartest idea to build your entire theme in JavaScript because you lose out all the ability of WordPress like feeding you data and loading stuff on the page. And we will even see some stuff today on where it's a good approach to, hey, let's just do this with PHP, but we'll take over everything else with JavaScript cuz there are still some cases with that.

[00:04:12] So lets say JS driven, and then one of the most exciting is completely decoupled environments. So, you could build your React, or Angular, or Vue app, and then just tie into the APN on the back-end, and never have to touch WordPress. And with authentication, you don't actually have to log in.

[00:04:28] Although I will say that, where it's at right now, even decoupled projects, most people are saying if I have a client that needs to regularly edit content, let's let them log in to WordPress normally to do that. But we want to build our apps in Angular, or in JavaScript, or in Vue right now, so we're going to build it that way cuz that's the future and we'll just plugin to the back-end with the API and they can go and edit that way.

[00:04:50] So this is kind of the current landscape of JavaScript and WordPress. And what's fascinating to me, and having all of you here is that this is the very first time, I think, in WordPress's history where we're seeing people with JavaScript experience or dev experience in mass beginning to look at the software in a completely different way than the average person who just knows some PHP and can build a theme.

[00:05:14] They're not coming in going, how do I set up my web pack build, and how do I build a decoupled project and tie into an API, because these skills are not standard, but in a lot of education now with web development, this is stuff being taught kind of as the go-to way.

[00:05:30] So, there is discussion on what's going to come next. I have some opinions. It hasn't really been announced, so I'll hold them off. But possibly even by the time this airs or definitely within the next year or so. We'll probably see just like backbone was added and jQuery was added at a certain time.

[00:05:46] We'll probably see Vue or React added to Word Press Core itself and the core components being built with that, which is going to allow a lot of other things to happen easier.
>> Zac Gordon: So, just to note and to remind to kind of wrap this up that JavaScript is becoming more and more integrated and more and more important to WordPress.

[00:06:07] So having these skills is essential. And it's a buzz in the community and has been for a little while of people trying to learn more. So I want to push again, if you have these skills on the JavaScript end, jump into doing more of WordPress, cuz there's a lot of folks that could use your expertise, and clients that could use your skills, too, right?