26
Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential. 1 How Zend used Flex & PHP to build a Software Flight Recorder Ryan Stewart Platform Evangelist, Adobe Systems [email protected] Kevin Schroeder Technology Evangelist, Zend

How Zend used Flex & PHP to build a Software Flight Recorder · AIR Client Runtime Files SQLite NotificationsClipboard. ... Adobe confidential. 10 Flex 3 is Open Source Open Source

  • Upload
    buikhue

  • View
    229

  • Download
    3

Embed Size (px)

Citation preview

Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential. 1

How Zend used Flex & PHP to build a Software Flight Recorder

Ryan Stewart

Platform Evangelist,

Adobe Systems

[email protected]

Kevin Schroeder

Technology Evangelist,

Zend

®

Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential. 2

Adobe Flash Platform

Flash Builder

Flash CS4 Professional

Tools to Design and Develop

Clients

Servers/Services

Framework

AMF, XML, JSON, SOAP, RSS, ATOM, etc.HTTP/S, Sockets, RTMP, etc.

Applications, Content and Video

Flash Catalyst

Flex

Flash Media Server Family

Flash Player

AIR

BlazeDSData Services

®

Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential. 3

Flex Branding Change

FLEX 3 GENERATION FLEX 4 GENERATION

Flash

BuilderFlash

Catalyst

Flex framework

Aligning Flex brand with the open source framework underlying both FB and FC

Flex framework,

Flex Builder

Consistent branding for tools

Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential. 4

Flex Framework

Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential. 5

ADOBE FLEX

A highly productive, free open source framework for building expressive web applications that deploy consistently on all major browsers and on the desktop with Adobe AIR

Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential. 66

Where Flex is used

Product Configuration

Rich Media Applications

Data Visualization

Authoring Applications Product Selection

Line of Business Applications

Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential. 7

Flex Builder IDE

� Flex Builder IDE

� Eclipse Plugin or turn-key install

� Accelerates Design

� Design view and code view

Understanding Flex

� 2 languages

� MXML (actually a library of ActionScript)

� ActionScript 3

� Compilers

� Debuggers

� Rich Component Library

Flex SDK

Flex Class Library

MXML ActionScript

Debuggers

Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential. 8

How Flex Works in the Browser

Flex Builder IDE

Flex SDK

Flex Class Library

MXML ActionScript

Compile

SOAP HTTP/S AMF/S RTMP/S

Web Server

Existing Applications & Infrastructure

J2EE Application Server

LC Data ServicesXML/HTTP

REST

SOAP Web Services

Browser

Flash Player

Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential. 9

How Flex Works on the Desktop

Flex Builder IDE

Flex SDK

Flex Class Library

MXML ActionScript

Compile & Package

SOAP HTTP/S AMF/S RTMP/S

Web Server

Existing Applications & Infrastructure

J2EE Application Server

LC Data ServicesXML/HTTP

REST

SOAP Web Services

Desktop

AIR Client Runtime

Files SQLite Notifications Clipboard

Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential. 10

Flex 3 is Open Source

Open Source Flex SDK

� SDK source (framework, compiler, and debugger) is available under Mozilla Public License (MPL)

� Public bug database, roadmap, and daily builds available

� opensource.adobe.com/flex

Enabling Open Source

Innovation

� Invites active participation from the Flex development community

� Allows open source projects to extend Flex and embed it in projects

� Enables small ISVs to bundle the Flex SDK at no cost

Growing the Flex Market

� Non-open source SDK licenses available for commercial ISVs that require it

� Raises Flex awareness by increasing usage and driving further adoption

� Expands the market for commercial Flex products from Adobe and partners

Open Source BlazeDS

� Flex remoting and messaging

� Available under Lesser General Public License (LGPL) v3

� Commercial license, certified builds and enterprise support are available

� Public bug base and daily builds

� opensource.adobe.com/blazeds

Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential. 11

Flash Builder 4

Flex Builder 3plus new features

®

Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential. 12

Flash Builder 4 Themes

Support both design and data focused apps in a productive environment

Designer/Developer

�Remain true to the design

�Facilitate workflows

�Eliminate manual steps

