KnockoutJS Web Development
eBook - ePub

KnockoutJS Web Development

John Farrar

Partager le livre
  1. 178 pages
  2. English
  3. ePUB (adapté aux mobiles)
  4. Disponible sur iOS et Android
eBook - ePub

KnockoutJS Web Development

John Farrar

DĂ©tails du livre
Aperçu du livre
Table des matiĂšres
Citations

Foire aux questions

Comment puis-je résilier mon abonnement ?
Il vous suffit de vous rendre dans la section compte dans paramĂštres et de cliquer sur « RĂ©silier l’abonnement ». C’est aussi simple que cela ! Une fois que vous aurez rĂ©siliĂ© votre abonnement, il restera actif pour le reste de la pĂ©riode pour laquelle vous avez payĂ©. DĂ©couvrez-en plus ici.
Puis-je / comment puis-je télécharger des livres ?
Pour le moment, tous nos livres en format ePub adaptĂ©s aux mobiles peuvent ĂȘtre tĂ©lĂ©chargĂ©s via l’application. La plupart de nos PDF sont Ă©galement disponibles en tĂ©lĂ©chargement et les autres seront tĂ©lĂ©chargeables trĂšs prochainement. DĂ©couvrez-en plus ici.
Quelle est la différence entre les formules tarifaires ?
Les deux abonnements vous donnent un accĂšs complet Ă  la bibliothĂšque et Ă  toutes les fonctionnalitĂ©s de Perlego. Les seules diffĂ©rences sont les tarifs ainsi que la pĂ©riode d’abonnement : avec l’abonnement annuel, vous Ă©conomiserez environ 30 % par rapport Ă  12 mois d’abonnement mensuel.
Qu’est-ce que Perlego ?
Nous sommes un service d’abonnement Ă  des ouvrages universitaires en ligne, oĂč vous pouvez accĂ©der Ă  toute une bibliothĂšque pour un prix infĂ©rieur Ă  celui d’un seul livre par mois. Avec plus d’un million de livres sur plus de 1 000 sujets, nous avons ce qu’il vous faut ! DĂ©couvrez-en plus ici.
Prenez-vous en charge la synthÚse vocale ?
Recherchez le symbole Écouter sur votre prochain livre pour voir si vous pouvez l’écouter. L’outil Écouter lit le texte Ă  haute voix pour vous, en surlignant le passage qui est en cours de lecture. Vous pouvez le mettre sur pause, l’accĂ©lĂ©rer ou le ralentir. DĂ©couvrez-en plus ici.
Est-ce que KnockoutJS Web Development est un PDF/ePUB en ligne ?
Oui, vous pouvez accĂ©der Ă  KnockoutJS Web Development par John Farrar en format PDF et/ou ePUB ainsi qu’à d’autres livres populaires dans Computer Science et Web Development. Nous disposons de plus d’un million d’ouvrages Ă  dĂ©couvrir dans notre catalogue.

Informations

Année
2015
ISBN
9781782161028

KnockoutJS Web Development


Table of Contents

