View
1.760
Download
0
Category
Tags:
Preview:
DESCRIPTION
Mate Presentation given to NY Flex User's Group on October 22nd, 2009. Covers EventMap, EventHandlers, Injectors, and YQL for Twitter integration. I didn't make the diagrams. They were created by another blogger (whom I can't seem to find at this moment). They were used without permission, so if you are the rightful owner and would like me to add attribution or remove the diagrams, let me know.
Citation preview
Getting Friendly with MateAlex Petrescu
Sr. Presentation Layer Developer
Razorfish
Flex Frameworks
Cairngorm
PureMVC
Mate
Swiz
Cairngorm PureMVC Mate Swiz
Cairngorm
Very defined MVC Structure
Very mature
Complex
A lot of classes
Tight coupling between MVC
PureMVC
Very defined MVC Structure
Mature
Plays nice with Java
Doesn’t take advantage of Flex
Mate
Rapid Development
Lose coupling
Uses Native Flex Events
Inversion of Control (IoC) pattern
Easy to retrofit existing code
Swiz
Rapid Development
Lose coupling
Uses Native Flex Events
Inversion of Control (IoC) pattern
No imposed structure
Mate BasicsGet started quickly.
The View
Normal MXML view.
Public properties for data injection.
Public methods for callbacks / listener injection.
No references to manager / Mate necessary.
Re-use of existing views possible.
Use data binding / setters to make
View & Model
The Event / Bubbles
Normal Flex / AS3 event.
Bubbles = True
Event bubbles up to stage.
Can use GlobalDispatcher class to dispatch events from non-views.
Re-use of existing events possible.
The EventMap
The Core / Controller of the application.
<EventMap> tag
Event Handlers
Injectors
Controller / Event Map
Mate Specific Tags - EventMap
<EventHandlers type=”{YourEvent.TYPE}”>
<Injectors type=”{TargetView}”>
Mate Specific Tags - EventHandlers
<MethodInvoker
generator=”{YourObject}”
method=”functionName”
arguments=”[arg1,arg2]”>
<EventAnnouncer
generator=”{YourEvent}”
type=”{YourEvent.TYPE}”>
Mate Specific Tags - EventHandlers
<RemoteObjectInvoker
destination=”YourDestination”
source=”path.to.this.service”
method=”functionName”
arguments=”[arg1,arg2]”>
Mate Specific Tags - EventHandlers
<HttpServiceInvoker
url=”http://path.to/yourservice”>
<Request prop1=”{event.prop1}” prop2=”{event.prop2}”/>
</HttpServiceInvoker>
Mate Specific Tags - EventHandlers
<Callback
method=”functionName”
targetId=”myID” (optional)
arguments=”[arg1,arg2]”>
Mate Specific Tags - Injectors
<PropertyInjector
targetKey=”myProperty”
source=”{MyManager}”
sourceKey=”myPropertyOnManager”>
Mate Specific Tags - Injectors
<ListenerInjector
eventType=”{MyEvent.TYPE}”
method=”myMethod”>
Hello Mate!Quick demo.
Thank Youhttp://www.kilometer0.com/mate/ for presentation / code.
Recommended