Javascript frameworks powering Single Page Applications (SPA)

Javascript community is rocking. Kick-ass technologies emerge almost every season pushing the boundaries to new shores. With javascript powering apps including mobile ones, javascript frameworks are becoming synonymous to modern rich internet applications. Here, I attempted to take a dip into popular ones in the context of building single page applications (SPA). There are numerous other such frameworks ember, knockoutjs and meteorjs that exist and make you sweat choosing one of them.

Quick read – A brief on SPA.

AngularJS

Superheroic MVW (Model View Whatever) framework maintained by Google. W in MVW vouch for whatever you want it to be – MVC (Model View Controller) or MVVM (Model-View-ViewModel). It started as MVC and with developments, it turned out to be closer to MVVM. It’s indeed superheroic with high number of github stars and popularity. AngularJS lets you create dynamic views expressed with enhanced HTML vocabulary backed with a view model exposed via controller. What not – you have a rich set of mechanisms to easily build high flying rich internet application. However, it’s often criticized for its sluggishness with its digest cycle to deal with bindings.

Angular(2)

Angular(2) is of different beast comparing to angularJS and made to be future ready. Follows component based architecture inline with W3C’s web component model. It lets you model your app as a hierarchy of components (component tree) which can interact. Angular gets you write components managing angularized templates (markup) and services to encapsulate the business logic, boxing them into modules. And, you have to have one root module to bootstrap. Architecture of angular does explain this well. Recommends to use TypeScript which gets compiled into JavaScript and with it we get the static typing support.

Component tree example. Courtesy:angular.io

React

A cool kid from facebook. Fast growing JS library. Do note it’s a library and flexible to fill-up the V (view) in MVC. This too follow component tree model to build UI. It uses JSX that gets compiled into JS. Often used with libraries such as react router or redux to create SPAs.

Vue.js

The latest one to gain popularity. Stole the best from Angular, React and Ember. It’s an incrementally adoptable framework – Package what you need. Claims to be faster. Flexible to support component based model and the usual view based model.

Leave a Reply

Your email address will not be published. Required fields are marked *