- A defined syntax which relies on English keywords to tell the computer what to do
- The ability to control behavior and presentation on a computer by changes to text files containing the English keywords and a variety of other symbols
But What Is that Language? ECMAScript, etc.
ES6 — which is now being called ECMAScript 2015 — came out last year.
And It Does Run Outside the Browser
jQuery — The DOM Manipulation Library
If a WordPress developer has used only one JS library, it’s very probably jQuery. jQuery is the oldest thing in this list, and in some ways the simplest. It’s most known and used for small changes to the “DOM” (document-object model, basically rendered HTML in a browser), and can get out of hand if you try to do very complicated logic with it.
Backbone — An MV* Library
Backbone is the most lasting of the libraries that came the generation after jQuery. Backbone is, essentially, a proto-MVC framework. (It’s technically MV*.) If you’ve never heard of MVC, model-view-controller is a pattern that is often used in web applications to keep your data (model), your templates (view), and behavior (controller) from walking all over each other. The ugliness I mentioned about “jQuery spaghetti” is because of a lack of this sort of structured pattern. Backbone provides a “model” and “view” object so you can have a bit more sanity, but doesn’t really have an opinion about how your application behavior is implemented.
Underscore — Functional Programming Aid
What’s Functional Programming?
Functional is the name for a style of programming which contrasts with “object-oriented” and “procedural.” Having “functions” in the language doesn’t make it functional.
Object-oriented programming, which some of WordPress is, is about having entities which perform and live in your system. (In PHP, you spot this with the
class keywords being used.) Functional programming is about having “first class” functions, which can be passed around like variables and used as inputs to other functions. These functions are also, ideally, “pure” functions in the mathematical sense — they take inputs, and produce nothing but outputs. That is, they don’t have “side effects.”
That very brief summary may be over your head, the core idea I want non-experts to take away is just that “functional programming” is not just about making functions, and it’s worth keeping an eye out for and learning more about. </aside>
Angular (2) — The Most Popular Full Framework
I’ve never really learned Angular deeply, in part because when the team behind it announced their next version — Angular 2 — they threw a lot of their core ideas out the window. They’ve since backed off — making an Angular 1 app into an Angular 2 app no longer seems like it would be a fool’s errand — but when Angular 2 comes out later this year adoption of it is still a big and important question.
Ember (2) — Another MVC Framework
React — Fastest Templates in the West
React is essentially a very opinionated version of a “view” layer, which focuses on making your drawing fast and does that by making you thoroughly think about containment of all your logic around that into a simple little unit. Because of its small ambition, it’s used with a lot of different app structures and data-management flows.
Image credit: Unsplash via Sven Scheuermeier