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

RequireJS – AMD viewmodels

RequireJS (http://requirejs.org/) is a library that you should have at least heard of already, if not used. This is still a book about Knockout, and if you are planning to use RequireJS in an application, you should read up on it first, but I will still give you a brief overview here.

An overview of RequireJS

RequireJS's purpose is to allow your code to be broken into modules that declare their dependencies so that they can be injected at runtime. This has several important benefits. As RequireJS loads your JavaScript, you don't have to include each script with a script tag in your HTML. As RequireJS loads the scripts based on their dependencies, you don't have to worry about the order they are loaded in. As each module's dependencies are injected, the module can be tested easily with mocks. RequireJS also keeps all the objects it loads out of the global scope, which decreases the likelihood of namespace collisions in addition to being...

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 AU $24.99/month. Cancel anytime