Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
MASTERING KNOCKOUTJS

You're reading from   MASTERING KNOCKOUTJS Use and extend Knockout to deliver feature-rich, modern web applications

Arrow left icon
Product type Paperback
Published in Nov 2014
Publisher
ISBN-13 9781783981007
Length 270 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Timothy Moran Timothy Moran
Author Profile Icon Timothy Moran
Timothy Moran
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. Knockout Essentials 2. Extending Knockout with Custom Binding Handlers FREE CHAPTER 3. Extending Knockout with Preprocessors and Providers 4. Application Development with Components and Modules 5. Durandal – the Knockout Framework 6. Advanced Durandal 7. Best Practices 8. Plugins and Other Knockout Libraries 9. Under the Hood Index

The data binding pattern

This section is primarily philosophical. If you feel like you already have a solid understanding of the what and why behind the Model-View-ViewModel (MVVM) pattern and binding handlers, then you might want to skip to the next section, Components of a binding handler.

Okay, let's talk about patterns and practices. If you haven't worked with WPF before, then the MVVM pattern is probably the most confusing thing about Knockout. MVVM is a pattern that came out of Microsoft. It doesn't get a lot of attention outside the .NET community, and it's similar enough to the far more popular MVC pattern because of which confusion is nearly guaranteed.

In MVVM, the viewmodel is supposed to represent an abstraction of the view. Consider these two lists of message threads in iOS:

The data binding pattern

They both show a list of threads, and each thread contains a title showing the person it is with, an excerpt from the most recent message, and a timestamp. A thread can be selected or...

You have been reading a chapter from
MASTERING KNOCKOUTJS
Published in: Nov 2014
Publisher:
ISBN-13: 9781783981007
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime