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

A real-world application – koCart

In order to demonstrate how to use Knockout in a real application, we are going to build a simple shopping cart called koCart.

First of all we are going to define the user stories. We just need a few sentences to know what we want to achieve, which are as follows:

  • The user should be able to view the catalog
  • We should have the ability to search the catalog
  • The user can click on a button to add items to the catalog
  • The application will allow us to add, update, and delete items from the catalog
  • The user should be able to add, update, and delete items from the cart
  • We will allow the user to update his personal information.
  • The application should be able to calculate the total amount in the cart
  • The user should be able to complete an order

Through user stories, we can see that our application has the following three parts:

  • The catalog, which contains and manages all the products we have in the shop.
  • The cart, which has responsibility for calculating the price of each line and the total amount of the order.
  • The order, where the user can update his personal information and confirm the order.
You have been reading a chapter from
Knockout.JS Essentials
Published in: Feb 2015
Publisher:
ISBN-13: 9781784397074
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