Practical Dojo Projects.pdf

(7149 KB) Pobierz
652645186 UNPDF
652645186.051.png
Practical Dojo Projects
Frank W. Zammetti
652645186.062.png 652645186.073.png 652645186.084.png 652645186.001.png 652645186.002.png 652645186.003.png 652645186.004.png 652645186.005.png 652645186.006.png 652645186.007.png 652645186.008.png 652645186.009.png 652645186.010.png 652645186.011.png 652645186.012.png 652645186.013.png 652645186.014.png 652645186.015.png 652645186.016.png 652645186.017.png 652645186.018.png 652645186.019.png 652645186.020.png 652645186.021.png
Practical Dojo Projects
Copyright © 2008 by Frank W. Zammetti
All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means,
electronic or mechanical, including photocopying, recording, or by any information storage or retrieval
system, without the prior written permission of the copyright owner and the publisher.
ISBN-13 (pbk): 978-1-4302-1066-5
ISBN-13 (electronic): 978-1-4302-1065-8
Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1
Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence
of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark
owner, with no intention of infringement of the trademark.
Lead Editor: Steve Anglin
Technical Reviewer: Herman van Rosmalen
Editorial Board: Clay Andres, Steve Anglin, Ewan Buckingham, Tony Campbell, Gary Cornell,
Jonathan Gennick, Matthew Moodie, Joseph Ottinger, Jeffrey Pepper, Frank Pohlmann,
Ben Renow-Clarke, Dominic Shakeshaft, Matt Wade, Tom Welsh
Senior Project Manager: Sofia Marchant
Copy Editor: Sharon Wilkey
Associate Production Director: Kari Brooks-Copony
Senior Production Editor: Laura Cheu
Compositor: Dina Quan
Proofreader: Liz Welch
Indexer: Carol Burbo and Ron Strauss
Artist: Kinetic Publishing Services, LLC
Cover Designer: Kurt Krames
Manufacturing Director: Tom Debolski
Distributed to the book trade worldwide by Springer-Verlag New York, Inc., 233 Spring Street, 6th Floor,
New York, NY 10013. Phone 1-800-SPRINGER, fax 201-348-4505, e-mail orders-ny@springer-sbm.com ,or
visit http://www.springeronline.com .
For information on translations, please contact Apress directly at 2855 Telegraph Avenue, Suite 600,
Berkeley, CA 94705. Phone 510-549-5930, fax 510-549-5939, e-mail info@apress.com , or visit
http://www.apress.com .
Apress and friends of ED books may be purchased in bulk for academic, corporate, or promotional use.
eBook versions and licenses are also available for most titles. For more information, reference our Special
Bulk Sales–eBook Licensing web page at http://www.apress.com/info/bulksales .
The information in this book is distributed on an “as is” basis, without warranty. Although every precau-
tion has been taken in the preparation of this work, neither the author(s) nor Apress shall have any
liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly
or indirectly by the information contained in this work.
The source code for this book is available to readers at http://www.apress.com .
652645186.022.png 652645186.023.png 652645186.024.png 652645186.025.png 652645186.026.png 652645186.027.png 652645186.028.png 652645186.029.png 652645186.030.png 652645186.031.png 652645186.032.png 652645186.033.png 652645186.034.png 652645186.035.png 652645186.036.png 652645186.037.png 652645186.038.png 652645186.039.png 652645186.040.png 652645186.041.png 652645186.042.png 652645186.043.png
I’ve written four books now, including this one, and I’ve thanked a lot of people. From the
usual suspects such as my wife, children, parents, and friends, to the unusual: fictional
characters, various food, alien species, and even myself! At one point I said I had dedicated
a book to everyone who matters, but it was my mother-in-law who pointed out I hadn’t
dedicated anything to her and thus hadn’t dedicated a book to everyone who matters.
That got me to thinking. I’ve actually left out a few important people along the way,
so let me try to cover all the bases this time around:
Albert Einstein, Babe Ruth, George Washington, Francis Ford Coppola, Jean-Luc Picard,
Rick Wakeman, John Adams, Galileo Galilei, Lenny Bruce, Les Paul, Leonard Nimoy,
Mickey Mantle, Steve Wozniak, Karl Schwarzschild, Lee Majors, Bruce Campbell,
Robert Kennedy, Wicket the Ewok, Rodney Dangerfield, Ric Flair, Lee and Bill Adama,
Scott Baio, Christian Troy, Wally Schirra, Wilton Parmenter, Rod Serling, Nikolai Volkoff,
the two old men on The Muppet Show , and of course Davros and The Doctor.
Oh yes . . . and my mother-in-law.
Now stop bugging me!
652645186.044.png 652645186.045.png 652645186.046.png 652645186.047.png 652645186.048.png 652645186.049.png 652645186.050.png 652645186.052.png 652645186.053.png 652645186.054.png 652645186.055.png 652645186.056.png 652645186.057.png 652645186.058.png 652645186.059.png 652645186.060.png 652645186.061.png 652645186.063.png 652645186.064.png 652645186.065.png 652645186.066.png 652645186.067.png
Contents at a Glance
About the Author .................................................................xiii
About the Technical Reviewer .......................................................xv
About the Illustrator ..............................................................xvii
Acknowledgments ................................................................xix
Introduction ......................................................................xxi
PART 1 ■■■ Setting the Table
Introduction to Dojo .............................................3
CHAPTER 2
Dojo Core ......................................................41
CHAPTER 3
Dijit ..........................................................115
CHAPTER 4
DojoX ........................................................157
PART 2 ■■■ The Projects
That Human Touch: Contact Manager and
Client-Side Persistence .......................................215
CHAPTER 6
A Place for Your Stuff: Dojo Code Cabinet .....................265
CHAPTER 7
Idiot Blob: The Game! .........................................329
CHAPTER 8
When the Yellow Pages Just Isn’t Cool Enough:
Local Business Search ........................................379
INDEX .......................................................................441
v
CHAPTER 1
CHAPTER 5
652645186.068.png 652645186.069.png 652645186.070.png 652645186.071.png 652645186.072.png 652645186.074.png 652645186.075.png 652645186.076.png 652645186.077.png 652645186.078.png 652645186.079.png 652645186.080.png 652645186.081.png 652645186.082.png 652645186.083.png 652645186.085.png 652645186.086.png 652645186.087.png 652645186.088.png 652645186.089.png 652645186.090.png 652645186.091.png
Zgłoś jeśli naruszono regulamin