APress - Pro Ajax And The.NET 2.0 Platform (2006).pdf

(11703 KB) Pobierz
30116406 UNPDF
THE EXPERT’S VOICE ® IN WEB DEVELOPMENT
Pro Ajax and the
.NET 2.0 Platform
Daniel Woolston
30116406.039.png 30116406.050.png 30116406.058.png 30116406.066.png 30116406.001.png 30116406.002.png 30116406.003.png 30116406.004.png 30116406.005.png 30116406.006.png 30116406.007.png 30116406.008.png 30116406.009.png 30116406.010.png 30116406.011.png 30116406.012.png 30116406.013.png 30116406.014.png 30116406.015.png 30116406.016.png 30116406.017.png 30116406.018.png 30116406.019.png 30116406.020.png 30116406.021.png 30116406.022.png 30116406.023.png
 
30116406.024.png
 
30116406.025.png
 
30116406.026.png
 
30116406.027.png
 
30116406.028.png 30116406.029.png 30116406.030.png 30116406.031.png 30116406.032.png 30116406.033.png 30116406.034.png 30116406.035.png 30116406.036.png 30116406.037.png 30116406.038.png
 
30116406.040.png 30116406.041.png 30116406.042.png 30116406.043.png 30116406.044.png 30116406.045.png 30116406.046.png 30116406.047.png 30116406.048.png 30116406.049.png 30116406.051.png 30116406.052.png 30116406.053.png 30116406.054.png 30116406.055.png 30116406.056.png 30116406.057.png 30116406.059.png 30116406.060.png 30116406.061.png 30116406.062.png
Pro Ajax and the
.NET 2.0 Platform
Daniel Woolston
30116406.063.png 30116406.064.png 30116406.065.png
Pro Ajax and the .NET 2.0 Platform
Copyright © 2006 by Daniel Woolston
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-59059-670-8
ISBN-10 (pbk): 1-59059-670-6
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: Matthew Moodie
Technical Reviewer: Nick McCollum
Editorial Board: Steve Anglin, Ewan Buckingham, Gary Cornell, Jason Gilmore, Jonathan Gennick,
Jonathan Hassell, James Huddleston, Chris Mills, Matthew Moodie, Dominic Shakeshaft, Jim Sumser,
Keir Thomas, Matt Wade
Project Manager: Julie M. Smith
Copy Edit Manager: Nicole LeClerc
Copy Editor: Ami Knox
Assistant Production Director: Kari Brooks-Copony
Senior Production Editor: Laura Cheu
Compositor: Linda Weidemann, Wolf Creek Press
Proofreader: April Eddy
Indexer: Broccoli Information Management
Artist: April Milne
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 2560 Ninth Street, Suite 219, Berkeley,
CA 94710. Phone 510-549-5930, fax 510-549-5939, e-mail info@apress.com , or visit http://www.apress.com .
The information in this book is distributed on an “as is” basis, without warranty. Although every precaution
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 in the Source Code section.
30116406.067.png
For Terry and Cathy Woolston.
This book is a testament to the perseverance and faith
that you have had throughout the years.
Thank you.
30116406.068.png
Contents at a Glance
About the Author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
About the Technical Reviewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvi
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix
PART 1 n n n Ajax Concepts
n CHAPTER 1
History and Revival of Ajax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
n CHAPTER 2
Introducing JavaScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
n CHAPTER 3
The XmlHttpRequest Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
n CHAPTER 4
N-Tier and Ajax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
PART 2 n n n Ajax Components
n CHAPTER 5
Rich Internet Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
n CHAPTER 6
CSS and the DOM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
n CHAPTER 7
Ajax Frameworks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
PART 3 n n n Concept to Code
n CHAPTER 8 Understanding the Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
n CHAPTER 9 Ajax and Web Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
n CHAPTER 10 Tagging with Ajax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
n CHAPTER 11 Cloning Google Suggest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
n CHAPTER 12 User Controls and Ajax.NET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
n CHAPTER 13 Ajax and Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
n CHAPTER 14 Ajax and Web Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299
iv
30116406.069.png
Zgłoś jeśli naruszono regulamin