Uinzr8jhi534dj2slqgjg8z4csgioa.Pdf
Total Page:16
File Type:pdf, Size:1020Kb
Professional Rich Internet Applications: AJAX and Beyond Dana Moore Raymond Budd Edward Benson Professional Rich Internet Applications: AJAX and Beyond Professional Rich Internet Applications: AJAX and Beyond Dana Moore Raymond Budd Edward Benson Professional Rich Internet Applications: AJAX and Beyond Published by Wiley Publishing, Inc. 10475 Crosspoint Boulevard Indianapolis, IN 46256 www.wiley.com Copyright © 2007 by Wiley Publishing, Inc., Indianapolis, Indiana Published simultaneously in Canada ISBN: 978-0-470-08280-5 Manufactured in the United States of America 10 9 8 7 6 5 4 3 2 1 Library of Congress Cataloging-in-Publication Data is available from the publisher. No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sec- tions 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Pub- lisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permis- sion should be addressed to the Legal Department, Wiley Publishing, Inc., 10475 Crosspoint Blvd., Indianapolis, IN 46256, (317) 572-3447, fax (317) 572-4355, or online at http://www.wiley.com/go/permissions. LIMIT OF LIABILITY/DISCLAIMER OF WARRANTY: THE PUBLISHER AND THE AUTHOR MAKE NO REPRESENTATIONS OR WARRANTIES WITH RESPECT TO THE ACCURACY OR COMPLETENESS OF THE CONTENTS OF THIS WORK AND SPECIFICALLY DISCLAIM ALL WARRANTIES, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE. NO WARRANTY MAY BE CREATED OR EXTENDED BY SALES OR PROMOTIONAL MATERIALS. THE ADVICE AND STRATEGIES CONTAINED HEREIN MAY NOT BE SUITABLE FOR EVERY SITUATION. THIS WORK IS SOLD WITH THE UNDERSTANDING THAT THE PUBLISHER IS NOT ENGAGED IN RENDERING LEGAL, ACCOUNTING, OR OTHER PROFESSIONAL SERVICES. IF PROFESSIONAL ASSISTANCE IS REQUIRED, THE SERVICES OF A COMPETENT PROFESSIONAL PERSON SHOULD BE SOUGHT. NEITHER THE PUBLISHER NOR THE AUTHOR SHALL BE LIABLE FOR DAMAGES ARISING HERE- FROM. THE FACT THAT AN ORGANIZATION OR WEBSITE IS REFERRED TO IN THIS WORK AS A CITATION AND/OR A POTENTIAL SOURCE OF FURTHER INFORMATION DOES NOT MEAN THAT THE AUTHOR OR THE PUBLISHER ENDORSES THE INFORMATION THE ORGANIZATION OR WEBSITE MAY PROVIDE OR RECOMMENDATIONS IT MAY MAKE. FURTHER, READERS SHOULD BE AWARE THAT INTERNET WEBSITES LISTED IN THIS WORK MAY HAVE CHANGED OR DISAP- PEARED BETWEEN WHEN THIS WORK WAS WRITTEN AND WHEN IT IS READ. For general information on our other products and services please contact our Customer Care Department within the United States at (800) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002. Trademarks: Wiley, the Wiley logo, Wrox, the Wrox logo, Programmer to Programmer, and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates, in the United States and other countries, and may not be used without written permission. All other trademarks are the property of their respective owners. Wiley Publishing, Inc., is not associated with any product or vendor mentioned in this book. Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic books. About the Authors Dana Moore is a division scientist with BBN Technologies and is an acknowledged expert in the fields of peer-to-peer and collaborative computing, software agent frameworks, and assistive environments. Prior to joining BBN, Dana was chief scientist for Roku Technologies, and a Distinguished Member of Technical Staff at Bell Laboratories. Dana is a popular conference speaker, a university lecturer, and has published both articles for numerous computing publications, and books, including Peer-to-Peer: Building Secure, Scalable, and Manageable Networks and Jabber Developer Handbook. Dana holds a master of science degree in technology management from the University of Maryland, and a bachelor of science in indus- trial design, also from the University of Maryland. Raymond Budd is a software engineer with BBN Technologies. He has designed, developed, and sup- ported a variety of Web applications and other distributed systems in Java, Ruby, and Python. He has been published in several conference proceedings, such as the Eighteenth National Conference on Artificial Intelligence, and journals, including Applied Intelligence. Additional areas of interest include knowledge representations, knowledge engineering, and distributed planning and scheduling. He received a bachelor of science degree in computer science from the University of Pittsburgh. Edward (Ted) Benson is a software engineer with BBN Technologies. His experience and interests include distributed programming frameworks, multi-agent systems, Web development, and knowledge representation. Ted has developed Web applications for several community groups and companies, and he has been published in IEEE conference proceedings on the subjects of distributed and multi-agent systems. He gradated summa cum laude from the University of Virginia with a bachelor of science degree in computer science. Credits Acquisitions Editor Graphics and Production Specialists Kit Kemper Brooke Graczyk Barbara Moore Development Editor Heather Ryan Maureen Spears Alicia B. South Technical Editor Quality Control Technicians William Wright John Greenough Jessica Kramer Production Editor Brian H. Walls William A. Barton Project Coordinator Copy Editor Adrienne Martinez Luann Rouff Media Development Project Supervisor Editorial Manager Laura Carpenter Van Winkle Mary Beth Wakefield Media Development Specialists Production Manager Angie Penny Tim Tate Kit Malone Kate Jenkins Vice President and Executive Group Publisher Steve Kudirka Richard Swadley Proofreading and Indexing Vice President and Executive Publisher Aptara Joseph B. Wikert Anniversary Logo Design Richard Pacifico Acknowledgments The authors gratefully acknowledge the contributions of our friend and colleague William Wright, whom we cajoled into acting as the technical editor and all-around technical conscience of this book. Our warmest gratitude also to Maureen Spears, our English editor at Wiley, who put up with our terrible geek humor during conference calls and worked tirelessly to bring the quality of this book up to what you see before you. We also appreciate the Web 2.0 luminaries who agreed to share their expertise and candid opinions with us, and our readers for the interviews scattered throughout the book. These include Dojo Toolkit’s Alex Russell, Ruby on Rails’ David Heinemeier Hansson, 37Signals’ Jason Fried, and Second Life’s Wagner James Au. We thank our BBN colleagues John Hebeler, for his entertaining sidebar comments, and Jonathan Nilsson, for his helpful comments. Finally, and most important, we thank our friends, families, and significant others for their forbearance. Writing is a solitary activity that tends to exclude others, even those most important to us; and we appre- ciate all their support, and promise somehow to make up for the lost time and opportunities. For Jane, who “walks in beauty, like the night of cloudless climes and starry skies; And all that’s best of dark and bright meet in her aspect and her eyes,” and for Caitlin, who, like the spring breeze, breathes new life to the suffocated hills, and comes as the herald of each new dawn’s possibilities. —DM For Leah, with love. I am inspired by your intelligence, strength, and beauty, and am immensely grateful for the support and understanding you gave me as I wrote this. Also for my parents with appreciation for everything you’ve taught me throughout my life. —RB For Grace, her warm eyes, gentle wisdom, and wonderful laugh. And for my four parents, who taught me all the important things I know in life. —EB Contents Acknowledgments ix Introduction xxi Part I: An Introduction to RIAs 1 Chapter 1: What Characterizes Rich Internet Applications? 3 Rich Internet Applications are “Plastic” 4 An Example of Plastic (Dynamic) Web Pages 4 How Style Sheets Create a Better Page 6 Rich Internet Applications: The Web Is Disruptive (Finally) 8 Rich Internet Applications Are Invisible 9 Invisibility of Google 10 Focusing Your RIAs 11 Rich Internet Applications Break Down Walled Gardens 12 Rich Internet Applications Create New (Unwalled?) Gardens 13 Constraints in the Unwalled Garden 14 Understanding the Counter-Manifesto 15 Rich Internet Applications Are Always Up-to-Date 17 Rich Internet Applications Are OS Killers 19 Web 2.0 Layering 19 Cascading Style Sheets 20 Leaving the Desktop Behind 20 Is Java a Winner or Loser? 20 Rich Internet Applications Are Browser Centric 21 Rich Internet Applications Are Network Centric 21 Rich Internet Applications Are Mind-Altering 23 Observations from a Developer’s Altered Mind 23 Some Observations from Our Altered Minds 23 Rich Internet Applications Are Software as Service 24 Rich Internet Applications Are User Centered 25 Rich Internet Applications Are Inherently Collaborative 25 Rich Internet Applications: Small and Agile Development 26 Rich Internet Applications Are Bound to Change 26 How Do I Change the Way I Develop Applications? 27 How Am I Going to Make Money from RIAs? 28 Rich Internet Applications Are Seductive 29 Contents Chapter 2: RIA Foundations 35 XML: The Lingua Franca of the Internet 36 Back