• Save
An Opinionated Introduction to Mate
Upcoming SlideShare
Loading in...5
×
 

An Opinionated Introduction to Mate

on

  • 603 views

EffectiveUI Lead Mobile Developer John Blanco gives a brief introduction to Mate and explores why we need it. This presentation also reviews problems with Cairngorm and PureMVC.

EffectiveUI Lead Mobile Developer John Blanco gives a brief introduction to Mate and explores why we need it. This presentation also reviews problems with Cairngorm and PureMVC.

Statistics

Views

Total Views
603
Views on SlideShare
603
Embed Views
0

Actions

Likes
0
Downloads
0
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

An Opinionated Introduction to Mate An Opinionated Introduction to Mate Presentation Transcript

  • An Opinionated Introduction to Mate by John Blanco
  • Mate is, quite simply, another MVC framework for Flex. What is Mate? Yes. And now someone wrote another one called Mate. And I’ll try to explain why it’s easier to use and more powerful. But didn’t someone already write Cairngorm?
    • Working with modules is tricky.
    • Service Locator/Delegates are bulky.
    • Bulky boilerplate code everywhere.
    • No solution for Views.
    • It’s 2008.
    What’s wrong with Cairngorm? View slide
    • Working with modules is tricky.
    • Proxy class is awfully coupling.
    • MASSIVE boilerplate code everywhere.
    • DRY principle violated consistently.
    • THE CASTING IS DRIVING ME MAD@&!
    • Mediators are singleton only.
    • Cross-platform-ness means it’s not Flex-y.
    • Debugging a nightmare.
    What’s wrong with PureMVC? View slide
    • Working with modules straightforward.
    • Loose coupling everywhere.
    • Virtually no boilerplate code.
    • No casting!
    • N Views can be populated at once.
    • Native events used for communication.
    • Debug!
    What’s *right* with Mate?
  • Mate was created by AS Fusion -- Laura and Nahuel. While the source code is freely available, you can not contribute back any changes without going through one of them. However, they are extremely active on their forums and very willing to improve the product based on recommendations! http://mate.asfusion.com Who wrote Mate? Is it open source?
  • Models are regular classes. No inheritance needed. Does not need to be a singleton. Does not need to be static. Just make a model. :-) The Elements of Mate: Models
  • Views are regular classes. No inheritance needed. XML or AS is fine. No knowledge of models or controllers needed (or desired). Just make a view. :-) The Elements of Mate: Views
  • Events are subclasses of…Event! No CairngormEvent or Notification classes needed. Fire regular events. This means that we can pull out components and we have no dependency on Mate. Very clean. The Elements of Mate: Events
  • Event Maps are the only place you will ever put Mate-specific code. The event maps weave together models and views in myriad ways. Event maps, in general, will handle events by binding data to views, calling methods (like Commands), serve as Mediators, and even invoke network processes and handle returns! The Elements of Mate: Event Maps
  • <!-- Debugger --> <Debugger level=“{ Debugger.ALL }” /> <!-- Event Handlers --> <EventHandlers type=“{ CalculateEvent.TOTAL_COST }” debug=“true” > <MethodInvoker generator=“{ CartManager }” method=“calculateTotal” /> </EventHandlers> <!-- Injectors --> <Injectors target=“{ CartView }”> <PropertyInjector targetKey=“total” source=“{ CartManager }” sourceKey=“total” /> </Injectors> The Elements of Mate: A Quick Event Map Example
  • Let us look at some examples, shall we?
  • Questions?