Java® and Flex® Integration Bible

Book description

Providing you with invaluable information for delivering rich, cross-platform Internet applications within the enterprise and across the web, this book shows you how to fully integrate Java and Flex. Pages of examples, step-by-step instructions, and from-the-field techniques guide you through the creation of your first Java/Flex applications.

Table of contents

  1. Copyright
  2. About the Authors
  3. Credits
  4. Acknowledgments
  5. Introduction
    1. Using the Icons
    2. How This Book Is Organized
  6. I. Installation and Getting Started
    1. 1. Setting Up the Java Development Environment
      1. 1.1. The Java Programming Language
        1. 1.1.1. Object-oriented programming
        2. 1.1.2. Key Java concepts
        3. 1.1.3. Java syntax
      2. 1.2. The Java SE Development Kit
        1. 1.2.1. Installing the JDK
        2. 1.2.2. Configuring the JDK
      3. 1.3. The JBoss Application Server
        1. 1.3.1. Installing JBoss
        2. 1.3.2. Configuring JBoss
      4. 1.4. Apache Ant
        1. 1.4.1. Installing Apache Ant
        2. 1.4.2. Configuring Apache Ant
      5. 1.5. The Eclipse Integrated Development Environment
        1. 1.5.1. Installing the Eclipse IDE
        2. 1.5.2. Configuring the Eclipse IDE
      6. 1.6. Summary
    2. 2. Configuring Flex for Java Development
      1. 2.1. Configuring Flex
        1. 2.1.1. The Java and Flex project type
        2. 2.1.2. The Flex Library project type
      2. 2.2. Testing the Configuration
        1. 2.2.1. Testing online
        2. 2.2.2. Reading debug messages
      3. 2.3. Summary
    3. 3. Similarities between Java and Flex
      1. 3.1. What Makes Java and Flex Similar?
        1. 3.1.1. Code structure
        2. 3.1.2. Libraries
          1. 3.1.2.1. Model-View-Controller implementations
          2. 3.1.2.2. Unit testing libraries
        3. 3.1.3. Development tools
      2. 3.2. How These Similarities Help with Integration
        1. 3.2.1. Team building
        2. 3.2.2. Multiapplication integration
      3. 3.3. Summary
    4. 4. Understanding the Flex Application Development Process
      1. 4.1. Working with Packages and Classes
        1. 4.1.1. Packages
        2. 4.1.2. Classes
          1. 4.1.2.1. Getters/setters
          2. 4.1.2.2. Multiple classes in the same file
        3. 4.1.3. Extending classes
      2. 4.2. MXML and ActionScript
      3. 4.3. Understanding Events in Flex
      4. 4.4. Data Providers
      5. 4.5. Working with Item Renderers
        1. 4.5.1. Setting up an item renderer
        2. 4.5.2. Creating an MXML component file
        3. 4.5.3. Overriding a value
      6. 4.6. Building a Sample Flex Application
      7. 4.7. Summary
  7. II. Connecting Java and Flex
    1. 5. Sending Data from Flex
      1. 5.1. Understanding the Sending Process
        1. 5.1.1. ActionScript approach
        2. 5.1.2. Using HTTPService
        3. 5.1.3. Handling the response of the HTTPService call
      2. 5.2. Writing the Sample Test
        1. 5.2.1. Building the Flex application
        2. 5.2.2. Adding the components
        3. 5.2.3. Aligning the components
        4. 5.2.4. Adding the ActionScript
      3. 5.3. Summary
    2. 6. Writing Java Web Applications
      1. 6.1. The Model-View-Controller Pattern
      2. 6.2. The Spring Framework
      3. 6.3. Writing a Simple Web Application
        1. 6.3.1. The project directory structure
        2. 6.3.2. Creating an Eclipse project
        3. 6.3.3. Configuring the Eclipse project
        4. 6.3.4. Writing the Web application
          1. 6.3.4.1. The Model and Controller
          2. 6.3.4.2. The View
          3. 6.3.4.3. Wiring the pieces together
        5. 6.3.5. Writing the Ant build script
        6. 6.3.6. Enhancing the Web application
      4. 6.4. Summary
    3. 7. Using JUnit and FlexUnit to Test Your Applications
      1. 7.1. Working with JUnit
        1. 7.1.1. Importing the testing library
        2. 7.1.2. Building the testing suite
      2. 7.2. Working with FlexUnit
        1. 7.2.1. Using unit testing
        2. 7.2.2. Configuring FlexUnit
          1. 7.2.2.1. Downloading the FlexUnit framework
          2. 7.2.2.2. Adding the FlexUnit framework to a Flex project
        3. 7.2.3. Developing the unit test
          1. 7.2.3.1. Working with the unit test
          2. 7.2.3.2. Creating the testing suite
        4. 7.2.4. Working with the FlexUnit Runner
          1. 7.2.4.1. Filtering results
          2. 7.2.4.2. Gathering more specific information
          3. 7.2.4.3. Forcing an error in the test
      3. 7.3. Summary
    4. 8. Relational Databases
      1. 8.1. Relational Database Concepts
        1. 8.1.1. Tables
          1. 8.1.1.1. Data types
          2. 8.1.1.2. Keys
          3. 8.1.1.3. Constraints
        2. 8.1.2. SQL queries
          1. 8.1.2.1. Select statements
          2. 8.1.2.2. Insert statements
          3. 8.1.2.3. Update statements
          4. 8.1.2.4. Delete statements
        3. 8.1.3. Stored procedures
      2. 8.2. The MySQL Database Server
        1. 8.2.1. Installing and configuring MySQL
        2. 8.2.2. Creating a simple database in MySQL
      3. 8.3. Summary
    5. 9. Java and Databases
      1. 9.1. Java Database Connectivity
        1. 9.1.1. Overview of JDBC
        2. 9.1.2. Using JDBC with MySQL
      2. 9.2. The Hibernate Framework
        1. 9.2.1. Overview of Hibernate
        2. 9.2.2. Using Hibernate with MySQL
      3. 9.3. Summary
    6. 10. Building a Basic Database-Powered Flex Application
      1. 10.1. Understanding the Database Application
        1. 10.1.1. Defining the application
        2. 10.1.2. File outline
      2. 10.2. Building the Database Application
        1. 10.2.1. Designing the application
        2. 10.2.2. Creating the product editor popup
        3. 10.2.3. Creating the product grid ItemRenderer
      3. 10.3. Developing the Database Communication with Java
        1. 10.3.1. Building a custom data class
        2. 10.3.2. Adding the class methods
        3. 10.3.3. Handling the response from the server
      4. 10.4. Connecting the Database Application
        1. 10.4.1. Main application code
        2. 10.4.2. Adding the methods
      5. 10.5. Summary
    7. 11. Developing a Stock Ticker with BlazeDS
      1. 11.1. Installing BlazeDS
      2. 11.2. Understanding Messaging in Flex
        1. 11.2.1. Producer and Consumer messaging components
          1. 11.2.1.1. Creating the Producer
          2. 11.2.1.2. Sending a message
          3. 11.2.1.3. Creating the Consumer
        2. 11.2.2. Managing the destination service
          1. 11.2.2.1. Subscribing to the destination service
          2. 11.2.2.2. Unsubscribing from the destination service
      3. 11.3. Developing a Stock Ticker Application
        1. 11.3.1. Setting up the messaging config file
        2. 11.3.2. Developing the Java back end
        3. 11.3.3. Building the Flex user interface
        4. 11.3.4. Setting the J2EE Server options
        5. 11.3.5. Building the user interface
        6. 11.3.6. Developing the ActionScript
        7. 11.3.7. Bindable variables
        8. 11.3.8. Using the labelFunction
      4. 11.4. Summary
  8. III. Building Advanced Applications
    1. 12. Developing a Storefront Server Application with Java
      1. 12.1. Application Best Practices
        1. 12.1.1. Code modularity
        2. 12.1.2. Separation of interface and implementation
      2. 12.2. Developing the Java
        1. 12.2.1. The MySQL database
        2. 12.2.2. The Eclipse project
        3. 12.2.3. The model layer
        4. 12.2.4. The data access layer
        5. 12.2.5. The service layer
        6. 12.2.6. The Ant build file
      3. 12.3. Deploying and Testing the Web Application
      4. 12.4. Summary
    2. 13. Developing a Storefront Server Application with Flex
      1. 13.1. Designing and Developing the Flex Front End
        1. 13.1.1. Communicating with the Java back end
          1. 13.1.1.1. Handling multiple server calls
          2. 13.1.1.2. Explanation of application URLs
          3. 13.1.1.3. Setting up the Flex project
          4. 13.1.1.4. Creating the Java Service Handler
          5. 13.1.1.5. Adding custom events
        2. 13.1.2. Developing the product viewer
          1. 13.1.2.1. Creating the ItemRenderers
          2. 13.1.2.2. Creating the product description popup
          3. 13.1.2.3. Adding the code to the main application
          4. 13.1.2.4. Testing the application
        3. 13.1.3. Developing the payment solution
          1. 13.1.3.1. Choosing a credit card processing solution
          2. 13.1.3.2. Developing and testing
      2. 13.2. Summary
    3. 14. Building a Real-Time Messaging System
      1. 14.1. Understanding the Application Process
      2. 14.2. Writing the Java Code
        1. 14.2.1. Setting up the Eclipse project
        2. 14.2.2. The chat server
      3. 14.3. Writing the Flex Code
      4. 14.4. Connecting the Java and Flex Pieces
        1. 14.4.1. The Web application configuration
        2. 14.4.2. The BlazeDS configuration
        3. 14.4.3. Configuring Ant and Eclipse to build the application
        4. 14.4.4. Connecting to the chat server
        5. 14.4.5. Testing the chat application
      5. 14.5. Summary
    4. 15. Extending Java and Flex Development
      1. 15.1. Building Mashups
        1. 15.1.1. Libraries for mashups
        2. 15.1.2. Advanced example
          1. 15.1.2.1. Obtaining a Flickr API key
          2. 15.1.2.2. Downloading the flickrj library
          3. 15.1.2.3. Creating the Eclipse project
          4. 15.1.2.4. Writing the mashup
          5. 15.1.2.5. Writing the Ant build script
          6. 15.1.2.6. Deploying and running the mashup
      2. 15.2. Overview of Developing Custom Flex Interfaces
        1. 15.2.1. Custom interfaces using CSS
        2. 15.2.2. Custom interfaces using ActionScript
        3. 15.2.3. Creating the Flex mashup UI
        4. 15.2.4. Skinning the Flex mashup UI
      3. 15.3. Summary
    5. 16. Advanced Development
      1. 16.1. Advanced Java Concepts
        1. 16.1.1. Enterprise-level Java development
          1. 16.1.1.1. Enterprise application security with Spring Security
          2. 16.1.1.2. Enterprise application interoperability with JMS
        2. 16.1.2. More library components
          1. 16.1.2.1. Jasper Reports and iText
          2. 16.1.2.2. Quartz scheduler
      2. 16.2. Advanced Flex Concepts
        1. 16.2.1. Requirements for charting components
        2. 16.2.2. Configuring the charting component in Flex
      3. 16.3. Summary
  9. A. Installing Adobe Flex and Adobe Flex Builder
    1. A.1. Downloading Flex and Flex Builder
    2. A.2. Installing Flex Builder
    3. A.3. Installing the Flex Plug-in
      1. A.3.1. Downloading Eclipse
      2. A.3.2. Installing Eclipse
    4. A.4. Building a Sample Flex Application
      1. A.4.1. Creating the application
      2. A.4.2. Adding the MXML code
      3. A.4.3. Testing the application
    5. A.5. Working with the Flex SDK
      1. A.5.1. Building your sample application
      2. A.5.2. Compiling the application
  10. Glossary

Product information

  • Title: Java® and Flex® Integration Bible
  • Author(s):
  • Release date: March 2009
  • Publisher(s): Wiley
  • ISBN: 9780470400746