41
® pyright 2008 Adobe Systems Incorporated. All rights reserved. Delivering Collaborative Applications with AIR and LiveCycle Data Services Alistair McLeod Xavier Agnetti

MAX 2008: Build collaborative applications with Flex LCDS and Cairngorm

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: MAX 2008: Build collaborative applications with Flex LCDS and Cairngorm

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Delivering Collaborative Applications with AIR and LiveCycle Data ServicesAlistair McLeod

Xavier Agnetti

Page 2: MAX 2008: Build collaborative applications with Flex LCDS and Cairngorm

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved.

What we aim to cover in the next 45 minutes…

• Show how collaborative applications can be built with AIR and LCDS

• Explain the challenges in building such applications

• Provide some hints and tips for building your own collaborative applications

• Show some of the features of Adobe AIR

• Demonstrate the power of Data Management Services

• Show how a Wiimote and speech recognition can be used to control an AIR application

Page 3: MAX 2008: Build collaborative applications with Flex LCDS and Cairngorm

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Agenda

• Collaborative Applications

• BlazeDS and LiveCycle Data Services

• Application Demo

• Building a Collaborative Application

• Deep Dive into Application Code

• Summary and Questions

Page 4: MAX 2008: Build collaborative applications with Flex LCDS and Cairngorm

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Collaborative Applications

Page 5: MAX 2008: Build collaborative applications with Flex LCDS and Cairngorm

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved.

What do we mean by Collaborative Applications?

Page 6: MAX 2008: Build collaborative applications with Flex LCDS and Cairngorm

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved.

BlazeDS and LiveCycle Data

Services

Page 7: MAX 2008: Build collaborative applications with Flex LCDS and Cairngorm

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved.

BlazeDS Overview

Easily connects Flex & AIR applications to existing server logic

High performance data transfer for more responsive applications

Server push over standard HTTP Full pub/sub messaging that extends

existing messaging infrastructure Free and open source Publication of the Action Message Format

(AMF3) binary data protocol specification Certified builds, warranty protection and

enterprise support subscriptions available

BlazeDS is the remoting and HTTP-based messaging technology which Adobe is contributing to the community under LGPL

BlazeDS

Data Management

RPC Services

Messaging

ServiceAdapters

Data Synchronization

Off-line Applications

Data Paging

Web Service

HTTP Service

Remote Object Service

Publish & Subscribe

Collaboration

Real Time Data Push

Proxy Service

Web-tier Compiler

Portal Deployment

RIA-PDF Generation

LiveCycle

ColdFusion

Hibernate

SQL

JMS

Java

Custom

Page 8: MAX 2008: Build collaborative applications with Flex LCDS and Cairngorm

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved.

LiveCycle Data Services ES Overview

LiveCycle Data Services is a set of Java EE components and APIs used to:

Create data-intensive RIAs with less code, less risk, and accelerated time to market due to an innovative client-server programming model

Integrate RIAs with existing applications, back-end data, and JEE infrastructure

Easily integrate RIAs with LiveCycle document and process services

Enable collaboration, offline AIR and real-time data streaming applications to be built in a scalable and reliable manner with robust publish and subscribe messaging

Generate PDF documents from RIAs that include graphical assets

LiveCycle Data Services ES

Data Management

RPC Services

Messaging

Data Synchronization

Off-line Applications

Data Paging

Web Service

HTTP Service

Remote Object Service

Publish & Subscribe

Collaboration

Real Time Data Push

Proxy Service

Web-tier Compiler

Portal Deployment

RIA-PDF Generation

LiveCycle

ColdFusion

Hibernate

SQL

JMS

Java

Custom

ServiceAdapters

Page 9: MAX 2008: Build collaborative applications with Flex LCDS and Cairngorm

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Feature Comparison

Feature BlazeDSLiveCycle Data

Services ES

Java Remoting √ √

Web Proxy √ √

JMS Adapter √ √

AJAX Client Libraries √ √

Administrative Console √ √

Clustered Messaging √ √

Pub/Sub Messaging √ √

Web container-based messaging service (100’s of clients/CPU) √ √

Dedicated messaging service (1000’s of clients/CPU) √

Per-client Quality of Service √

Data Management Service √

Data Paging √

Flex-LiveCycle Integration √

RIA-to-PDF Generation √

Offline Data Synchronization (AIR) √

WSRP/Portal Integration √

SiteMinder Integration √

Page 10: MAX 2008: Build collaborative applications with Flex LCDS and Cairngorm

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Application Demo

Page 11: MAX 2008: Build collaborative applications with Flex LCDS and Cairngorm

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Application Features

Page 12: MAX 2008: Build collaborative applications with Flex LCDS and Cairngorm

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Application Demonstration

