In this post I’m not going to be very original, but it’s the sort of comparisons that are very hard to find in one place. I will cover traditional web frameworks, javascript mvc frameworks and javascript templating frameworks .

Before I start I want to make a reference to an article that describes the principles in modern web (http://blogs.atlassian.com/2012/01/modern-principles-in-web-development/):

Traditional web frameworks

For traditional web frameworks I recommend looking no further than at the comparisons from Mat Raible’s blog. He creates a new comparison every few months and is very well know in the field as an expert.

His last blog on this topic is here http://raibledesigns.com/rd/entry/comparing_web_frameworks_and_html5 and has Grails (groovy language, inspired from Ruby on Rails and based on Spring MVC), Spring MVC (Java) on top, followed closely by Ruby on Rails, Play (Java and Scala with no server side state) and even GWT (Java to JS).

If you followed my previous blogs you can probably figure out I prefer newer languages to Java because of how much code is needed to write any simple Java code compared to any other new language. The fact that all these frameworks can run on the JVM (even Ruby as JRuby on Rails, but not GWT, as that will run as JS), it still allows you to use your existing Java code or other libraries  if needed and not have from scratch.

I prefer stateless apps that are single page and expose RESTful APIs (I’m not convinced on being pure REST) and that have their own dedicated data sources (any combination of RDBMS, document stores, search indexes or data grids and distributed caches).

For the real web pages I recommend using HTML5 and Javascript, and that’s our second category of frameworks we will compare.

Javascript MVC frameworks

We all know about jQuery, Ext-JS, Dojo, etc. They are all good frameworks I I think it will be hard to develop any JS based UI without some jQuery, so that’s a given, but for a real app the code will soon become a mess and here is where a JS MVC framework can help.

I found a good comparison here http://codebrief.com/2012/01/the-top-10-javascript-mvc-frameworks-reviewed/ that looks at 10 frameworks and looks at 4 big areas with Ember.js coming out first. I wish the comparison also considered documentation, performance, community and framework stability. Ember and angular look impressive, but it all depends on what type of app you’re building. The lack of good docs and new releases with major API changes every few days can make it very difficult to work with a framework.

My suggestion is pick the top 2-3 frameworks that fit your app and personal style and have at least a 2-3 day spike (proof of concept) with each one to figure out how they will work for you. In the Javascript space the frameworks stay at the top for 12-18 months max, unless the framework is really good. So, expect changes pretty often and take that as a good thing because they will allow you to always the the latest and greatest UI for your app and products.

Backbone.js is not new, but you can’t go wrong with it. On the bad side, it is not as lightweight as other frameworks, like Agility.js (this is a very lightweight framework that I recommend as a good and very simple starting point).

Javascript templating frameworks

Some JS MVC frameworks come with their own template support, like Backbone that has Underscore and the template support in Underscore.

This article compares the template frameworks http://engineering.linkedin.com/frontend/client-side-templating-throwdown-mustache-handlebars-dustjs-and-more and the top 5 are: closure, mustache, handlebars, dust and underscore. Like with any framework, try out 2-3 and see for yourself which one fits with problem and personal style better. Some people combine mustache with handlebars (for a perfect look 🙂 ).

 

Leave a Reply