360 Max Cairngorm Zamf

Preview:

DESCRIPTION

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

Citation preview

CAIRNGORM&ZENDAMFOpen Source Flex Enterprise Development

ABOUTME

VegasFlex UGM

Interactive Engineer at Vision Airlines

Adobe Fanboy

Open Source Enthusiast

ZENDAMF

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.

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

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

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

SABREAMF

CONS

Open Source

No Automatic VO Mapping

No Service Browser

PROS

Open Source

Low-Level Library

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)

NEWNAMEPROPOSAL

ZAMF!

CAIRNGORM

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)

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

CAIRNGORMIN15MIN

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

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)

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

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

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

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

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

Recommended