Page 13: MAX 2008: Build collaborative applications with Flex LCDS and Cairngorm

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Building a Collaborative Application

• Application Architecture

• Technologies Used

• Challenges

Page 14: MAX 2008: Build collaborative applications with Flex LCDS and Cairngorm

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Building a Collaborative Application

• Application Architecture

• Technologies Used

• Challenges

Page 15: MAX 2008: Build collaborative applications with Flex LCDS and Cairngorm

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Application Architecture

Page 16: MAX 2008: Build collaborative applications with Flex LCDS and Cairngorm

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Application Structure

Client Layer

Adobe Integrated Runtime

Adobe Cairngorm

Alternativa 3D

WiiMoteKeyboard

Application Layer

FMSLCDS

DMS

Messaging

Persistence Layer

HSQL DB

Microphone

Page 17: MAX 2008: Build collaborative applications with Flex LCDS and Cairngorm

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Building a Collaborative Application

• Application Architecture

• Technologies Used

• Challenges

Page 18: MAX 2008: Build collaborative applications with Flex LCDS and Cairngorm

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Use of Adobe AIR

Page 19: MAX 2008: Build collaborative applications with Flex LCDS and Cairngorm

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Use of LiveCycle Data Services

Chat between the retailer and customer

Data push to retailer application Synchronization of views between

the retailer and customer Conflict resolution Store local changes while offline,

and commit them when back online Adapter architecture Paging large data sets Generate customer configuration as

PDF

LiveCycle Data Services ES

Data Management

RPC Services

Messaging

Data Synchronization

Off-line Applications

Data Paging

Web Service

HTTP Service

Remote Object Service

Publish & Subscribe

Collaboration

Real Time Data Push

Proxy Service

Web-tier Compiler

Portal Deployment

RIA-PDF Generation

LiveCycle

ColdFusion

Hibernate

SQL

JMS

Java

Custom

ServiceAdapters

Page 20: MAX 2008: Build collaborative applications with Flex LCDS and Cairngorm

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Use of Flash Media Server

• Audio and video conferencing

• Very little development effort• No server side code

• Alternative solution: use CoCoMo• Hosted service

• Public beta now available

• See other Max sessions for details

Page 21: MAX 2008: Build collaborative applications with Flex LCDS and Cairngorm

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Displaying 3D model

• Straightforward API

• Better performance than PaperVision 3D

• Easier integration with 3DS MAX models

Page 22: MAX 2008: Build collaborative applications with Flex LCDS and Cairngorm

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Using the Wii Remote as a Control Device

Wiimote

WiiFlash server

WiiFlash AS3 API

Page 23: MAX 2008: Build collaborative applications with Flex LCDS and Cairngorm

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Speech recognition on AIR

Wiimote

WiiFlash server

WiiFlash AS3 API

Page 24: MAX 2008: Build collaborative applications with Flex LCDS and Cairngorm

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Building a Collaborative Application

• Application Architecture

• Technologies Used

• Challenges

Page 25: MAX 2008: Build collaborative applications with Flex LCDS and Cairngorm

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Challenges in Building Collaborative Applications

Page 26: MAX 2008: Build collaborative applications with Flex LCDS and Cairngorm

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Deep Dive into Application Code

• Presentation Model

• Data Management Services

• Large Data Sets

• Message Broker

Page 27: MAX 2008: Build collaborative applications with Flex LCDS and Cairngorm

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Deep Dive into Application Code

• Presentation Model

• Data Management Services

• Large Data Sets

• Message Broker

Page 28: MAX 2008: Build collaborative applications with Flex LCDS and Cairngorm

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved.

What is a Presentation Model?

• A class that contains the state and logic required by a view.

• The general purpose of the Presentation Model is to separate concerns

• The view is responsible for rendering the presentation model

• The view hence holds a reference the presentation model

• The presentation model does not know anything about its view

• It can then be unit-tested in isolation

Page 29: MAX 2008: Build collaborative applications with Flex LCDS and Cairngorm

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Domain Layer

Cairngorm and the Presentation Model

Integration TierView LayerPresentatio

n Layer

Arthur

[email protected]

Ford- [email protected]

Zaphod –

[email protected]

Arthur –

[email protected]

Tricia–

[email protected]

Marvin =

[email protected]

Add a Contact Contact list

Add a Contact

Add a Contact

Presentation Model+ contacts : ContactDomain+ addContact (name, email)

Presentation Model+ contacts : ContactDomain+ addContact (name, email)

CMDCMD CMDCMD CMD

BusinessDelegate

ContactVOContactVO

ServiceLocator

model.addContact(firstname, email)

Cairngorm

Event

Cairngorm

Event

Serv

