mate presentation given to ny flex user's group

21
Getting Friendly with Mate Alex Petrescu Sr. Presentation Layer Developer Razorfish

Upload: alex-petrescu

Post on 19-May-2015

1.760 views

Category:

Technology


0 download

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.

TRANSCRIPT

Page 1: Mate Presentation given to NY Flex User's Group

Getting Friendly with MateAlex Petrescu

Sr. Presentation Layer Developer

Razorfish

Page 2: Mate Presentation given to NY Flex User's Group

Flex Frameworks

Cairngorm

PureMVC

Mate

Swiz

Cairngorm PureMVC Mate Swiz

Page 3: Mate Presentation given to NY Flex User's Group

Cairngorm

Very defined MVC Structure

Very mature

Complex

A lot of classes

Tight coupling between MVC

Page 4: Mate Presentation given to NY Flex User's Group

PureMVC

Very defined MVC Structure

Mature

Plays nice with Java

Doesn’t take advantage of Flex

Page 5: Mate Presentation given to NY Flex User's Group

Mate

Rapid Development

Lose coupling

Uses Native Flex Events

Inversion of Control (IoC) pattern

Easy to retrofit existing code

Page 6: Mate Presentation given to NY Flex User's Group

Swiz

Rapid Development

Lose coupling

Uses Native Flex Events

Inversion of Control (IoC) pattern

No imposed structure

Page 7: Mate Presentation given to NY Flex User's Group

Mate BasicsGet started quickly.

Page 8: Mate Presentation given to NY Flex User's Group

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

Page 9: Mate Presentation given to NY Flex User's Group

View & Model

Page 10: Mate Presentation given to NY Flex User's Group

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.

Page 11: Mate Presentation given to NY Flex User's Group

The EventMap

The Core / Controller of the application.

<EventMap> tag

Event Handlers

Injectors

Page 12: Mate Presentation given to NY Flex User's Group

Controller / Event Map

Page 13: Mate Presentation given to NY Flex User's Group

Mate Specific Tags - EventMap

<EventHandlers type=”{YourEvent.TYPE}”>

<Injectors type=”{TargetView}”>

Page 14: Mate Presentation given to NY Flex User's Group

Mate Specific Tags - EventHandlers

<MethodInvoker

generator=”{YourObject}”

method=”functionName”

arguments=”[arg1,arg2]”>

<EventAnnouncer

generator=”{YourEvent}”

type=”{YourEvent.TYPE}”>

Page 15: Mate Presentation given to NY Flex User's Group

Mate Specific Tags - EventHandlers

<RemoteObjectInvoker

destination=”YourDestination”

source=”path.to.this.service”

method=”functionName”

arguments=”[arg1,arg2]”>

Page 16: Mate Presentation given to NY Flex User's Group

Mate Specific Tags - EventHandlers

<HttpServiceInvoker

url=”http://path.to/yourservice”>

<Request prop1=”{event.prop1}” prop2=”{event.prop2}”/>

</HttpServiceInvoker>

Page 17: Mate Presentation given to NY Flex User's Group

Mate Specific Tags - EventHandlers

<Callback

method=”functionName”

targetId=”myID” (optional)

arguments=”[arg1,arg2]”>

Page 18: Mate Presentation given to NY Flex User's Group

Mate Specific Tags - Injectors

<PropertyInjector

targetKey=”myProperty”

source=”{MyManager}”

sourceKey=”myPropertyOnManager”>

Page 19: Mate Presentation given to NY Flex User's Group

Mate Specific Tags - Injectors

<ListenerInjector

eventType=”{MyEvent.TYPE}”

method=”myMethod”>

Page 20: Mate Presentation given to NY Flex User's Group

Hello Mate!Quick demo.

Page 21: Mate Presentation given to NY Flex User's Group

Thank Youhttp://www.kilometer0.com/mate/ for presentation / code.