KnockoutJS essentials implement a successful javascript-rich application with knockoutJS, jquery, and bootstrap
Birmingham, England; Mumbai, [India]: Packt Publishing, 2015
Online
Buch
- 1 Online-Ressource (232 pages)
Zugriff:
Annotation
Controlling descendant bindingsUsing virtual elements; Preprocessing data before binding; Summary; Chapter 4: Managing KnockoutJS Events; Event-driven programming; The click event; Passing more parameters; Allowing the default click action; Event bubbling; Event types; Event binding; Unobtrusive events with jQuery; Delegation pattern; Building custom events; Events and bindings; Summary; Chapter 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
Cover; Copyright; Credits; About the Author; Acknowledgments; About the Reviewers; www.PacktPub.com; Table of Contents; Preface; Chapter 1: Refreshing the UI Automatically with KnockoutJS; KnockoutJS and the MVVM pattern; A real-world application -- koCart; Installing components; The view-model; The view; The model; Observables to refresh the UI automatically; Managing collections with observables; Inserting elements in collections; Computed observables; Summary; Chapter 2: KnockoutJS Templates; Preparing the project; Creating templates; The header template; The catalog template
Generating mock data with MockJSONRetrieving 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; Chapter 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
If you are a JavaScript developer who has been using DOM manipulation libraries such as Mootools or Scriptaculous, and you want go further in modern JavaScript development with a simple and well-documented library, then this book is for you. Learning how to use Knockout will be perfect as your next step towards building JavaScript applications that respond to user interaction
The Services moduleEvents, 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; Chapter 7: Durandal -- The KnockoutJS Framework; Installing Durandal; Durandal patterns; The index.html file
The add-to-cart-modal templateThe cart-widget template; The cart-item template; The cart template; The order template; The finish-order-modal template; Handling templates with if and ifnot bindings; Managing templates with jQuery; Managing templates with koExternalTemplateEngine; Summary; Chapter 3: Custom Bindings and Components; Custom bindings; The toggle binding; The currency binding; Create a binding to debug -- the toJSON binding; Being semantic with our bindings; Wrapping a jQuery plugin into a custom binding; Components -- isolated view-models; Advanced techniques
Titel: |
KnockoutJS essentials implement a successful javascript-rich application with knockoutJS, jquery, and bootstrap
|
---|---|
Autor/in / Beteiligte Person: | Ferrando, Jorge ; Gaonkar, Dipika [Ed.] ; Subramanian, Laxmi [Ed.] ; Robert, Owen [Ed.] ; Lalwani, Puja [Ed.] |
Link: | |
Reihe: | Community Experience Distilled |
Veröffentlichung: | Birmingham, England; Mumbai, [India]: Packt Publishing, 2015 |
Medientyp: | Buch |
Umfang: | 1 Online-Ressource (232 pages) |
ISBN: | 978-1-78439-528-5 (print) ; 1-78439-528-5 (print) |
Schlagwort: |
|
Sonstiges: |
|