Programming HTML5 Applications.pdf
(
8246 KB
)
Pobierz
Programming HTML5 Applications
Zachary Kessin
Beijing
Cambridge
Farnham
Köln
Sebastopol
Tokyo
•
•
•
•
•
Programming HTML5 Applications
by Zachary Kessin
Copyright © 2012 Zachary Kessin. All rights reserved.
Printed in the United States of America.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.
O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions
are also available for most titles (
http://my.safaribooksonline.com
)
. For more information, contact our
corporate/institutional sales department: (800) 998-9938 or
corporate@oreilly.com
.
Editors:
Andy Oram and Simon St. Laurent
Production Editor:
Jasmine Perez
Copyeditor:
Audrey Doyle
Proofreader:
Kiel Van Horn
Indexer:
Jay Marchand
Cover Designer:
Karen Montgomery
Interior Designer:
David Futato
Illustrator:
Robert Romano
November 2011:
First Edition.
Revision History for the First Edition:
2011-11-8 First release
See
http://oreilly.com/catalog/errata.csp?isbn=9781449399085
for release details.
Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of
O’Reilly Media, Inc.
Programming HTML5 Applications
, the image of a European storm petrel, and
related trade dress are trademarks of O’Reilly Media, Inc.
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as
trademarks. Where those designations appear in this book, and O’Reilly Media, Inc., was aware of a
trademark claim, the designations have been printed in caps or initial caps.
While every precaution has been taken in the preparation of this book, the publisher and author assume
no responsibility for errors or omissions, or for damages resulting from the use of the information con-
tained herein.
ISBN: 978-1-449-39908-5
[LSI]
1320769400
Table of Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
1.
The Web As Application Platform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Adding Power to Web Applications
1
Developing Web Applications
2
JavaScript’s Triumph
4
2.
The Power of JavaScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Nonblocking I/O and Callbacks
7
Lambda Functions Are Powerful
9
Closures
11
Functional Programming
13
Prototypes and How to Expand Objects
16
Expanding Functions with Prototypes
18
Currying and Object Parameters
21
Array Iteration Operations
22
You Can Extend Objects, Too
25
3.
Testing JavaScript Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
QUnit
30
A Simple Example
30
Testing with QUnit
32
Selenium
33
Selenium Commands
35
Constructing Tests with the Selenium IDE
38
Automatically Running Tests
39
Selenese Command Programming Interface
42
Running QUnit from Selenium
45
Selenium RC and a Test Farm
46
iii
Plik z chomika:
tw0jcik
Inne pliki z tego folderu:
Programming JavaScript Applications.pdf
(1726 KB)
Programming HTML5 Applications.pdf
(8246 KB)
HTML5 Architecture.pdf
(2417 KB)
Inne foldery tego chomika:
Git
Proza
Tess Gerritsen
VW Passat
Zgłoś jeśli
naruszono regulamin