Book description
Implement a successful JavaScript-rich application with KnockoutJS, jQuery, and Bootstrap
In Detail
KnockoutJS is a Model View ViewModel (MVVM) framework that allows you to simplify the design of complex user. Knockout makes data manipulation simple and leads to maintainable web applications.
KnockoutJS Essentials gives you an insight into the best practices when designing and building MVVM web applications using the KnockoutJS framework. Packed with real-world tasks, this book starts with an introduction to the Knockout library, helping you make organizational and design decisions. You get a walk-through of the key concepts and terms that are common to development of Knockout applications. Finally, you will learn about the full-stack Knockout framework DurandalJS, which will give you all the tools you need to write complete single-page applications.
What You Will Learn
- Organize and maintain your code when applications begin to grow
- Get to know JavaScript patterns and best practices to keep your code readable
- Bind JavaScript objects and DOM elements with practical examples
- Integrate and manage events to give the user a better experience
- Extend the framework to create your own components
- Create a single-page application using the Durandal JavaScript framework
- Split your application in modules to keep it engrossing and maintainable
- Manage templates to keep your HTML as simple as possible
Table of contents
-
KnockoutJS Essentials
- Table of Contents
- KnockoutJS Essentials
- Credits
- About the Author
- Acknowledgments
- About the Reviewers
- www.PacktPub.com
- Preface
- 1. Refreshing the UI Automatically with KnockoutJS
- 2. KnockoutJS Templates
- 3. Custom Bindings and Components
- 4. Managing KnockoutJS Events
-
5. Getting Data from the Server
- REST services
- Defining CRUD
- Singleton resources
- Setting CRUD operations in the resource
- Using resources in the view-model
- Using Mockjax to mock HTTP requests
- Generating mock data with MockJSON
- Retrieving a product by ID
- Creating a new product
- Separation of concerns – behavior and data
- Creating the product service
- Creating the CartProduct service
- Updating a product
- Deleting a product
- Sending the order to the server
- Handling AJAX errors
- Validating data
- Extending the product model
- Extending the customer model
- Summary
-
6. The Module Pattern – RequireJS
- Installing the Knockout context debugger extension
- The console
- The module pattern
- Creating the Shop module
- The ViewModel module
- The Models module
- The Resources module
- The Services module
- Events, bindings, and Knockout components
- Updating the add-to-cart-button component
- Updating events
- Using RequireJS to manage dependencies
- Updating the template engine
- Configuring RequireJS
- Using RequireJS in our project
- Defining the app.js file
- Converting a normal module into an AMD module
- Applying RequireJS to components
- Applying RequireJS to mocks
- Applying RequireJS to bindings
- Applying RequireJS to events
- The limits of the application
- Summary
- 7. Durandal – The KnockoutJS Framework
- 8. Developing Web Applications with Durandal – The Cart Project
- Index
Product information
- Title: KnockoutJS Essentials
- Author(s):
- Release date: February 2015
- Publisher(s): Packt Publishing
- ISBN: 9781784397074
You might also like
book
Knockout.js
Use Knockout.js to design and build dynamic client-side web applications that are extremely responsive and easy …
book
Getting Started with Knockout.js for .NET Developers
Unleash the power of Knockout.js to build complex ASP.NET web applications In Detail Knockout MVC is …
video
Testable JavaScript
One skill that's essential for any professional JavaScript developer is the ability to write testable code. …
book
KnockoutJS by Example
Develop rich, interactive, and real-world web applications using knockout.js About This Book Master the full range …