Knockout.js Meetup in Rotterdam
Two days ago I went to Knockout.js Meetup in Rotterdam, I always find it pleasant to hang with programmers and acquire new ideas from any programmer despite the background or the language his programming.
As for Knockout.js it was always a curiosity for me, as I have to deal sometimes with JavaScript and I never been on a project with Knockout.js. In the recent years I did work on AngularJS and lately I’m busy building an application AngularJS with KendoUI.
The meeting went perfect, the food was nice and Pascal van de Blankevoort was the host a very experienced guy with Knockout.js.
The fun part was the programming on the fly, we did some cool stuff at http://learn.knockoutjs.com/#/?tutorial=intro creativity in groups can turn a meetup into enjoyable event!
As for the integration, Pascal showed us how we could integrate knockout.js with MVC, It is nice to see how easy is the integration process but for me I’m Heterogony evangelist, I like to keep everything separated fully…
As I’m experienced with AngularJS and jQuery before that, I was trying to translate everything I heard to how I could do it in AngularJS, I noticed Knockout.js is a library and not a framework.
That said, we can’t really compare AngularJS with Knockout.js in my opinion they are both great but each for the right purpose. (Just the same concept that applies to any programming language)
Knockout.js does not depend on JQuery or create its own version of it. But, having said that, Knockout is a data-binding library. It does not have any opinions or implementations for doing Ajax or DOM querying. If you don’t include JQuery, you are free to do Ajax and DOM manipulation either directly or with some other library.
Knockout.js is very easy to learn… and easy to master, on the other hand you can make a big mass with Knockout.js as it does not give you a ready-made architecture, it lives a lot of decisions up to you.
So basically its light weight library that can be used for any data binding solution, but the question that stayed in my head… would it fit for full scale SPA application? At the end I support “Single Page Applications†and my own beliefs of using restful with SPA as the right choice to be made is based on my years of experience in this field, I’m against server side rendering for front end and one of the major reasons is basically you are delivering a static html/js/css files that talk back to your service, even with limited internet speed and connectivity.
Back to Knockout.js can we use JUST Knockout.js for SPA? NO… Is it very easy? NO!
You need much more than just Knockout.js to build such an application, from Routing to directives & so on… you will need other libraries included, that’s said it is totally possible to build a “LARGE single page application with Knockout.js†and it’s pretty cool to try it out.
At the end, Microsoft Azure Portal is built with Knockout.js, with Knockout.js you have more freedom which could bring risks, but at the same time brings powers.
If you would like to learn more about Knockout.js, please watch a very nice video by Steven Sanderson:
Steve Sanderson – Architecting large Single Page Applications with Knockout.js from NDC Conferences on Vimeo.
Also you can view some of pluralsight tutorials on Knockout.js:
http://www.pluralsight.com/courses/knockout
http://www.pluralsight.com/courses/knockout-validation-library