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.
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:
Also you can view some of pluralsight tutorials on Knockout.js: