KnockoutJS Web Development
eBook - ePub

KnockoutJS Web Development

John Farrar

Buch teilen
  1. 178 Seiten
  2. English
  3. ePUB (handyfreundlich)
  4. Über iOS und Android verfügbar
eBook - ePub

KnockoutJS Web Development

John Farrar

Angaben zum Buch
Buchvorschau
Inhaltsverzeichnis
Quellenangaben

Häufig gestellte Fragen

Wie kann ich mein Abo kündigen?
Gehe einfach zum Kontobereich in den Einstellungen und klicke auf „Abo kündigen“ – ganz einfach. Nachdem du gekündigt hast, bleibt deine Mitgliedschaft für den verbleibenden Abozeitraum, den du bereits bezahlt hast, aktiv. Mehr Informationen hier.
(Wie) Kann ich Bücher herunterladen?
Derzeit stehen all unsere auf Mobilgeräte reagierenden ePub-Bücher zum Download über die App zur Verfügung. Die meisten unserer PDFs stehen ebenfalls zum Download bereit; wir arbeiten daran, auch die übrigen PDFs zum Download anzubieten, bei denen dies aktuell noch nicht möglich ist. Weitere Informationen hier.
Welcher Unterschied besteht bei den Preisen zwischen den Aboplänen?
Mit beiden Aboplänen erhältst du vollen Zugang zur Bibliothek und allen Funktionen von Perlego. Die einzigen Unterschiede bestehen im Preis und dem Abozeitraum: Mit dem Jahresabo sparst du auf 12 Monate gerechnet im Vergleich zum Monatsabo rund 30 %.
Was ist Perlego?
Wir sind ein Online-Abodienst für Lehrbücher, bei dem du für weniger als den Preis eines einzelnen Buches pro Monat Zugang zu einer ganzen Online-Bibliothek erhältst. Mit über 1 Million Büchern zu über 1.000 verschiedenen Themen haben wir bestimmt alles, was du brauchst! Weitere Informationen hier.
Unterstützt Perlego Text-zu-Sprache?
Achte auf das Symbol zum Vorlesen in deinem nächsten Buch, um zu sehen, ob du es dir auch anhören kannst. Bei diesem Tool wird dir Text laut vorgelesen, wobei der Text beim Vorlesen auch grafisch hervorgehoben wird. Du kannst das Vorlesen jederzeit anhalten, beschleunigen und verlangsamen. Weitere Informationen hier.
Ist KnockoutJS Web Development als Online-PDF/ePub verfügbar?
Ja, du hast Zugang zu KnockoutJS Web Development von John Farrar im PDF- und/oder ePub-Format sowie zu anderen beliebten Büchern aus Computer Science & Web Development. Aus unserem Katalog stehen dir über 1 Million Bücher zur Verfügung.

Information

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

Inhaltsverzeichnis