KnockoutJS Web Development
eBook - ePub

KnockoutJS Web Development

John Farrar

Condividi libro
  1. 178 pagine
  2. English
  3. ePUB (disponibile sull'app)
  4. Disponibile su iOS e Android
eBook - ePub

KnockoutJS Web Development

John Farrar

Dettagli del libro
Anteprima del libro
Indice dei contenuti
Citazioni

Domande frequenti

Come faccio ad annullare l'abbonamento?
È semplicissimo: basta accedere alla sezione Account nelle Impostazioni e cliccare su "Annulla abbonamento". Dopo la cancellazione, l'abbonamento rimarrà attivo per il periodo rimanente già pagato. Per maggiori informazioni, clicca qui
È possibile scaricare libri? Se sì, come?
Al momento è possibile scaricare tramite l'app tutti i nostri libri ePub mobile-friendly. Anche la maggior parte dei nostri PDF è scaricabile e stiamo lavorando per rendere disponibile quanto prima il download di tutti gli altri file. Per maggiori informazioni, clicca qui
Che differenza c'è tra i piani?
Entrambi i piani ti danno accesso illimitato alla libreria e a tutte le funzionalità di Perlego. Le uniche differenze sono il prezzo e il periodo di abbonamento: con il piano annuale risparmierai circa il 30% rispetto a 12 rate con quello mensile.
Cos'è Perlego?
Perlego è un servizio di abbonamento a testi accademici, che ti permette di accedere a un'intera libreria online a un prezzo inferiore rispetto a quello che pagheresti per acquistare un singolo libro al mese. Con oltre 1 milione di testi suddivisi in più di 1.000 categorie, troverai sicuramente ciò che fa per te! Per maggiori informazioni, clicca qui.
Perlego supporta la sintesi vocale?
Cerca l'icona Sintesi vocale nel prossimo libro che leggerai per verificare se è possibile riprodurre l'audio. Questo strumento permette di leggere il testo a voce alta, evidenziandolo man mano che la lettura procede. Puoi aumentare o diminuire la velocità della sintesi vocale, oppure sospendere la riproduzione. Per maggiori informazioni, clicca qui.
KnockoutJS Web Development è disponibile online in formato PDF/ePub?
Sì, puoi accedere a KnockoutJS Web Development di John Farrar in formato PDF e/o ePub, così come ad altri libri molto apprezzati nelle sezioni relative a Computer Science e Web Development. Scopri oltre 1 milione di libri disponibili nel nostro catalogo.

Informazioni

Anno
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...

Indice dei contenuti