You are previewing Beginning Java™ and Flex: Migrating Java, Spring, Hibernate, and Maven Developers to Adobe Flex.
O'Reilly logo
Beginning Java™ and Flex: Migrating Java, Spring, Hibernate, and Maven Developers to Adobe Flex

Book Description

Beginning Java and Flex describes new, simpler, and faster ways to develop enterprise RIAs by integrating the Adobe Flex Framework with Java technologies like Spring, Hibernate and more.

Table of Contents

  1. Copyright
  2. About the Author
  3. About the Technical Reviewer
  4. Acknowledgments
  5. Introduction
    1. Who This Book Is For
    2. The Book
  6. 1. Developing with Java and Flex
    1. 1.1. Why Java?
    2. 1.2. Why ActionScript?
    3. 1.3. Why Java and ActionScript Together?
    4. 1.4. Programming Using Lightweight Frameworks
      1. 1.4.1. Benefits of Lightweight Frameworks
    5. 1.5. Introduction to Spring
    6. 1.6. Introduction to Hibernate
      1. 1.6.1. The Benefits of Hibernate
    7. 1.7. Introduction to BlazeDS
      1. 1.7.1. BlazeDS vs. Adobe LiveCycle Data Services
    8. 1.8. Introduction to Flex
      1. 1.8.1. Flex vs. Ajax
      2. 1.8.2. Flex, Flash Cs3, and ActionScript
      3. 1.8.3. ActionScript vs. MXML
    9. 1.9. Introduction to UML
      1. 1.9.1. Basic Diagrams
    10. 1.10. Summary
  7. 2. Presenting the Sample Application
    1. 2.1. Architecture
    2. 2.2. The Presentation Layer
    3. 2.3. The Service Layer
    4. 2.4. The Data Access Layer
    5. 2.5. The Domain Model
    6. 2.6. Summary
  8. 3. Configuring Your Development Environment
    1. 3.1. The Source Code Editor: Eclipse IDE
      1. 3.1.1. Eclipse Projects
      2. 3.1.2. Eclipse Plug-ins
      3. 3.1.3. Installing Eclipse
      4. 3.1.4. Configure Eclipse for Flex and J2EE
    2. 3.2. Version Control: Subversion
      1. 3.2.1. Subversion Installation
      2. 3.2.2. Basic SVN Project Structure
      3. 3.2.3. Using SVN with the Command-Line Client
      4. 3.2.4. Installing Subclipse
    3. 3.3. The Database Tools: MySQL
      1. 3.3.1. Install MySQL on Windows
      2. 3.3.2. Installing MySQL on a Mac
      3. 3.3.3. Adding the MySQL GUI Tools
      4. 3.3.4. Basic MySQL Operation from the Command Line
      5. 3.3.5. Basic MySQL Operations Using MySQL Query Browser
    4. 3.4. The Java Application Container: Tomcat
      1. 3.4.1. Installing Tomcat
      2. 3.4.2. Tomcat Directories
      3. 3.4.3. Tomcat Configuration Files
    5. 3.5. The Presentation Tools: Flex Builder
      1. 3.5.1. Installing the Flex Builder
      2. 3.5.2. Installing the Flex SDK 4
    6. 3.6. The Build, Test and Deploy Tool: Maven
      1. 3.6.1. Installing Maven
      2. 3.6.2. Configuring Maven
      3. 3.6.3. Installing the Maven Eclipse Plug-in
      4. 3.6.4. Creating Your First Maven Project
      5. 3.6.5. The POM Document
      6. 3.6.6. Building a Project with Maven
      7. 3.6.7. Using Maven Plug-ins
      8. 3.6.8. Using Maven Dependencies
      9. 3.6.9. Using Repositories
      10. 3.6.10. Deploying Your Application
      11. 3.6.11. Creating a Maven Archetype
      12. 3.6.12. Flex Maven Archetypes
      13. 3.6.13. Useful Maven Commands
    7. 3.7. Summary
  9. 4. Inversion of Control
    1. 4.1. Spring Modules
    2. 4.2. Spring Maven Dependencies
    3. 4.3. Creating a Spring Project
    4. 4.4. Configure the Spring Container
      1. 4.4.1. XML-Based Configuration
        1. 4.4.1.1. Writing XML Bean Definitions
        2. 4.4.1.2. Constructor Dependency Injection
        3. 4.4.1.3. Setter Dependency Injection
        4. 4.4.1.4. Inner Beans
      2. 4.4.2. Injecting Lists and Collections
      3. 4.4.3. Annotation-Based Configuration
        1. 4.4.3.1. Spring Configuration Annotations
        2. 4.4.3.2. Using the Annotations @PostConstruct and @PreDestroy
        3. 4.4.3.3. Using the Annotations @Component and @Repository
      4. 4.4.4. The Bean Factory
      5. 4.4.5. ApplicationContext and WebApplicationContext
      6. 4.4.6. Properties
    5. 4.5. Summary
  10. 5. Spring JDBC and Hibernate
    1. 5.1. The DAO Design Pattern
    2. 5.2. Introduction to Plain Old JDBC
    3. 5.3. Introduction to Spring JDBC
      1. 5.3.1. JDBC Template
      2. 5.3.2. JDBC DAO Support
    4. 5.4. Hibernate and Spring
      1. 5.4.1. Add Hibernate to your Spring Project
      2. 5.4.2. Configure Hibernate
      3. 5.4.3. XML-Based Configuration
        1. 5.4.3.1. Mapping a Database Table
      4. 5.4.4. Annotation-Based Configuration
        1. 5.4.4.1. Mapping a Database Table
        2. 5.4.4.2. Mapping a One-to-One Relationship
        3. 5.4.4.3. Mapping a One-to-Many or a Many-to-One Relationship
        4. 5.4.4.4. Mapping a Many-to-Many Relationship
    5. 5.5. Using Hibernate with Spring
      1. 5.5.1. Querying Using HQL
        1. 5.5.1.1. Passing Parameters in HQL Queries
        2. 5.5.1.2. Named Queries
      2. 5.5.2. HQL and Hibernate Support Matrix
      3. 5.5.3. Use Native SQL
      4. 5.5.4. Introduction to Transactions
      5. 5.5.5. Summary
  11. 6. Spring Security
    1. 6.1. Introduction to Spring Security
    2. 6.2. Web Authorization Using URL Patterns
    3. 6.3. The Importance of Filters
    4. 6.4. Authentication and Authorization
      1. 6.4.1. Authentication Methods
      2. 6.4.2. Decision Managers and Voters
    5. 6.5. Summary
  12. 7. Flex (The View Layer)
    1. 7.1. The FlashPlayer Overview
    2. 7.2. Flex Components
    3. 7.3. The Flex Framework Architecture
    4. 7.4. Flex Development Overview
    5. 7.5. Flex Builder
      1. 7.5.1. Create a Project
      2. 7.5.2. Flex Builder Perspectives
      3. 7.5.3. Build an Application
      4. 7.5.4. Run an Application
      5. 7.5.5. Debug an Application
      6. 7.5.6. Navigate between Classes
      7. 7.5.7. Shortcut keys
    6. 7.6. Flex Components
      1. 7.6.1. Containers
      2. 7.6.2. Layout Containers
      3. 7.6.3. Navigation Containers
      4. 7.6.4. Control Components
        1. 7.6.4.1. Standard Controls
        2. 7.6.4.2. Data-Driven Controls
        3. 7.6.4.3. Text Controls
        4. 7.6.4.4. Menu-Based Controls
    7. 7.7. Using External CSS Styles
    8. 7.8. Use Flex with Flash IDE
      1. 7.8.1. Create Flash Animations for Flex
    9. 7.9. Flex Events
      1. 7.9.1. Custom Events
    10. 7.10. Data Binding
    11. 7.11. Creating Custom Components
      1. 7.11.1. MXML Custom Components
      2. 7.11.2. AS Custom Components
      3. 7.11.3. Deploying Custom Components
        1. 7.11.3.1. SWC Libraries
        2. 7.11.3.2. RSL libraries
    12. 7.12. Summary
  13. 8. Working with Data in Flex
    1. 8.1. An Overview of Data Models
    2. 8.2. Structuring Data for Views
      1. 8.2.1. Data Collections
    3. 8.3. Access to Remote Data
      1. 8.3.1. HTTPService Components
      2. 8.3.2. Building Our First Java and Flex Application
      3. 8.3.3. RemoteObject Component
      4. 8.3.4. WebService Component
      5. 8.3.5. Using Eclipse Web Services Explorer
      6. 8.3.6. Using the WebService Component
      7. 8.3.7. Creating ActionScript Code to Consume a Web Service using Flex Builder
    4. 8.4. Storing Data on the Local Machine
    5. 8.5. Summary
  14. 9. BlazeDS
    1. 9.1. Flex BlazeDS Architecture
    2. 9.2. Configuring BlazeDS
    3. 9.3. Using Remoting Services
      1. 9.3.1. Creating a Flex Java POJO BlazeDS Application
        1. 9.3.1.1. Creating the Server Data Model
        2. 9.3.1.2. Creating the DAO Layer
        3. 9.3.1.3. Creating a Test Case Using JUnit
        4. 9.3.1.4. Creating the Service Layer
        5. 9.3.1.5. Configuring Eclipse to Run and Debug a Maven Application
      2. 9.3.2. Creating the Flex Client
    4. 9.4. Using Messaging Services
      1. 9.4.1. Real-Time Messaging with BlazeDS
      2. 9.4.2. Creating a Simple Chat Application
        1. 9.4.2.1. Creating and Configuring the Maven BlazeDS Project
        2. 9.4.2.2. Creating the Flex Project
        3. 9.4.2.3. Creating the Flex Code for Real-Time Messaging
    5. 9.5. Summary
  15. 10. Using Flex, Spring, and Hibernate Together
    1. 10.1. The Flex-Spring-Hibernate Maven Archetype
      1. 10.1.1. Using the Flex-Spring-Hibernate Archetype
    2. 10.2. Configuring the Application
    3. 10.3. Planning the Application with UML
      1. 10.3.1. The Data Model UML Diagrams
      2. 10.3.2. The DAOs UML Diagrams
      3. 10.3.3. The Service Layer UML Diagram
      4. 10.3.4. Architecting Application Security
      5. 10.3.5. Injecting the Spring Beans
    4. 10.4. Flex Client GUI Architecture
    5. 10.5. Develop the Flex-Java-Spring-Hibernate Application
      1. 10.5.1. Coding the Domain Objects
      2. 10.5.2. Coding the Hibernate DAO objects
      3. 10.5.3. Create a Test Case
      4. 10.5.4. Coding the Service layer
      5. 10.5.5. Export Spring Services to BlazeDS
      6. 10.5.6. Coding the Flex GUI application
      7. 10.5.7. Add a Login Form to Flex
    6. 10.6. Summary