KnockoutJS Web Development
eBook - ePub

KnockoutJS Web Development

John Farrar

Compartir libro
  1. 178 páginas
  2. English
  3. ePUB (apto para móviles)
  4. Disponible en iOS y Android
eBook - ePub

KnockoutJS Web Development

John Farrar

Detalles del libro
Vista previa del libro
Índice
Citas

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es KnockoutJS Web Development un PDF/ePUB en línea?
Sí, puedes acceder a KnockoutJS Web Development de John Farrar en formato PDF o ePUB, así como a otros libros populares de Computer Science y Web Development. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Año
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...

Índice