ice

Serv

ice

Serv

ice

Serv

ice

Serv

ice

Serv

ice

Serv

ice

ContactVOContactVO

FrantController

ContactsDomain+ contacts : List

ContactsDomain+ contacts : List

Page 30: MAX 2008: Build collaborative applications with Flex LCDS and Cairngorm

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Cairngorm and Presentation Models - Differences

Page 31: MAX 2008: Build collaborative applications with Flex LCDS and Cairngorm

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Deep Dive into Application Code

• Presentation Model

• Data Management Services

• Large Data Sets

• Message Broker

Page 32: MAX 2008: Build collaborative applications with Flex LCDS and Cairngorm

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Data Management Services (DMS)

DMS is data-driven (not request-response paradigm) The user gesture/command pair does fit well here

DataModel is responsible to talk to the DataService, and store the data retrieved from it

Ability to bind to DataService attributes like commitRequired.

Page 33: MAX 2008: Build collaborative applications with Flex LCDS and Cairngorm

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Domain Layer

Cairngorm and Data Management Services

Integration TierView LayerPresentation

Layer

Arthur

[email protected]

Ford- [email protected]

Zaphod –

[email protected]

Arthur –

[email protected]

Tricia–

[email protected]

Marvin =

[email protected]

Add a Contact Contact list

Add a Contact

Add a Contact

ServiceLocator

model.addContact(firstname, email)

Client DataServices

Serv

ice

Serv

ice

Data Model+ contacts : List+ addItem( item )

Data Model+ contacts : List+ addItem( item )

Presentation Model+ contacts : ContactDataModel+ addContact (name, email)

Ford- [email protected]

Zaphod –

[email protected]

Arthur –

[email protected]

Tricia–

[email protected]

Marvin =

[email protected]

Add a Contact Contact list

Add a Contact

Add a Contact

ServiceLocator Client DataServices

Serv

ice

Serv

ice

Data Model+ contacts : List+ addItem( item )

Data Model+ contacts : List+ addItem( item )

Presentation Model+ contacts : ContactDataModel+ addContact (name, email)

Remote DataServices

Serv

ice

Serv

ice

Ford- [email protected]

Zaphod –

[email protected]

Tricia–

[email protected]

Marvin =

[email protected]

Add a Contact Contact list

Add a Contact

Add a Contact

Arthur

[email protected]

Ford- [email protected]

Zaphod –

[email protected]

Tricia–

[email protected]

Marvin =

[email protected]

Add a Contact Contact list

Add a Contact

Add a Contact

Page 34: MAX 2008: Build collaborative applications with Flex LCDS and Cairngorm

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Deep Dive into Application Code

• Presentation Model

• Data Management Services

• Large Data Sets

• Message Broker

Page 35: MAX 2008: Build collaborative applications with Flex LCDS and Cairngorm

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved.

How to deal with large dataset?

Page 36: MAX 2008: Build collaborative applications with Flex LCDS and Cairngorm

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Deep Dive into Application Code

• Presentation Model

• Data Management Services

• Large Data Sets

• Message Broker

Page 37: MAX 2008: Build collaborative applications with Flex LCDS and Cairngorm

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Message Broker

Listeners are registered in the Broker singleton

Whenever a listener sends a message, the broker calls its producer and waits for a response in the consumer.

Then every listener is notified that a message is ready to be consumed

Listener /

Producer

Message Broker

Local Producer

Local Consum

er

Listener

Listener

Listener

Messaging

Destination

Page 38: MAX 2008: Build collaborative applications with Flex LCDS and Cairngorm

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Miscellaneous tips

• Set different publisher names in order to launch several instances of the same AIR application

• MessagePerformanceUtils built-in LCDS 2.6 helps optimizing network round-trip for your application

• In Flex, in services-config.xml, the tokens are replaced by the app server

<endpoint url="http://{server.name}:{server.port}/{context.root}

• In AIR, either • you replace it directly by

<endpoint url="http://myserver:8080/myContextRoot

• Or you create new channels set in the client code, loading the endpoint URLs from a local file

Page 39: MAX 2008: Build collaborative applications with Flex LCDS and Cairngorm

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Summary and Questions

Page 40: MAX 2008: Build collaborative applications with Flex LCDS and Cairngorm

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Summary

• Show how collaborative applications can be built with AIR and LCDS

• Explain the challenges in building such applications

• Provide some hints and tips for building your own collaborative applications

• Show some of the features of Adobe AIR

• Demonstrate the power of Data Management Services

• Show how a Wiimote and speech recognition can be used to control an AIR application

Page 41: MAX 2008: Build collaborative applications with Flex LCDS and Cairngorm

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved.

Any Questions

Questions? (simple please)