Java and Flex Integration Bible
Matthew Keefe and Charles A. Christiansen Jr.
Java and Flex Integration Bible
Published by
Wiley Publishing, Inc.
10475 Crosspoint Boulevard
Indianapolis, IN 46256
www.wiley.com
Copyright 2009 by Wiley Publishing, Inc., Indianapolis, Indiana
Published by Wiley Publishing, Inc., Indianapolis, Indiana
Published simultaneously in Canada
ISBN: 978-0-470-40074-6
Manufactured in the United States of America
10 9 8 7 6 5 4 3 2 1
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 Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, 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 permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, 201-748-6011, fax 201-748-6008, 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 herefrom. 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 disappeared between when this work was written and when it is read.
For general information on our other products and services or to obtain technical support, please contact our Customer Care Department within the U.S. at (800) 762-2974, outside the U.S. at (317) 572-3993 or fax (317) 572-4002.
Library of Congress Control Number: 2009920909
Trademarks: Wiley, the Wiley logo, 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. Java is a registered trademark of Sun Microsystems, Inc. Flex is a registered trademark of Adobe Systems Incorporated. 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.
In memory of my best friend, Andrew Lenihan.
To Eileen, for all your love and support; and to my mom, who always wanted to see my name in print.
About the Authors
Charles A. Christiansen Jr. is a full-time Java application developer. Over the past 11 years, he has worked on teams that have developed a wide variety of e-learning and classroom management applications. Charles has written applications by using the gamut of Java application technologies, from the heavy client Java application using RMI over dialup connections to fast, lightweight Web applications using Spring and Hibernate. He holds a Master of Science degree in Internet Engineering from the Graduate Center of Marlboro College.
Charles lives in the metro Boston area with his wife Eileen and their irascible cat Tigger. In his spare time, he enjoys cooking, especially barbecue, and photography.
Matthew Keefe is a new-media designer, developer, author, and trainer with a strong background in application development for the Web and offline platforms. Originally a full-time graphic artist, he found that much of the programming associated with his design work was being outsourced. Matthew quickly learned programming for the Web and uncovered a valuable but little-known skill set in this industry: the ability to build a site and to also powerfully design it.
Matthew recently authored the Flash and PHP Bible, has contributed to various Flex and Flash magazines, and runs http://scriptplayground.com for other programmers to learn from. You can find more information on his personal site at http://mkeefe.com .
Matthew has worked with several companies and studios, including Inverted Creative, Delphi, PhotoshopCAFE, Kineticz Interactive, Organi Studios, Bent 360, and ORCA Media, Inc. He lives in Carver, Massachusetts.
Credits
Acquisitions Editor
Courtney Allen
Project Editor
Christopher Stolle
Technical Editors
Darron Schall
Gerry Power
Copy Editor
Marylouise Wiack
Editorial Manager
Robyn Siesky
Business Manager
Amy Knies
Senior Marketing Manager
Sandy Smith
Vice President and Executive Group Publisher
Richard Swadley
Vice President and Executive Publisher
Barry Pruett
Project Coordinator
Lynsey Stanford
Graphics and Production Specialists
Ana Carrillo
Jennifer Mayberry
Sarah Philippart
Quality Control Technicians
Laura Albert
Amanda Graham
Proofreading
Kathy Simpson
Indexing
Sharon Shock
Charles A. Christiansen Jr.: I would like to thank Matthew Keefe for asking me to do this book with him, my lovely wife Eileen for encouraging me through this whole process, Courtney Allen and Christopher Stolle for being so great to work with, Kevin Polk for bringing me into the world of Java development so many years ago, and my parents for teaching me the value of hard work and encouraging me to fully pursue my interests.
Matthew Keefe: I would like to thank all the folks at Wiley for making this book a reality. A special thanks to acquisitions editor Courtney Allen and project editor Christopher Stolle. I would also like to thank my friends and family Philip, Daz, Colin, Teisha, John, Brooke, Frank, and my mom for their support. And lastly, I would like to thank my dad for getting me started in technology when I was younger and making it possible to do what I love.
For years, Java has been used to develop Web applications that allow users to access server-side data through user interfaces presented in a Web browser. Generally, the user interfaces for these applications have been presented to the user as HTML by using technologies such as Java Server Pages (JSP) to insert server-side data into the user interface to create dynamic, data-driven applications.