官术网_书友最值得收藏!

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.
主站蜘蛛池模板: 满城县| 红河县| 视频| 福清市| 开江县| 白朗县| 兴安县| 兴国县| 宁阳县| 如东县| 财经| 甘洛县| 襄樊市| 通化县| 乌拉特后旗| 平顶山市| 漯河市| 泰宁县| 兴安县| 昔阳县| 眉山市| 张家口市| 崇州市| 巴林左旗| 宜都市| 松滋市| 福泉市| 库尔勒市| 德安县| 荥经县| 城固县| 永和县| 巢湖市| 博乐市| 丰原市| 类乌齐县| 旬邑县| 奎屯市| 阿克苏市| 乌拉特中旗| 海宁市|