Book Image

Mastering KnockoutJS

By : Timothy Moran
Book Image

Mastering KnockoutJS

By: Timothy Moran

Overview of this book

Table of Contents (16 chapters)
Mastering KnockoutJS
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

An overview of the Durandal framework


Durandal is built on top of Knockout, jQuery, and RequireJS. Durandal's core is a collection of AMD modules, which provide composition, events, and activation features, as well as some utility functions. In addition to the core modules, Durandal also provides several plugins that can optionally be activated, or added to with community or personal plugins. The plugins include the router (a basic requirement for every SPA framework), dialogs, and widgets.

Note

The documentation for Durandal can be found at http://durandaljs.com/docs.html.

Promises

To bring all of this together, Durandal's internal and external communication is handled through promises. If you aren't familiar with JavaScript promises—sometimes called thenables because they provide a then method—you're missing out. To explain briefly, promises change the way asynchronous actions are handled by replacing a callback with a return object that represents the asynchronous work. It allows asynchronous...