Thoughts from the Wet Coast

The musings of an ASP.NET Developer from Canada's We(s)t Coast

Articles

image

Browser based JavaScript code is all about manipulating the browser’s DOM. 

Up until a few years ago, at DNN Corp we had primarily been using jQuery to do that manipulation.  Don’t get me wrong jQuery is an awesome framework, but jQuery directly manipulates the DOM  -  there is no concept of working with models/objects in jQuery – i.e. separating your presentation aspects from your other logic.

Mar 21 2015

Its been a while since I posted a blog in my Knockout series.  In the last couple of posts in this series we reviewed how Knockout implements the concept of Observable Arrays.  Observable Arrays support the idea of detecting when objects are added and removed from the array.  For a complete solution though we actually will want the array to contain observable objects so we can also detect when changes are made to each item.

Mar 20 2014

Christmas-Happy-New-year-2014-HD-WallpaperA Happy New Year to all readers of my Blog.  I hope 2013 was a good year for you and that 2014 will be prosperous for you and yours.

Here on the Wet Coast,  one of my New Year’s resolutions has been to be more regular in my blogging activity, and I have already made some plans in that regard.

Jan 9 2014


In previous posts in this series I introduced the concept of observables, and I referred to the concept of Observable Collections in Xaml (WPF and Silverlight) applications.  Knockout also supports the concept of observable collections, although because JavaScript only has one collection type they are observable arrays.

Just as an observable responds to changes in an object, an observable array responds to a change in the number of items in the array.  It tracks which objects are in the array - not the state of those objects.

Aug 16 2013

So far we have seen how we can set up simple observable values.  But what if we want to have calculated values in our ViewModel.

Lets extend our ViewModel from the previous examples, by renaming our personName property as firstName and add a second property called lastName.

Aug 15 2013

So far in this series on Knockout.js we have seen how to do simple data-binding and how to use observables to automatically update the data bound elements.  The real power of knockout though is its support of two-way data-binding. 

What do we mean my two-way data-binding?

ASP.NET developers are familiar with the concept of data-binding - the ability to bind a control to a data source and update the control based on the value of the data source.  Two way data-binding allows the control (View) to update the data source if its value changes.

Aug 10 2013

In the previous post in this series I introduced the concept of simple one-way data binding.  However the real power of knockout is its support of observables and two-way binding. 

The concept of observable objects or observable collections was developed for WPF (Xaml) and Silverlight. 

Aug 8 2013



Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

Categories

Tags