Data-Centric

Development

�Support many different back-ends

�Simplify managing data

�Generate data-aware UI

IDE Productivity &

Testing

�Improve hand-coding

�Speed up tuning & debugging

�Fit in with established testing and build processes

®

Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential. 13

Data-centric Development

� ColdFusion

� PHP

� Java

� SOAP

� REST

� Flash Builder examines service

� Builds design-time model

� Configure data types and operations

� Databinding

� UI Generation

� Paging

� Data-management

2. Model Service1. Define Service3. Bind Operations to Flex UI components

®

Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential. 14

Data Centric Development: Supported Services

� ColdFusion

� Consume any ColdFusion Component (CFC)

� New workflow with ColdFusion Builder to auto-generate data access CFCs

� PHP

� Built-in support for Zend Framework

� Use Zend components or any PHP5 classes

� New workflow with Zend Studio for class generation

� Java

� BlazeDS

� LiveCycle Data Services ES – new workflow with LiveCycle Model Editor

� HTTP, REST, SOAP Web Services

� Extensible – add support for any other back-end

<WSDL>

®

Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential. 15

Data Centric Development: Data-bound UI

� Drag and drop to bind operation results to UI

� Invoke operations from component events (e.g. button clicks)

� Generate Master/Detail relationships

� Generate Charts

®

Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential. 16

Data Centric Development: Client-side Data Management

� Map client side data operations to server side operations

� Create, Update, Delete, etc.

� Automate bulk updates & deletions

� Support for “rollback” of changes to data

� One instance of any record

� Changes reflected wherever data is displayed

� Paging for large recordsets

� Automatic fetching of X records at a time

� Ideal for large datasets in grids, lists, etc.

®

Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential. 17

Testing and Deployment

� Network Monitor

� Unit Testing

� Code Coverage

� Command-line Builds

Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential. 18

Using Flex with PHP

Flex & PHP

Studio & Flash Builder 4

®

Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential. 19

PHP and Flex communication

Flex & AIR on the client, PHP on the server.

Web browserFLEX Apps

DesktopAIR Apps

DesktopAIR Apps

PHP

Server

PHP

Server

REST Services

Web Services

Remoting (RPC)

®

Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential. 20

How does remoting work?

MyClass {

getData() { … }saveData($myVO) {…}

}

MyClass {

getData() { … }saveData($myVO) {…}

}

Flex/AIR Client PHP ServerAMF3

®

Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential. 21

How does remoting work?

RemoteObject

getData();saveData(myVO);

MyClass {

getData() { … }saveData($myVO) {…}

}

MyClass {

getData() { … }saveData($myVO) {…}

}

Client calls MyClass->getData()

Flex/AIR Client PHP ServerAMF3

®

Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential. 22

How does remoting work?

RemoteObject

getData();saveData(myVO);

MyClass {

getData() { … }saveData($myVO) {…}

}

MyClass {

getData() { … }saveData($myVO) {…}

}

Client calls MyClass->getData()

Flex/AIR Client PHP Server

MyVO {

public $id;public $name;

}

MyVO {

public $id;public $name;

}

MyVO {

public var id:int;public var name:String;

}

Automatic conversionbetween PHP and ActionScript class

AMF3

®

Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential. 23

How does remoting work?

RemoteObject

getData();saveData(myVO);

MyClass {

getData() { … }saveData($myVO) {…}

}

MyClass {

getData() { … }saveData($myVO) {…}

}

Client calls MyClass->getData()

Flex/AIR Client PHP Server

MyVO {

public $id;public $name;

}

MyVO {

public $id;public $name;

}

MyVO {

public var id:int;public var name:String;

}

Server sends an array of MyVO objects

Automatic conversionbetween PHP and ActionScript class

Client calls RemoteObject.saveData(myVO)MyClass->saveData($myVO)

AMF3

White Master

Replace witha graphic

5.5” Tall & 4.3” Wide

Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential. 24

Adobe Flex Customers

Enterprise Web 2.0ISVs

White Master

Replace witha graphic

5.5” Tall & 4.3” Wide

Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential. 25

Q & A

®

Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential. 26