You are here

Exploring the Javascript Ocean

tess's picture

Emerging Javascript Frameworks

Diving into the JavaScript Ocean is as thrilling as the possibilities are endless, but with new frameworks popping up left and right it can be difficult to decide where to start. As Fuse IQ dives into that ocean with Drupal 8 and headless Drupal, I set out to learn more about these frameworks.  The waters were certainly rough as I attempted to figure out which frameworks were just floating by and which were here to stay.

React:

The buzz around React has made it one of the fastest growing frameworks. Developed by Facebook, React has gained attention from Netflix, Yahoo, Khan Academy and the New York Times. Of the new JavaScript frameworks React is the simplest. Quick learning time has made it a popular choice for developers.

React is new. React has reimagined every element on a site as a component, which developers can then add custom code to very specific elements of the page, allowing sections to be updated without reloading the page. This has had outstanding results, for example the New York Times Red Carpet Project, where a div is seamlessly updated based on a selection. There is, however fear within the development community that mixing HTML and JavaScript in code goes against fundamental web standards of programming.

It is important to note that React is only a tool for making changes to the View aspect of programming. To use React as a full server side framework, it must be combined with Flux or Redux.  Therefore, React is perhaps best used as for performance tweaks to specific elements of a page.  One of its strengths lie in being about as useful in updating specific portions of legacy projects as brand new builds.

Check out the Git Hub

AngularJS:

AngularJS, with the backing of Google, has become in the past few years the most widely adopted of the JavaScript frameworks.

As a full framework which interacts both with the server and the client, AngularJS has a much steeper learning curve than React.  This is compacted by AngularJS’s light documentation. It is worth mentioning that as an open source framework, AngularJS has a vibrant and growing community to help with questions.  This summer Angular 2 has officially shipped. The team strives to resolve documentation as well helping to make the platform more intuitive. 

Angular's strength lies in it's speed and flexibility.  The framework manipulates the page DOM directly, instead of adding inner-html and relies not on change listeners, but JavaScript execution for data binding- both major factors in its speed.  Angular is rapidly becoming the framework of choice for Single Page Applications like CNN Go, DevArt and even the Google Cast application. 

Check out the Git Hub

Ember.js and Backbone.js:

Ember.js is known in the community as the sleeper framework. Since it’s advent in 2011 Ember.js is widely used and has been adopted by Square Dashboard, Vine and Apple Music Desktop. This “old and steady” framework was relatively fast to become stable and remains so. Where React is known for changing the way we code, Ember.js demands developers to write cleaner code, adhering to best practices - or as the Ember.js creator’s refer to it - “falling into the pit of success”.  Ember.js scales well and is widely trusted on the enterprise level, which makes it the ideal framework for large applications and its demand of clean code makes it easy for new developers to pick up where others left off.

Released in 2010, Backbone.js is another framework that has proven itself as a stable option. Accepted by web giants from LinkedIn and Amazon to up and coming Trello,  SoundCloud and Airbnb - Backbone.js is a light framework that has the flexibility to meet lots of needs. This flexibility is due in part to Backbone’s lack of high functioning features, such as templates. While suggested plugins ship with Backbone.js, relying on plugins leaves developers to heavy debugging from a variety of sources.  Backbone.js has been described as a backbone to build new frameworks around.  Its flexibility allows developers to build solutions around assessment, gamification, simulation and user tracking.

Check out Ember and Backbone.js Github.

Auerlia and Meteor:

Aurelia and Meteor may not be filling the news just yet, but it is very likely that in upcoming years we will see the rise of these frameworks.

Unlike many of the a-forementioned frameworks, Aurelia is not an open source framework. It has a dedicated team of developers and a sales team pushing partnership and support. Doting itself as ‘future proof’, Aurelia uses ES6 classes, standardizing nomenclature and allowing developers not to reference Aurelia at all. This could have a huge impact as ES6 becomes a requirement for developers down the line.

Meteor is both a platform and a framework that use Node.js, MongoDB and MiniMongo to allow developers to write server and client side code in one place and language. It includes excellent documentation and support for layering React and Angular over the platform. This year Meteor seeks to, "close the gap" between framework’s support of “native apps and mobile web”.  They have already seen success with Respond, an application used by companies ranging from Microsoft to Slack.  Meteor is great for quickly building applications and allows developers the chance to expand their knowledge base by tapping into some of these other frameworks for specific components.

Check out Aurelia and Meteor on Github.

Conclusion:

With all of their intricacies and strengths, choosing a framework can be intimidating.  It is important to consider the exact requirements of your project and take the time to find the best fit for your needs.  If you are working with a framework you haven't used before, make sure to consider above all else the documentation and community support around the framework.  Dive into the JavaScript ocean and take the advice of Matt Mullenweg, leader of WordPress development and, "learn JavaScript, deeply".