Archive: 2012/12


Recap my online year 2012

The year 2012 was for me a year that went way to fast. In the year 2012 I learned a lot new stuff, wrote several blog posts and read lots of blog posts and articles. First of all I want you to give a list of all blog posts I wrote this year. You can find the complete list here and here JavaScript Windows 8 Windows Phone ASP.NET MVC .NET C# Powershell I even wrote a non-technical article Second I want to share my starred articles from my reading archive. I used pocket to bookmark, read and archive my articles, which enables me now to share all starred articles with you.


Knockout JS mappings

Knockout JS is a JavaScript library for creating MVVM JavaScript libraries. In a previous post I already showed some of the cool features of Knockout. If you want to spike your knowledge on Knockout a little more first, please visit Knockout’s documentation. In this article I want to zoom in on the Knockout mapping plugin. The Knockout mapping plugin enables you to easy map your JSON object into an observable JavaScript object. So here is a short example of what you’ll be able to do with it. So when you do an ajax request and receive a JSON result you can for example do the following. 12345678910111213141516var viewModel;// result could look like this: "{ "personId": 1, "firstName": "Marco", "lastName": "Franssen", "age": 26, "webpage": "", "twitter": "@marcofranssen" }"$.ajax({ url: '' type: 'GET', dataType: 'JSON', success: function (result) { var data = JSON.parse(result); viewModel = ko.mapping.fromJS(data); ko.applyBindings(viewModel, $('#person').get(0)); }, error: function (result) { //handle the error, left for brevity }});