You are previewing Enterprise Development with Flex.
O'Reilly logo
Enterprise Development with Flex

Book Description

This groundbreaking book shows Flex developers exactly what's required to build production-quality Rich Internet Applications (RIAs) for the enterprise. Part of the popular Adobe Developer Library co-published by O'Reilly and Adobe, Enterprise Development with Flex goes well beyond Flex tutorials and product documentation to suggest best practices, compare frameworks and tools, and offer efficient techniques for developing enterprise RIAs. The authors provide lots of practical examples and rely on their considerable experience with enterprise Flex applications to help you overcome challenges during your project's lifecycle. With this unique advanced-level Flex book, you will:

  • Choose among several frameworks to build Flex applications, including Cairngorm, PureMVC, Mate, and Clear Toolkit

  • Applying selected design patterns with Flex

  • Learn how to extend the Flex framework and build your own component library

  • Minimize the need to program manually with Business Style Sheets (BSS)

  • Learn about the internals of Adobe's LiveCycle Data Services (LCDS)

  • Integrate functions from Adobe's LiveCycle ES SOA platform with your existing Flex-based applications

  • Construct Flex libraries that you can reuse across portals and other applications

  • Develop a sample AIR application that automatically synchronizes local and remote databases to support your sales force

  • Get solutions for leveraging AMF protocol and synchronizing Flex client data modifications with BlazeDS-based servers

  • Determine the actual performance of your application, and get suggestions for writing efficient code in MXML and ActionScript

Enterprise Development with Flex also offers suggestions for equipping your Flex team with proper tools and methodologies, guidelines for determining the skill sets required for the project, and much more. Although this book is in progress, you can still get going with these advanced solutions through our Rough Cuts edition, which lets you read the manuscript as it evolves, either online or via PDF.

