Navigating the JavaScript waters in 2015
In this last year I have done much more JavaScript development than I have before. The landscape, and tools have exploded over the last few years. Gone are the days of JQuery widgets, and come forth have advanced virtual dom libraries, JavaScript servers, and multiple package managers. Along with new language features.
Node.js and io.js
Right now there are two versions of Node.js. Although fairly soon the code bases will merge back together.
For those of you whom don't know, node.js is a server side JavaScript environment. io.js was a recent fork of the node.js code base to include newer language features, and updated versions of V8.
In the long run both of these runtimes will merge to make the Node Foundation. In the short term I'd stick with node, unless you have a compelling reason to use io.
Package Management
Bower - Simple package manager to download files and place them on the file system.
jspm - Client side focused package manager
npm - Package manager mostly focused on shipping CommonJS modules, mostly for node.js
Modules
Modules are a pattern that encapsulates JavaScript code so scripts do not have to rely on the global namespace, but instead reference the file definitions.
- CommonJS essentially defines module patterns with the use of an exports object.
- AMD is a module definition designed for files to be downloaded separately, with the browser in mind.
Great libraries to mention
These are some of the libraries I have liked. I'm sure I am leaving out many great others.
- Babel - ES6 to ES5 transpiler. People use this to write ES6 code, and have it recompile to ES5 for use with older browsers.
- ReactJS Client-Side framework for building UI's. Reacts strength is a Virtual DOM system that figures out what to alter in the UI, and just alters those elements, instead of altering the whole document.
- Mithril - Client Side MVC with Virtual DOM diff system (akin to ReactJS)
- Tungstenjs Virtual DOM system using Mustache server side, with plugins for backbonejs and ambersandjs client side.
- Browserify A library that bundles commonJS modules into a file for use with the browser.
- Grunt JavaScript task runner similar to Ant or Rake
- Gulp Much like grunt, a JavaScript task framework much like Rake