Slide 1
no text exists for this slide
no notes exist for this slide
Slide 2
Who
Jesse Warden
Flex & Flash Consultant
Career: Director, Flash, Flex
Education: Art, Self-Taught Coder
no notes exist for this slide
Slide 3
Robotlegs/Gaia
Gaia
Robotlegs
Using Them Together
no notes exist for this slide
Slide 4
Why?
Flash Sites: Scaleable Mess
Flex Sites: Re-invent the wheel
no notes exist for this slide
Slide 5
no text exists for this slide
no notes exist for this slide
Slide 6
Gaia
Framework & Toolset for Building Flash Websites
Inspired by Ruby on Rails
no notes exist for this slide
Slide 7
Gaia Inventor
Steven Sacks
Gaia Inventor
stevensacks.net
Twittah: stevensacks
no notes exist for this slide
Slide 8
Industry Tools
SWFObject
SWFAddress
TweenLite
Thunderbolt
no notes exist for this slide
Slide 9
no notes exist for this slide
Slide 10
no notes exist for this slide
Slide 11
no notes exist for this slide
Slide 12
no notes exist for this slide
Slide 13
Transitions
transitionIn();
transitionOut();
transitioninComplete();
transitionOutComplete();
no notes exist for this slide
Slide 14
no notes exist for this slide
Slide 15
no notes exist for this slide
Slide 16
no notes exist for this slide
Slide 17
Preloading
multiple Files, Byte Accuracy
Override Runtime API
Pre-loaders for Pages
Pre-loaders for Assets
no notes exist for this slide
Slide 18
Other Features
SEO Scaffolding (yes, it works)
DEEPlinking API on top of SWFAddress
Bindings support in Site.xml
no notes exist for this slide
Slide 19
no notes exist for this slide
Slide 20
Robotlegs
MVCS Framework
ActionScript 3
no notes exist for this slide
Slide 21
Robotlegs
Pure AS3 = Yes
Flex = Yes
AIR = Yes
Flash = Yes (CS4/CS5)
no notes exist for this slide
Slide 22
Robotlegs
Shaun Smith
Robotlegs Inventor
Shaun.boyblack.co.za
Twittah: darscan
no notes exist for this slide
Slide 23
Robotlegs
Comes with a Reference Implementation (MVCS)
Robert Pennerâs âSignalsâ
Elad Elromâs âPassive View Exampleâ
AsyncCommand
no notes exist for this slide
Slide 24
Dependency INjection
The New âNewâ
All you need to know: [Inject]
SWiftSuspenders
SmartyPants IoC
GUICE: A Different Java Spring
no notes exist for this slide
Slide 25
Dependency Injection
Solves PureMVCâs Casting Problem
var myView: viewObject as MainView;
var proxy:MyProxy = facade.retreiveProxy(MyProxy.NAME) as MyProxy;
Easier to code to Interfaces
no notes exist for this slide
Slide 26
DI Example
private var proxy:MyProxy;
var proxy:MyProxy = facade.retreiveProxy(MyProxy.NAME) as MyProxy;
trace(proxy.myVO);
---------------------------
[Inject]
public var model:MyModel
trace(model.myVO);
no notes exist for this slide
Slide 27
no text exists for this slide
no notes exist for this slide
Slide 28
Events
Communications Through Events
no notes exist for this slide
Slide 29
Event Gotchas
Tons
Sub-Systems
More Events > More properties
no notes exist for this slide
Slide 30
no text exists for this slide
no notes exist for this slide
Slide 31
View
GUI
Form
Chart
Video Player
List of Images
no notes exist for this slide
Slide 32
Dumb View
Dumb
2 things
Accept Data
Dispatch User Gestures
no notes exist for this slide
Slide 33
no text exists for this slide
no notes exist for this slide
Slide 34
ValueObject
HOld âValueâ
2nd Most Valuable Class
Strongly Typed
Can Differ From Server to help GUI
no notes exist for this slide
Slide 35
VO Gotchas
To Build yerself...
...or have a Factory do it
constructor Params foil Serialization
Use Optional Values if you must
It changes, affects Entire App
no notes exist for this slide
Slide 36
Robotlegs
Context
Mediator
Services
Model
Command
Actor (Base Class)
no notes exist for this slide
Slide 37
no text exists for this slide
no notes exist for this slide
Slide 38
Context
Initialize Framework
Event Bus
Multiple Contexts for Modular Development
no notes exist for this slide
Slide 39
Actor
Base Class for Model and Service
Has Context Injected
Base Class to communicate to the Framework
no notes exist for this slide
Slide 40
no text exists for this slide
no notes exist for this slide
Slide 41
Mediator
Mediator Pattern
View Communicate w/ Framework
1 View per Mediator
Keeps Framework out
Not all views need Mediators
no notes exist for this slide
Slide 42
no text exists for this slide
no notes exist for this slide
Slide 43
Service
Retrieve and/or Send Data
Remote and/or Local Services
Parse Data to VOâs
Dispatch Success or Failure
Donât Listen to Framework Events
Great Unit Test Candidates
no notes exist for this slide
Slide 44
Service Practices
Doesnât Store Data
Dispatch Event, has Data in It
Extend Actor
Storeâs Data
Dispatch Event, NO Data in It
Extend EventDispatcher
no notes exist for this slide
Slide 45
Service Gotchaâs
Foreign Data
FActories:
#1 Source of Bugs
Compiler Doesnât
Help you
Manual Timeouts
Explode Early
no notes exist for this slide
Slide 46
no text exists for this slide
no notes exist for this slide
Slide 47
Model(s)
Observer Pattern
Stores Global Data
Usually Wraps a VO
Doesnât Listen for Framework Events
Dispatches Data Changes
Persists
Extends Actor
no notes exist for this slide
Slide 48
Model(s)
Re-Factor to:
Data needs to persist
1> Mediator/Command Use Data
no notes exist for this slide
Slide 49
no text exists for this slide
no notes exist for this slide
Slide 50
Command
Command Pattern
Controller Work
DRY
Re-Factor To
Doesnât Listen to Framework Events
no notes exist for this slide
Slide 51
Command Example
Login Form
Update Profile
Edit Server Data
no notes exist for this slide
Slide 52
User Gestures
Commandâs are Usually User Gestures
Login, Logout, SaveUser
AddTag
Save
no notes exist for this slide
Slide 53
Command Proâs
DRY
Centralized Logic
Data Problem = 2 places to look
Service
Command
Not Hunting Through Mediators
RAD (Rapid Application Development)
no notes exist for this slide
Slide 54
COmmand Conâs
Code Bloat Early in Project
Handling Context Sensitive Data?
...2 Commands
20 User Gestures = 40 Commands
Commands for Everything
no notes exist for this slide
Slide 55
no text exists for this slide
no notes exist for this slide
Slide 56
AsyncCommand
Asynchronous Command
Why?
Java/C/C++ Devs Invented Command Pattern
Blocking Language
Executes Server Request and Code
pauses
no notes exist for this slide
Slide 57
AsyncCommand
ActionScript is not Blocking
It is Asynchronous
Sometimes things need to wait
To wait, they need context
To have context, they need to exist
Commands die immediately
no notes exist for this slide
Slide 58
AsyncCommand
AsyncCommandâs do not Block
You Control when they die
You can handle Server responses
with Context
React & Respond w/ Less code
fork to call other Commands
no notes exist for this slide
Slide 59
Gaia + Robotlegs
Gaia builds yer Site
Robotlegs Handles:
Business Logic
Application Logic
no notes exist for this slide
Slide 60
Why?
Agency
Shields from Ever Changing client Visuals
View Changes, App/Biz Logic Doesnât
Dev
Donât Break Gaiaâs modules
RAD & Scaleable
no notes exist for this slide
Slide 61
How?
Export SWC âMagic Checkboxâ
no notes exist for this slide
Slide 62
Step by Step
Setup Gaia Project
Register Context in Main.as
Page or child View implement Interface
Register Interface for Mediator
no notes exist for this slide
Slide 63
Rules nâ Gotchas
Interface for Bridge Pattern
Gaia Pages use Bridge Pattern
Not all Gaia Pages need a Mediator
no notes exist for this slide
Slide 64
Conclusions
Gaia is the Foundation for Site
Robotlegs Handles Biz & App Logic
Together, they Build a Scaleable & Flexible Site
no notes exist for this slide
Slide 65
Questions?
Jesse Warden
Twittah: jesterxl
jessewarden.com
no notes exist for this slide