Table of Contents

  1. Special Upgrade Offer
  2. A Note Regarding Supplemental Files
  3. Preface
    1. Who Is This Book For?
    2. How the Book Is Organized
    3. Conventions Used in This Book
    4. Using Code Examples
    5. How to Contact Us
    6. Safari® Books Online
    7. Acknowledgments
    8. Technical Editor Bios
  4. 1. Comparing Selected Flex Frameworks
    1. Frameworks Versus Component Libraries
    2. Introducing Café Townsend
      1. Employee List Without Frameworks
    3. Cairngorm
      1. Café Townsend with Cairngorm
      2. To Use or Not to Use Cairngorm?
      3. Report Card: Cairngorm
    4. Mate
      1. Report Card: Mate
    5. PureMVC
      1. Café Townsend with PureMVC
      2. Report Card: PureMVC
    6. Clear Toolkit
      1. Café Townsend with Clear Toolkit
        1. Installing the software for the CRUD example
        2. Creating an Eclipse Dynamic Web Project with CDB facets
      2. Report Card: Clear Toolkit
    7. Final Framework Selection Considerations
    8. References
  5. 2. Selected Design Patterns
    1. Singleton
    2. Proxy
    3. Mediator
    4. Data Transfer Object
    5. Asynchronous Token
    6. Class Factory
      1. A Class Factory from the Flex Framework
      2. Creating UIStaticClassFactory
      3. Creating UIClassFactory
  6. Building an Enterprise Framework
    1. Upgrading Existing Flex Components
      1. Introducing Component Library clear.swc
      2. Creating a Value-Aware CheckBox
      3. Creating a Centered CheckBox
      4. Creating a Protected CheckBox
      5. Upgrading ComboBox
    2. Resources As Properties of UI Controls
      1. Styles Versus Properties
      2. The Base Class for Resources
      3. DataGrid with Resources
    3. Data Forms
      1. The DataForm Component
      2. The DataFormItem Component
    4. Validation
      1. Sample Application: DataFormValidation
      2. The ValidationRule Class Explained
      3. Embedding Validation Rules into a DataGrid
    5. Minimizing the Number of Custom Events
    6. Summary
  7. 4. Equipping Enterprise Flex Projects
    1. Staffing Considerations
      1. GUI and Component Developers
      2. Flex Architects
      3. Designopers and Devigners
    2. Flex Developer’s Workstation
      1. IDE Choices
      2. Preparing for Teamwork
    3. Embedding .swf Files into HTML Pages
      1. Adding a .swf to HTML with SWFObject
    4. Interacting with HTML and JavaScript
      1. The ExternalInterface Class
      2. Flex AJAX Bridge
      3. The flashVars Variable
    5. Testing Flex RIAs
      1. Unit and Integration Testing
        1. FlexUnit4
        2. FlexMonkey
        3. Visual Flex Unit
      2. Functional Testing
      3. Load Testing
      4. Code Coverage
    6. Application Modularization from 30,000 Feet
    7. Build Scripts and Continuous Integration
      1. Automation of Ant Script Creation
      2. Maven Support
      3. Continuous Integration
    8. Logging with Log4Fx
      1. Remote Logging with Log4Fx
    9. A Grab Bag of Component Libraries
    10. Integrating with the Java Spring Framework
    11. Integrating with the Hibernate Framework
    12. Project Documentation
      1. Program Documentation with ASDoc
      2. UML Diagrams
    13. Accessibility of Flex RIA
    14. Summary
  8. 5. Customizing the Messaging Layer of LCDS or BlazeDS
    1. Flex Messaging Unleashed
    2. Server Messages: Shooting in the Dark
    3. Sending the Client’s Heartbeats
    4. Heartbeat Adapter
    5. Testing the Client Heartbeat
    6. Guaranteed Delivery of Server Messages
    7. Building a Custom Acknowledging Channel
    8. Resending Messages with QoSAdapter
    9. Testing Guaranteed Delivery
    10. When Message Order Matters
      1. SerializingChannel
    11. Guaranteed Delivery of Client Messages
    12. The ReliableClientMessage Class
    13. Acknowledging the Endpoint
    14. Resending Channel Guarantees Delivery
    15. Testing Guaranteed Delivery from the Client
    16. Keeping Client Messages in Order
    17. Testing Ordered Delivery of Client Messages
    18. Summary
  9. 6. Open Source Networking Solutions
    1. BlazeDS Versus LCDS
    2. Why Is AMF Important?
      1. AMF Performance Comparison
    3. AMF and Client-Side Serialization
    4. HTTP Connection Management
      1. The Hack to Increase a Web Browser’s Performance
      2. Other Ways of Increasing a Web Browser’s Performance
      3. What Is Comet?
    5. Putting Streaming to Work
    6. The Networking Architecture of BlazeDS
      1. Setting Up a BlazeDS Sample Application on Jetty
      2. Setting BlazeDS Messaging to Use the Jetty NIO API
      3. NIO Performance Test
      4. The Theory
    7. Data Access Automation
      1. Data Transfer Objects
      2. ChangeObject
      3. Assembler and DAO Classes
      4. DataCollection Class
    8. Deep Data Synchronization with BlazeDS
      1. Nested DataCollections
      2. Batching Remote Calls
    9. Using AMF Message Headers
    10. Data Push in Data Access
    11. A Server As a Command Center
      1. Reverse RPC
      2. Extending the Protocol
    12. Custom Serialization and AMF
    13. Security Appliances
    14. Third-Party Networking Solutions
    15. Summary
  10. 7. Modules, Libraries, Applications, and Portals
    1. Flex Portals and Modularization
    2. Basic Modularization: Image
    3. Runtime Style Modules
    4. Real Actors: Loader and URLLoader
    5. Loading Modules with Module Loader
    6. Preloading Modules with ModuleManager
    7. Communicating with Modules
    8. Introducing Application Domains
    9. Paying Tribute to Libraries
      1. RSLs: “Under”-Libraries
      2. Bootstrapping Libraries As Applications
    10. Sibling Domains and Multiversioning
      1. Four Scenarios of Loading Portlets
      2. Default Portlet Loading: Same Sandbox Child Domain
      3. Loading Portlets for Multiversioning
      4. Bootstrap Class Loading
    11. Sample Flex Portal
    12. Integrating Flex into Legacy JEE Portals
    13. Summary
  11. 8. Performance Improvement: Selected Topics
    1. Planning for Modularization
    2. It Takes Two to Perform
    3. Application Startup and Preloaders
      1. Dissecting LightweightPreloader.swf
      2. The Main SWF Talks to LightweightPreloader.swf
      3. Supporting Logout Functionality
    4. Using Resource-Shared Libraries
      1. How to Link Flex Libraries
      2. Flex Framework RSL
    5. Optimizing RSL Loading
      1. Creating Modules with Test Harness
      2. Creating a Shell Application with a Custom RSL Loader
    6. A Grab Bag of Useful Habits
      1. Dealing with Memory Leaks
        1. Closures
        2. Opportunistic garbage collector
      2. Just-in-Time Benefits and Implications
      3. Using the Flash Builder Profiler
      4. Performance Checklist
        1. Startup time
        2. UI performance
        3. I/O performance
        4. Memory utilization
        5. Code execution performance
    7. Summary
  12. 9. Working with Adobe AIR
    1. How AIR Is Different from Flex
    2. Hello World in AIR
    3. Native Windows
    4. Working with Files
      1. Commonly Used Directories
      2. Reading and Writing to Files
      3. Working with Local Databases
        1. Creating a database file
    5. PharmaSales Application
      1. Installing PharmaSales
      2. The PharmaSales Application for Dispatchers
      3. The PharmaSales Application for Salespeople
      4. Detecting Network Availability
      5. After the Salesperson Logs On
    6. OfflineDataCollection
      1. Integrating with Google Maps
    7. Summary
  13. 10. Developing Flex Applications for LiveCycle Enterprise Suite
    1. Business Process Example: Vacation Request
    2. Meet LiveCycle Workspace ES
    3. Meet the Flexlet: Vacation Request
    4. LiveCycle ES Architecture in a Nutshell
      1. Endpoints
      2. Custom Services
      3. Tools
    5. Creating Flex Applications Enabled for LiveCycle Workspace ES
      1. Form Variable Declaration and Process Instantiation
      2. Flexlet Mapping for User Activity
      3. Controlling the View State of the Reusable Flexlet from the Process
      4. Workspace: Flexlet Conversation Basics
        1. LiveCycle FormConnector
        2. Which data should you trust more: Enterprise data or LiveCycle internal data?
      5. Flexlet Code Walkthrough
        1. Namespaces and variables
        2. Reading data from the process and enterprise data store
        3. Writing data to the enterprise data store and the process
    6. Running Workspace from Adobe Sources
    7. Business Example: Warehouse Processes
      1. User Interface for the Retailer
      2. User Interface for the Supplier
      3. User Interface for the Manufacturer
      4. Introducing Process Orchestration
    8. The Warehouse Processes Under the Hood
    9. Extending LiveCycle with Custom Services
      1. Custom Providers for the User and Group Repository
        1. Creating custom authentication providers
        2. Creating a custom directory service provider
        3. Creating a custom groups provider
        4. Creating a custom users provider
      2. Custom Solution Components
        1. Implementation of initializeProcessVariables()
        2. Implementation of handleApprovedOrder()
    10. Orchestrating Processes with Asynchronous Events
      1. Defining Events
      2. Dispatching Events
      3. Starting the Process on an Asynchronous Event
    11. Blending the LiveCycle API with Custom Flex Applications
      1. Invoking a LiveCycle Process on the Server
      2. Starting a Process Instance from the Flex Application
    12. Summary
  14. 11. Printing with Flex
    1. PDF Generation on the Server
    2. PDF Generation on the Client
      1. Basic Printing with AlivePDF
      2. Enhancing AlivePDF
      3. Printing Flex Containers
    3. Extending Flex Components for PDF Generation in XDP Format
    4. Adding Printing to the PharmaSales Application
      1. Printing for Acme Pharm Dispatchers
      2. Printing for Acme Pharm Salespeople
    5. ClearBI: A Web Reporter for Flex
    6. Summary
  15. 12. Model-Driven Development with LCDS ES2
    1. Introduction to Model-Driven Development
      1. Starting Model-Driven Development with Flash Builder 4
      2. Data Sources and RDS
      3. What Has Been Generated?
      4. Creating Master/Detail/Search View
    2. Summary
    3. Epilogue
  16. Index
  17. About the Authors
  18. Colophon
  19. Special Upgrade Offer
  20. Copyright