Posts

Showing posts from August, 2015

Technical KnockOut

The other day I was working on a little demonstration of using OWIN to serve local files, use dependency injection, and server Web API in a modern SPA (Single Page Application). Almost as an afterthought, I decided to use KnockoutJS and jQuery from a minimal HTML page. This was overheard by colleagues, and a firestorm erupted... "You should have used AngularJS instead; It would take less lines of code." So I pulled down AngularJS and changed my demo to placate the angry threats wishes of the religious zealots thoughtful developers at my desk. For the record, this is the code I wrote using KnockoutJS and jQuery: and here is the AngularJS version: Trying to provide equally readable formatting, the Knockout solution takes one less line of code even though you are loading two JavaScript libraries. The only fair way to count lines is to count semicolons. Both have three. That's a tie. What about the size of the libraries being loaded. Well, Angular includes