Shelving Category: COMPUTERS / Internet / Web Page Design Reader Level: Beginning to Advanced $44.99 USA $53.99 Canada Integrate Java and Flex for dynamic applications Make your Web applications rich Build a chat client or a storefront Keefe Christiansen The book you need to succeed! Marry Java and Flex to live happily ever after in Web development bliss Whether you’re a designer who wants to master programming or a creative developer seeking to broaden your skills beyond coding, now you have two powerful tools and a valuable guide to get you there. anks to the step-by-step instructions and practical examples in this in-depth book, you’ll quickly get up to speed on relational databases, learn the ins and outs of Java and Flex, and discover the art and science of mashups by mixing code and graphics to create custom interfaces. • Set up the Java development environment and confi gure Flex • Send data from Flex and start writing Java Web applications • Create a storefront server application with Java • Develop a storefront client application with Flex • Connect Java and Flex to create a real-time messaging system • Confi gure Cascading Style Sheets for custom interfaces • Master advanced concepts, including enterprise-level development Java ® and Flex ® Integration Matthew Keefe is a new-media designer and developer with a strong background in application development for the Web and offl ine. Matt is the author of the Flash and PHP Bible. Charles A. Christiansen Jr. is a senior software engineer who currently uses Java and Flex 3. Charles has written applications that run the gamut — from heavy client Java applications that use RMI over dialup to fast, lightweight Web applications that use Spring and Hibernate. Spine: 1.104" Matthew Keefe and Charles A. Christiansen Jr. Java ® and Flex ® Integration Learn how to connect Java and Flex to build real-world applications www.it-ebooks.info www.it-ebooks.info Java ® and Flex ® Integration Bible www.it-ebooks.info www.it-ebooks.info Java ® and Flex ® Integration Bible Matthew Keefe and Charles A. Christiansen Jr. www.it-ebooks.info 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. www.it-ebooks.info 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. www.it-ebooks.info 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. www.it-ebooks.info Credits Acquisitions Editor Courtney Allen Project Editor Christopher Stolle Technical Editor Darron Schall and 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 www.it-ebooks.info www.it-ebooks.info [...]... Installation and Getting Started 1 Chapter 1: Setting Up the Java Development Environment .3 Chapter 2: Configuring Flex for Java Development .37 Chapter 3: Similarities between Java and Flex .61 Chapter 4: Understanding the Flex Application Development Process 85 Part II: Connecting Java and Flex 111 Chapter 5: Sending Data from Flex ... install and/ or configure Java, Flex, and various development tools for each You also learn some basic concepts involved in Java and Flex programming, including more about the syntax and constructs of each language Once you’ve finished part one, you have the basic foundation you need to start diving into development The second part builds upon this foundation and introduces you to specific Java and Flex. .. Installation and Getting Started IN THIS PART Chapter 1 Setting Up the Java Development Environment Chapter 2 Configuring Flex for Java Development Chapter 3 Similarities between Java and Flex Chapter 4 Understanding the Flex Application Development Process www.it-ebooks.info www.it-ebooks.info Setting Up the Java Development Environment B efore you start working with Java, you need to set up a Java development... topics You learn how to work with relational databases, develop Java Web applications, and send data from a Flex application You also learn about unit testing in both Java and Flex, allowing you to ensure that your code is functioning as you expect After completing this part, you understand how to develop applications by using Java and Flex and then how to test those applications In the final part, you... a software development kit and user interface components that allow developers to create Flash applications by using familiar software development tools and methodologies When you integrate Java and Flex in a Web application, you get the best of both worlds You get the power and stability that Java provides on the server side and the rich, dynamic user interfaces that Flex and Adobe Flash Player make... Chapter 2: Configuring Flex for Java Development . . . . . . . . . . . . . . . . 37 Configuring Flex 37 The Java and Flex project type 38 The Flex Library project type 46 Testing the Configuration 48 Testing online 48 Reading debug messages 54 Summary 60 Chapter 3: Similarities between Java and Flex. . . . . . . . . . . . . . . . . . . . . ... installing the Java Standard Edition (SE) Development Kit and the JBoss application server and then configuring the server to use the Java Development Kit (JDK) you just installed After that, you must install Apache Ant and the Eclipse integrated development environment (IDE), which you also configure to use the same JDK and to control your JBoss server Because Java is multiplatform, and JBoss, Ant, and Eclipse... color and bodyType properties, invokes its start() method, and invokes accelerate() until the value of the currentSpeed property reaches 55 Finally, the Car object’s stop() method is invoked The Java SE Development Kit The first thing you need to get started with Java development is Java itself The Java SE Development Kit, or JDK, contains both the Java runtime needed to run Java applications and the Java. .. the stand-alone IDE and Eclipse plug-in — to a Java back end Once the basics of installing and configuring Java and Flex are completed, you learn how to build real-world applications, such as a chat client, a storefront, and a back-end administration tool for the same store This book is for beginning to advanced developers interested in developing rich Internet applications that go beyond the standard... information and add the overall usefulness for the end user Java can help you write the back end that provides data to your Flex applications and makes them more dynamic and useful Java has a number of frameworks, development tools, and libraries that can make developing powerful, data-driven Web applications faster and less complicated than other platforms In this book, you learn how to connect Flex — . Jr. Java ® and Flex ® Integration Learn how to connect Java and Flex to build real-world applications www.it-ebooks.info www.it-ebooks.info Java ® and. applications www.it-ebooks.info www.it-ebooks.info Java ® and Flex ® Integration Bible www.it-ebooks.info www.it-ebooks.info Java ® and Flex ® Integration Bible Matthew Keefe and Charles A. Christiansen