Mastering KnockoutJS

Use and extend Knockout to deliver feature-rich, modern web applications

Mastering KnockoutJS

Timothy Moran

1 customer reviews
Use and extend Knockout to deliver feature-rich, modern web applications
Mapt Subscription
FREE
$29.99/m after trial
eBook
$21.00
RRP $29.99
Save 29%
Print + eBook
$49.99
RRP $49.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$21.00
$49.99
$29.99p/m after trial
RRP $29.99
RRP $49.99
Subscription
eBook
Print + eBook
Start 30 Day Trial
Subscribe and access every Packt eBook & Video.
 
  • 5,000+ eBooks & Videos
  • 50+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 
Preview in Mapt

Book Details

ISBN 139781783981007
Paperback270 pages

Book Description

Knockout is a standalone JavaScript implementation of the Model-View-ViewModel (MVVM) pattern with templates.

Mastering KnockoutJS will guide you through web application development with the Knockout library. Starting with covering the basics of KnockoutJS, you will learn how to add new behaviors with custom bindings and preprocessors. Then you will get to see how to make reusable components and organize modules in larger web applications.

This book will teach you how to use a declarative syntax for creating user interfaces that automatically sync with the changing data. You will also learn to organize applications with the MVVM pattern, which helps you stay organized and simplifies the process of continued product growth.

Finally, you will cover popular open source plugins such as Knockout punches and Durandal to see what is possible with Knockout's extensible API.

Table of Contents

Chapter 1: Knockout Essentials
The environment setup
An overview of Knockout
Observables
Defining viewmodels
The data-bind syntax
Control flow bindings
Template binding
Containerless control flow
Extenders
The Contacts List application
Summary
Chapter 2: Extending Knockout with Custom Binding Handlers
The data binding pattern
Components of a binding handler
Simple binding handlers
Advanced binding handlers
Containerless syntax with custom bindings
Summary
Chapter 3: Extending Knockout with Preprocessors and Providers
Binding the handler preprocessing
Node preprocessors
Binding providers
Knockout punches
Summary
Chapter 4: Application Development with Components and Modules
RequireJS – AMD viewmodels
Components
Single Page Application (SPA) routing
Summary
Chapter 5: Durandal – the Knockout Framework
An overview of the Durandal framework
The composition system
Using the router
Modal dialogs
The application's life cycle
Widgets
Summary
Chapter 6: Advanced Durandal
Publishing and subscribing
Handling logins
Guarded routes
Advanced composition
Child routers
Custom modal dialogs
Using activators
Binding to plain JavaScript objects
Summary
Chapter 7: Best Practices
Sticking to MVVM
Using service modules
Creating small modules
Writing unit tests
Singleton versus instance
Calling ko.applyBindings once (per root)
Performance concerns
Summary
Chapter 8: Plugins and Other Knockout Libraries
Knockout Validation
Knockout Mapping
Knockout Kendo
KoGrid
Knockout Bootstrap
Knockout Switch-Case
Knockout Projections
Knockout-ES5
Summary
Chapter 9: Under the Hood
Dependency tracking
The prototype chain
The binding expression parser
Applying bindings
Templates
The ko.utils reference
Summary

What You Will Learn

  • Add custom binding handlers to extend functionality
  • Customize binding syntax using preprocessors and binding providers
  • Build reusable controls with the web components system, new to Knockout 3.2
  • Organize viewmodels and modules in real web applications
  • Use Durandal to create fully-featured Single Page Applications (SPA)
  • Explore Knockout's source code with detailed explanations to update the UI dynamically
  • Create full web applications using binding preprocessors, node preprocessors, and the Knockout Punches library
  • Customize Knockout to add functionality and integrate with third-party libraries

Authors

Table of Contents

Chapter 1: Knockout Essentials
The environment setup
An overview of Knockout
Observables
Defining viewmodels
The data-bind syntax
Control flow bindings
Template binding
Containerless control flow
Extenders
The Contacts List application
Summary
Chapter 2: Extending Knockout with Custom Binding Handlers
The data binding pattern
Components of a binding handler
Simple binding handlers
Advanced binding handlers
Containerless syntax with custom bindings
Summary
Chapter 3: Extending Knockout with Preprocessors and Providers
Binding the handler preprocessing
Node preprocessors
Binding providers
Knockout punches
Summary
Chapter 4: Application Development with Components and Modules
RequireJS – AMD viewmodels
Components
Single Page Application (SPA) routing
Summary
Chapter 5: Durandal – the Knockout Framework
An overview of the Durandal framework
The composition system
Using the router
Modal dialogs
The application's life cycle
Widgets
Summary
Chapter 6: Advanced Durandal
Publishing and subscribing
Handling logins
Guarded routes
Advanced composition
Child routers
Custom modal dialogs
Using activators
Binding to plain JavaScript objects
Summary
Chapter 7: Best Practices
Sticking to MVVM
Using service modules
Creating small modules
Writing unit tests
Singleton versus instance
Calling ko.applyBindings once (per root)
Performance concerns
Summary
Chapter 8: Plugins and Other Knockout Libraries
Knockout Validation
Knockout Mapping
Knockout Kendo
KoGrid
Knockout Bootstrap
Knockout Switch-Case
Knockout Projections
Knockout-ES5
Summary
Chapter 9: Under the Hood
Dependency tracking
The prototype chain
The binding expression parser
Applying bindings
Templates
The ko.utils reference
Summary

Book Details

ISBN 139781783981007
Paperback270 pages
Read More
From 1 reviews

Read More Reviews

Recommended for You

Mastering Web Application Development with AngularJS Book Cover
Mastering Web Application Development with AngularJS
$ 26.99
$ 5.40
AngularJS Web Application Development Blueprints Book Cover
AngularJS Web Application Development Blueprints
$ 29.99
$ 21.00
AngularJS UI Development Book Cover
AngularJS UI Development
$ 26.99
$ 18.90
Bootstrap Site Blueprints Book Cover
Bootstrap Site Blueprints
$ 26.99
$ 18.90
Object-Oriented JavaScript - Second Edition Book Cover
Object-Oriented JavaScript - Second Edition
$ 29.99
$ 21.00
Responsive Web Design with HTML5 and CSS3 Book Cover
Responsive Web Design with HTML5 and CSS3
$ 23.99
$ 4.80