JavaScript and single-page apps: our guide
Today the JavaScript world is marked by extreme fragmentation and competing ideas: a sign of a thriving community, or of immaturity? And above all: how do you survive the churn rate?
We're kicking off a new series of articles in which we'll try to shed light on the available alternatives and share our take on solid, maintainable development.
Today the JavaScript world is marked by extreme fragmentation and competing ideas: a sign of a thriving community, or of immaturity? And above all: how do you survive the churn rate?
We're kicking off a new series of articles in which we'll try to shed light on the available alternatives and share our take on solid, maintainable development.
Welcome to the JavaScript bazaar!
Shall we recap the previous episodes together? Let's do it.
Two years ago the JavaScript world was in the midst of its Renaissance, fueled by greater browser standardization and the discovery of Node.js as a technology that could give rise to a new generation of front-end build tools: within just a few months, a plethora of new projects saw the light of day.
After just twelve months, Backbone.js seemed to have officially won, with Grunt as the task runner, Require.js as the module loader and Handlebars as the templating library. Six months later the impression, at least judging by the overall mood of the blogosphere, was of a complete replacement of all the technologies just mentioned: the new kids on the block? Angular, Gulp and Browserify.
Have things finally settled down? Not a chance… In recent weeks Angular has come under heavy criticism for its performance and the announced lack of backward compatibility in its next major release… in short, the next revolutionary wave is already at the door.
It's a fact that JavaScript frameworks and libraries are created, glorified, dethroned and forgotten at an astonishing pace: right now, even for an experienced JavaScript developer it's extremely hard to invest in and confidently bet on any particular technology.
It's a well-known problem, also well documented in the article The State of JavaScript in 2015 by Jimmy Breck-McKye, which raises important questions about how sustainable this process is in the medium term: the impression is that the pace shows no sign of slowing, but at the same time developers are starting to feel a sense of burnout and alienation.
In the article Generation Javascript, Manuel Bernhardt compares the JavaScript community to a giant bazaar, crowded with countless stalls all offering more or less the same products:
Incidentally, I just come back from a trip to Morocco [...]. Some of the Souks are extremely tourist-oriented: everyone tries to sell you their stuff (which is colorful and shiny) – and every few stalls or so you find about the same things.
See, there is a dark side to the bazaar. Imagine you are a newcomer to Javascript development these days. Which libraries should you pick to get started? No, wait, which package manager should you pick to get started?
Indeed, the similarities aren't hard to spot :)
Our survival guide
Drawing on solid (and varied) experience with client-side applications, plus an extra month of "internal lab" work spent exploring the main alternatives on the market, we've decided to launch a new series of posts with the goal of:
- sharing a reasonably in-depth overview of the main contenders in each area (task runners, frameworks, etc.);
- describing our hands-on experience with each of the alternatives;
- explaining, in light of the results, the choice we've made as a company for future projects, the one that gives us the best balance between development speed, popularity, robustness and long-term maintainability.
Sound interesting? It was certainly a journey full of surprises for us! The series is called BazarJS, and here's a quick preview of the topics we'll cover week by week:
Contents
- Task runners (Grunt, Gulp, Broccoli)
- Module loaders and package managers (RequireJS, AMD, CommonJS, Browserify, Bower, Npm)
- CSS preprocessors (Stylus, less.js, Sass)
- JavaScript preprocessors (Coffeescript, ECMAScript 6, Typescript)
- Frameworks (AngularJS, Ember.js, React)
- Support libraries (Superagent, RSVP, Immutable, Lodash)
- Testing, linting and code coverage