High performance web applications using MVVM

Where Knockoutjs scores.

While every MVC  library has its own strengths, we use Knockout.js for the following reasons:

● Easy to learn – In an industry that values speed, it is absolutely critical that your programming teams learns new tools and techniques fast and hits the ground running. Knockout.js takes very less effort to learn and it very intuitive (I learnt it in an afternoon).

● Documentation – Knockoutjs has excellent documentation. Its website is attractive and also has an interactive learning area that lets you type and try out code as you learn.

● Knockout.js does not force you to write your user interface in Javascript unlike some of the competition. It supports jQuery templates out of the box – these just extend normal HTML/CSS. This means most ‘designers’ (who traditionally are not very good programmers) can do what they do best – design UIs and leave the programming to the developers – suits our team profile.

● Knockout.js uses the MVVM (Model-View-ViewModel) pattern. This implies one view model per view and results in a lot of flexibility in how you structure your application.

● Knockout.js is lightweight, fast and does not have any dependencies (though it works best with jQuery/Zepto).

Javascript frameworks

Creating rich HTML5 based web applications require the extensive use of javascript and event handling. While you don’t really need a javascript framework, it makes the life of a developer a lot easier by making applications easier and faster to build as well as to maintain. Lower level libraries like jQuery, Zepto and Prototype are very popular. However there are certain higher level libraries that use design patterns live Model-View-Controller (MVC) and Model-View-ViewModel (MVVM) to better structure the application.

Some of the leading high level javascript frameworks are:






SproutCore and ExtJS/Sencha are excellent MVC frameworks that also implement a rich high quality UI layer. SproutCore was the library that Apple used to implement its MobileMe service. SproutCore is currently undergoing a rewrite to make it a lighter and more modular framework. Sencha Touch is the framework of choice if you want to implement Mobile web applications. The UI controls are optimized for touch and fit in well with native UIs (particularly iOS/Android).

Libraries like Knockoutjs, Backbone.js and JavascriptMVC let you structure your application well, but do not provide UI controls. However they work with templating frameworks like jQuery Templates, Moustache, etc. This provides a lot more flexibility than the monolithic frameworks mentioned before.


In today’s highly competitive web application market, it is becoming increasingly necessary to build apps that stand out and provide users with superlative and immersive experiences. The rise of Cloud Computing and the proliferation of mobile devices of various form factors have increased the complexities involved in building and supporting web applications.

Traditional techniques of building web applications rely on the web server to do most of the heavy lifting with the browser posting back to the server for every little action. This method is not scalable and in the cloud era, uneconomical. It also results in sub-par user experience as latency kicks in.

Modern web applications on the other hand make the browser do a lot of work. Today’s browsers and the machines that run them are highly capable beasts with superfast javascript interpreters and graphics engines. They also sport increased levels of local storage and offline capabilities. A good modern web app leverages these capabilities to provide a rich user experience and also reduce the load on the server, thereby reducing costs as well.

Reports led Software Design

As a business leader, one of the things that mytifies me is how software development teams look at reports as an afterthought during software analysis/ requirement capture. As a result, the reports tend to highlight how the software works and whatever data the system captures, in various permutations and combinations without ever telling whether the problem, for which the software was developed in the first place, was ever solved.

Is it any surprise then, when the CEO looks at his IT manager, and grumbles that IT just doesn’t get the business? Nothwithstanding the advantages of running numerous “Align IT with Business” initiatives” (advantage for the consultants, that is), I’ve always wondered why CIOs / IT Managers don’t start their software architecture/design by first defining reports that clealy show whether the problem is being solved, and to what extent.

In many cases, these metrics were never defined, and it is here that IT can bring in the first “business level” contribution. Once these metrics (and reports) have been defined, then the next step would logically be to measure the current “as is” situation. Again, here too there may be instances where business function has no idea of how the problem is currently being managed, and again, IT can contribute to the business by mapping the exisiting business processes.

As a CEO, this information now allows me to confirm whether an IT intervention is actually needed, what it’s “core business benefits” should be, and what are the absolutely essential features of the software that needs to be developed to solve the problem/ improve the situation. I distinguish “core business benefits” from a more generic ‘cost/ benefit” exercise in that while a Cost / benefit analysis normally looks at an “inside out” picture (what all the software can do versus how much it will cost to build them in) a “core business benefit” gives an “outside in” perspective (what the essentially few things that the software must do well to solve a business problem).

As an Intelligent Business software provider, at Stylus, this is a challenge we have taken on, and our RadicalRootingTM process looks at software requirements backwards, starting from the reports that tell us what problem the software seeks to solve and then allow that insight to define what the software should and should not do. It’s amazing what we’ve learnt through this, but I guess that’s the subject of another blog in the near future. It isn’t an easy ride, but as we see our clients’ businesses succeed, it confirms that it’s a worthwhile one.