KnockoutJS Web Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Getting Started with KnockoutJS
Installing KnockoutJS
Looking at MVVM
Binding DOM elements using Knockout
Binding text
Binding HTML
Binding CSS
Binding numbers
Managing visibility
Multibound control
Power development using browser developer tools
The Knockout debugger
Shortcuts
The DOM inspection
The AJAX inspection
The resource inspection
The device emulation
Using internal functions with Knockout
Preventing hidden features
Automating calculations with Knockout
Subtotal calculation
Tax time
Final total
Working with non-Knockout functions
Summary
2. Using Arrays, Nesting, and Grids
Conditional binding
Introduction to arrays in Knockout
Working with array collections
Removing the last item
Sorting time
The simpleGrid plugin
Running the code
Final sort
Summary
3. Giving Forms the Knockout Touch
Event binding
The binding markup
The binding checkbox with visibility
Modifier keys
Default actions
Preventing bubbling
The textInput binding
Dynamic focus
Radio and checkbox binding
Enhanced event integration
Select binding
Selecting elements with the object collections
Listing the management Knockout style
The uniqueName binding
Grid forms
Summary
4. Coding – AJAX, Binding Properties, Mapping, and Utilities
JSON done Knockout style
Mapping – first look
Connecting with AJAX remotely
Unmapping your data
Merging mapped data
Mapping options
Utility functions
ko.utils.arrayFilter()
ko.utils.arrayFirst()
ko.utils.arrayMap()
ko.utils.arrayGetDistinctValues ()
ko.utils.arrayForEach()
ko.utils.compareArrays()
Purifying our computations
Coding documents for computed observables
Form 1
Form 2
Form 3
Form 4
Using a computed observable
Using the computed context
Summary
5. The Joy of Templates
Native templates
Enhanced collection handling
Render event handling
Third-party template options
Modified template handling with Underscore
Live updates and the subscribe method in Knockout
Awesome template options
Summary
6. Packaged Elegance
Introduction to components
Dynamic component selection
Bring Your Own Tags (BYOT)
Enhancing attribute handling
Building your own libraries
Bootstrap component example
Understanding the AMD approach
Component-based SPAs
Best development strategies
Getting real
Coding time
Adding navigation
Adding pages
Time for some custom style
Bonus item
Building cross-page interaction
What next?
Summary
Index

KnockoutJS Web Development

Copyright © 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: February 2015
Production reference: 1210215
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78216-102-8
www.packtpub.com

Credits

Author
John Farrar
Reviewers
Paul Manzotti
Julia Rechkunova
Tatsuro Shibamura
Cristian Trifan
Saul Wiggin
Commissioning Editor
Mary Nadar
Acquisition Editor
Nikhil Karkal
Content Development Editor
Manasi Pandire
Technical Editor
Prajakta Mhatre
Copy Editors
Puja Lalwani
Vikrant Phadke
Laxmi Subramanian
Project Coordinator
Leena Purkait
Proofreaders
Simran Bhogal
Maria Gould
Paul Hindle
Chris Smith
Indexer
Mariammal Chettiyar
Production Coordinator
Manu Joseph
Cover Work
Manu Joseph

About the Author

John Farrar is a man who has a passion for pragmatic technology. He started working on computers in the late 70s and has watched the trends as closely as he watches the milestones. His work included programming on early computers, repairing military flight simulators in the navy, and working on web technology that helps people get business done. This work included building early commerce solutions for Apple, Brunswick Recreation, and Casio and working for a number of other companies along the letters of the alphabet. He is inspired and passionate about understanding the need before choosing the technology that answers the challenge.
Over the years, John has worked on a couple of books for ColdFusion, multiple open source projects from early Fusebox, community participation with jQuery, and some frameworks he created on his own. He has spoken at about a dozen conferences over the years and worked on supporting local and online users as time has permitted. He has provided technical training from online courses, in person class instructions, and a number of great intern programmers that let him share their entrance into the world of writing software.

About the Reviewers

Paul Manzotti created his first website in 1995, running the newly released CERN httpd on a spare Silicon Graphics machine in the lab he was working in.
A decade of designing websites progressing into mild programming using Microsoft's ASP technology ended with him going back to university to gain an MSc in computer programming.
Then he came out fully armed as a programmer and started using ASP.NET with a lot of heavy JavaScript work; that's what single-page applications (SPA) are all about. And hence, when single-page applications became a thing, he was more than happy to dive into it.
He is a senior developer at Purple Bricks (https://www.purplebricks.com/).
Julia Rechkunova is a software engineer who is inspired by web development and design. She has over 4 years of experience and focuses on the quality and usability of web applications. She enjoys working as a frontend developer as well as a backend developer. Modern web technologies and tools are the best instruments that help her bui...

Table des matiĂšres