21
CAIRNGORM & ZEND AMF Open Source Flex Enterprise Development

360 Max Cairngorm Zamf

Embed Size (px)

DESCRIPTION

Slides from a presentation at the 360|MAX unconference at MAX 2008 on Cairngorm and Zend AMF

Citation preview

Page 1: 360 Max Cairngorm Zamf

CAIRNGORM&ZENDAMFOpen Source Flex Enterprise Development

Page 2: 360 Max Cairngorm Zamf

ABOUTME

VegasFlex UGM

Interactive Engineer at Vision Airlines

Adobe Fanboy

Open Source Enthusiast

Page 3: 360 Max Cairngorm Zamf

ZENDAMF

Page 4: 360 Max Cairngorm Zamf

WHYAMF

Much faster communication compared to XML (binary)

ActionScript Serialized

Cheap as Free (Open Source Solutions)

Adobe Systems published the AMF binary data protocol specification on December 13, 2007 and announced that it will support the developer community to make this protocol available for every major server platform.

Page 5: 360 Max Cairngorm Zamf

AMFPHPSOLUTIONS

AMFPHPPatrick Mineault/Wade Arnold - Open Source

Zend AMF Wade Arnold - Open Source

WebORB (.NET, Java, Ruby On Rails, PHP)Midnight Coders - Free

SabreAMFEvert Pot - Open Source

Page 6: 360 Max Cairngorm Zamf

AMFPHP

CONS

Open Source

Entry Level Solution

PROS

Open Source

Popular

Quick Install

Maps VOs

AMFPHP will be a fantastic fit for beginner to intermediate developers

-Wade Arnold

Page 7: 360 Max Cairngorm Zamf

WEBORB(PHP)

CONS

Ope Not n Source

“Sales” - Feel

Not as “simple” an install

PROS

Support Packages Available

Management Consoleservice browser, code generators

"WebORB is WAY cooler than AFMPHP"-Wade Arnold

Page 8: 360 Max Cairngorm Zamf

SABREAMF

CONS

Open Source

No Automatic VO Mapping

No Service Browser

PROS

Open Source

Low-Level Library

Page 9: 360 Max Cairngorm Zamf

ZENDAMF

CONS

New

Terrible Official Namee Zend Framework with the amf protocol server implementation using the package Zend_Amf and the class Zend_Amf_Server.

No Service Browser

PROS

Open Source

Adobe Supported!

Rapidly Developed

VO Mapping

(Future universal service browser)

Page 10: 360 Max Cairngorm Zamf

NEWNAMEPROPOSAL

ZAMF!

Page 11: 360 Max Cairngorm Zamf

CAIRNGORM

Page 12: 360 Max Cairngorm Zamf

CAIRNGORMCLARIFICATION

Can seem complicated at first

DOES NOT HAVE TO BE HARD

Oen not well presented for new users.

Not only for large projects

Not only for LiveCycle Data Services

Don’t try to compare to server side MVC (Ruby on Rails, CakePHP, etc)

Page 13: 360 Max Cairngorm Zamf

CAIRNGORM

A lightweight, prescriptive framework for some of the challenges consistent with the Flex RIAs we have encountered

Using a small number of relevant design patterns, where the moving whole is slightly greater than the sum of its static parts

A microarchitecture for RIA development—a starting point for your technical architecture that solves the problems as they have been solved successfully before

Page 14: 360 Max Cairngorm Zamf

CAIRNGORMIN15MIN

Trust Me. You Can Do It!Don’t Take NotesHold Questions

Page 15: 360 Max Cairngorm Zamf

OBLIGATORYMVCDIAGRAM

Model

View

Controller

Central Data

GUI

LogicView dispatches

an event

Data in Modelis bound to View

Controller UpdatesData in model

(CRUD/General Mucking of Data)

Page 16: 360 Max Cairngorm Zamf

SIMPLECAIRNGORMEVENT

Model

View

Singleton

MXML Components

EventEstablish Parameters

ControlEvent/Command Glue

CommandLogic

Data in Modelis bound to View

View DispatchesCairngorm Event

Event passes data toCommand through Control

Command Messeswith Model Data

Page 17: 360 Max Cairngorm Zamf

COMPLIFICATINGDIAGRAM

Model

View

Singleton

MXML Components

EventEstablish Parameters

ControlEvent/Command Glue

CommandLogic

DelegateHandles Web Services

Data in Modelis bound to View

View DispatchesCairngorm Event

Event passes data toCommand through Control

Command UpdatesModel Data

With Data FromService Request

Request/CRUDServer Data

CommandAsks Delegate toGet the Serviceto Talk to Server

InternetsVague Inaccurate

Earth Representation

Page 18: 360 Max Cairngorm Zamf

RIDICULOUSDIAGRAM

Model

View

Singleton

MXML Components

Event

Establish Parameters

Control

Event/Command GlueCommand

Logic

Delegate

Handles Web Services

Responder

Handles Web Results

Factory

Convert DataO!en into VOs

Value Object

AS Class designedto handle datain a speci"ed

structure.

Data in Model

is bound to View

View Dispatches

Cairngorm Event

Event passes data to

Command through Control

Responder Updates

Model Data

With Data From

Service Request

Sends instance of

VO in Request

Command

Asks Delegate to

Get the Service

to Talk to Server

Internets

Vague InaccurateEarth Representation

Page 19: 360 Max Cairngorm Zamf

CAIRNGORMCOMMANDMENTS

Never change model data from the view.I don’t care if you can

Use Cairngorm Events for application wide events

Use Naming ConventionsLoginEvent, LoginCommand, LoginDelegate, LoginResponder, LoginVO

Use Reverse DNS Folder Structure

Charge More for Cairngrom Work

Page 20: 360 Max Cairngorm Zamf

CAIRNGORM+ZAMF

Page 21: 360 Max Cairngorm Zamf

DEMO

Using Cairngen in Flex Builder 3http://blog.garthdb.com/2008/11/setting-up-cairngen-in-flex-builder-3/

SwitchVO VO Converterhttp://www.garthdb.com/projects/switchvo

Hosted ZAMFhttp://zamf.garthdb.com/bootstrap.php