JavaScript Frameworks in the Digital Economy

JavaScript’s potential has increased tremendously since the introduction of Ajax, as more and more sections on web pages are getting dynamic when it comes to data representation. With the usage of mobile devices increasing each passing day, web applications with ‘dynamic dashboard view’, or those which ‘show everything on one page’ are the need of the hour.

JAVA_Script_-_000048392764_Medium.jpg

Is the traditional JavaScript development method best suited for the new age internet?

Use of jQuery to manipulate the DOM, or loading one massive JS library file (with all the required custom functions) along with page load, generally causes a lot of spaghetti code, which makes it hard to maintain, test, or limit scalability. With increasing data interaction between server and client, it is not advisable to handle all the DOM changes which are cross browser compatible. These issues have paved a way for new MVC based frameworks. 

This has caused a problem of plenty as there are many JS frameworks that are available. And the next big question is: which JS framework to choose? The simple answer is to select one which is best suited for the nature of web application. 

But when exactly should we use the JS framework?

  • If your application is not having any dynamic data features
  • If your application just renders the data which is done on page load
  • If your application does not support mobile devices with respect to touch events and HTML components 

If you want to use the JS framework, then the next step is to select the framework.

Following are few options which can be considered for usage:

  • Angular.JS
  • Backbone.JS
  • Ember.JS

js-blog.png

Angular.JS: Critics often call Angular a mere HTML-compiler. But for advocates of Angular, it means you can extend HTML vocabulary suited for your application. On many levels it’s like working and creating ‘web components’. Angular has nice data binding, which makes it a great tool for data driven apps. With Angular, you can operate your HTML like XML, and it gives you endless possibilities for tags and attributes.

Pros:

  • Built in two-way data binding feature
  • No dependencies for jQuery
  • Backed by Google
  • Huge developer community
  • Good candidate for rapid development
  • Built-in testing tools
  • Lots of inbuilt features for form validations 

Cons:

  • Learning curve is little longer as compared to Backbone 

Backbone.JS: Is a JavaScript library with Restful JSON interface, and is based on the ‘Model-View-Presenter’ (MVP) application design paradigm. This is known for being lightweight, as its only dependency is on one JavaScript Library - Underscore.JS. Looking at the large number of applications built with Backbone, it’s clear that it scales well. Backbone also works quite well with other libraries - you can embed Backbone widgets in an application written with Angular.JS, use it with TypeScript, or just use an individual class (like Models) as a data backer for simpler apps.

Pros:

  • Very easy to start with
  • Light in KB size
  • Can be used with any external library
  • Documentation is good (it's easier to document a small project)
  • Maintainability by conventions

Cons:

  • Does not follow proper MVC standards

Ember.JS: Follows a strict MVC pattern which helps maintain the application structure and coding standards. For the same reason it has a longer learning curve as compared to other frameworks. A developer with OOPs concept will find it easier to code in Ember than a UI developer. This framework is highly recommended when one needs to have strict control over standards, which is a requirement for enterprise applications.  Unlike other frameworks, not following a MVC standard is not an option while using Ember, which makes it a tricky choice for agile development. It tends to follow stricter implementation of MVC patterns similar to JavaScriptMVC, which failed to take off despite having more features. Ember does not have inbuilt features for rapid development like Angular.  

Pros:

  • Follows strict MVC pattern
  • Has its own event binding along with jQuery support
  • Supports HTML5 touch events
  • Very robust for complex application

Cons:

  • Difficult to pick up initially
  • Not a good option to integrate with existing applications as it causes a lot of markup changes
  • Less online resources as compared to other JS frameworks
  • Heavier in KB size as compared to other JS frameworks, which is a strong drawback for mobile apps

For more frameworks along with POC visit: http://todomvc.com/

By Sameer Sambare on Jun 25, 2015 3:28:00 AM

Sameer is Manager-Development with Ness SES in Mumbai. He has over 12 years’ experience in development and team management, working on the onshore-offshore model by implementing Agile methodologies such like SCRUM and Lean Agile.

0 Comments

Sign up for our Newsletter