Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Knockout.JS Essentials

You're reading from   Knockout.JS Essentials Implement a successful JavaScript-rich application with KnockoutJS, jQuery, and Bootstrap

Arrow left icon
Product type Paperback
Published in Feb 2015
Publisher
ISBN-13 9781784397074
Length 232 pages
Edition 1st Edition
Languages
Arrow right icon
Toc

Table of Contents (10) Chapters Close

Preface 1. Refreshing the UI Automatically with KnockoutJS FREE CHAPTER 2. KnockoutJS Templates 3. Custom Bindings and Components 4. Managing KnockoutJS Events 5. Getting Data from the Server 6. The Module Pattern – RequireJS 7. Durandal – The KnockoutJS Framework 8. Developing Web Applications with Durandal – The Cart Project Index

Durandal life cycle


It is important we understand clearly how a Durandal application works. This is a schema of how your application starts:

  1. The index.html page uses RequireJS to request the main.js file.

  2. The main.js file configures require and defines the main module, which is responsible for the application configuration, and launches the shell module.

  3. The shell module handles the global context of the application. It manages components that will be persistent along the different life cycles. In the starter kit application, it manages the search bar. But it can also manage the log in and log out functionality, for example. The shell module is what configures all routes.

  4. Finally, the router configures the navigation along all the pages the application has.

    Durandal initialization life cycle

The activation life cycle

The activation life cycle controls the activation and the deactivation of the page. Durandal allows us to use predefined methods to access different parts of the cycle. Let's take...

lock icon The rest of the chapter is locked
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 $19.99/month. Cancel anytime
Banner background image