SlideShare una empresa de Scribd logo
1 de 13
Descargar para leer sin conexión
PureMVC: Next Steps & Conclusion
Adobe Flex 3 Microarchitectures Series


            Samuel Asher Rivello
            Principal, RivelloMultimediaConsulting.com (RMC)
            Certified Designer & Developer (Adobe Flash)




2007 Adobe Systems Incorporated. All Rights Reserved.
PureMVC

    Next Steps
               • Recap Today’s “Hello Google” Project
               • 10 Tips for Using PureMVC

               • PureMVC Alternatives
               • PureMVC.org Website
               • References, SourceCode




2009 Rivello Multimedia Consulting. All Rights Reserved.
PureMVC: Recap

    The Framework
               • A framework is a collaborating set of design patterns
               • Learning a framework is a very worthy investment to empower your team
               to build bigger, better projects
               • PureMVC is a framework separates M,V,C logic in your app to enable
               teamwork, maintainability, and extensibility
               • UI, VO, and actors of PureMVC shown in diagram below




2009 Rivello Multimedia Consulting. All Rights Reserved.
PureMVC: Recap

    Hello Google Sample App
               • Silly, but simple & complete
               example using PureMVC
               • The user clicks a Button which
               populates a TextField with text
               from Google’s homepage.
               • Entire Interaction from UI Button
               click to server call/response to
               update UI TextField summarized in
               diagram to right



        TextField
             Button




2009 Rivello Multimedia Consulting. All Rights Reserved.
PureMVC: 10 Tips – 1 Through 5
    1.      Think in (Pure)MVC
               •       How do I start using PureMVC? Short answer: Just think in MVC!
                          1.       Proxies = Model
                          2.       Mediator and View Components = View
                          3.       Commands = Controller
    2.      Create an API for View Components
               •       A View Component might be a standard UI component (e.g. DataGrid) or a custom
                       component (e.g. a world within a game) or whatever. Don’t use its public methods directly.
                       Use its Mediator as a wrapper to create an API.
    3.      Use one Mediator for multiple View Components
               •       To closely coordinate more than one View Component, use just one Mediator to control
                       them all.
    4.      Let Events bubble up
               •       Bubble events from the nested children of a view component up to the mediator.
    5.      Communicate using Noti cations as often as possible
               •       It’s a bad practice to change a Proxy (Model) from a Mediator (View) directly without using a
                       Command (Controller).



2009 Rivello Multimedia Consulting. All Rights Reserved.
PureMVC: 10 Tips – 6 Through 10

    6.      Use Commands / MacroCommands as often as possible
               •       Once code is in a command, simply send the appropriate noti cation from anywhere to
                       repeat its execution.
    7.      Use Remote Proxy to send and receive server-side data
               •       This is HUGE! If the server’s API changes, you will only have one area of your code to change.
                       Very convenient encapsulation.
    8.      Unregister unused Mediators
    9.      The Power of VO’s (Value Objects)
               •       View Component has no access to the Model data directly.
    10.     Practice, Practice, Practice
               •       Do a few demos from scratch to learn the basics
               •       Build time into your rst production project to learn-as-you-go!




2009 Rivello Multimedia Consulting. All Rights Reserved.
PureMVC

    When to Use PureMVC (or a Framework in General)
               • When scalability and maintainability are more important than rapid execution

               • When the project feels more ‘application’-like (Many UI controls / Discrete business
               logic) than ‘game’-like
               • Medium to Large Projects (> 100 Man hours)

               • Team Projects ( > 2 Developers)

               • Long Term Projects (> v1.0 in discussion)


    My Opinion: Once expertly trained on PureMVC teams work faster
    with PureMVC than a custom solution.
               • Faster Architecture Stage

               • Faster Implementation (Debatable)

               • Faster Meetings / Discussions

               • Faster Development of Post-v1.0 Features (By Far)



2009 Rivello Multimedia Consulting. All Rights Reserved.
PureMVC: Alternatives

    Flash Platform Frameworks
               • Cairngorm -                   http://opensource.adobe.com/wiki/display/cairngorm/Cairngorm
               • Mate - http://mate.asfusion.com/

               • Swiz - http://code.google.com/p/swizframework/

               • Others - ARP, MVCS, Flest, Model-Glue: Flex, ServerBox Foundry, Guasax, Slide, and
               many many more…
               • Comparison of Frameworks

                          • http://puremvc.org/content/view/43/98/

                          • http://www.adobe.com/devnet/              ex/articles/ ex_framework.html




2009 Rivello Multimedia Consulting. All Rights Reserved.
PureMVC: vs. Cairngorm: The Very Basics
    In Cairngorm, typically you:
               • De       ne the ModelLocator class as a Singleton.
               • Add properties to it.

               • Fetch the ModelLocator Singleton at various places in the View by calling its
               getInstance method.
               • Bind to its properties.


    In PureMVC, you:
               • De       ne proxies to hold the data
               • Register them with the Model, typically via the Facade

               • Retrieve the Proxies elsewhere with Commands or Mediators

               • Set the data on the View Components with Mediators




2009 Rivello Multimedia Consulting. All Rights Reserved.
PureMVC: vs. Cairngorm: The Major Parts
    PureMVC                                                Cairngorm

    Model                                                  Model
    View                                                   View
    Controller                                             Controller
    Command                                                Command
    Facade                                                 CairngormEvent
    Proxy                                                  Delegate
    Mediator                                               Service
    Noti cation



    More Info: http://geekglue.blogspot.com/2007/10/cairngorm-vs-puremvc-quick-comparison.html
    Pros & Cons: http://robsondesign.com/demo/framework_comparison/




2009 Rivello Multimedia Consulting. All Rights Reserved.
PureMVC: Website

    PureMVC.org
               • Downloads

               • Documentation

               • Examples, Showcase, Forums, News

               • Plug-in Utilities

                          • State Management

                          • Startup App Loading Management

                          • Much, Much More…




2009 Rivello Multimedia Consulting. All Rights Reserved.
PureMVC: QA

    Any Questions on The Topics Covered?


    Section 1: De nition and Bene ts of PureMVC
    Section 2: PureMVC Applied
               • Adding PureMVC to your project

               • Using my PureMVCTemplate

               • Building “Your First Project”

    Section 3: Next Steps, QA, & Conclusion
               • 10 Tips for PureMVC

               • Comparison to Other Frameworks

               • References & Links




2009 Rivello Multimedia Consulting. All Rights Reserved.
PureMVC: References & Thank you!
     SPEAKER
                 • Samuel Asher Rivello| Principal, RivelloMultimediaConsulting.com (RMC)

                 • RMC Services: Software Architecture, Consulting, Development,   & Training
                 • Specializes in PureMVC Architecture

                 • Business Cards Available



     PureMVC on the EDGE!
                 • Article Published: “An introduction to PureMVC for Adobe Flash and Flex” on Adobe’s EDGE newsletter a
                 http://www.adobe.com/newsletters/edge/december2008/articles/article6/)

    REFERENCES                                                                SPECIAL THANKS!!!

    FULL DOCUMENTATION TO TODAYS TALK
            • Contact 360|Flex                                                PUREMVC AUTHOR
    ARCHIVE OF TODAYS VIDEOS
                                                                                      • Cliff Hall
            • Contact 360|Flex
    MY OTHER PRESENTATIONS                                                            • http://www.puremvc.org
            • See ‘Blog’ on RMC link above. (Post a Comment!)                         • Email & Contact – See Website
    PUREMVC
            • http://www.puremvc.org
    • ADOBE FLEX 3
            • http://www.adobe.com/products/ ex/




2009 Rivello Multimedia Consulting. All Rights Reserved.

Más contenido relacionado

Similar a Samuel Asher Rivello - PureMVC Hands On Part 2

Enterprise Cloud with IBM & Chef (ChefConf 2013)
Enterprise Cloud with IBM & Chef (ChefConf 2013)Enterprise Cloud with IBM & Chef (ChefConf 2013)
Enterprise Cloud with IBM & Chef (ChefConf 2013)
Michael Elder
 
STO5475_Rasheed_Winter_FORMATTED3
STO5475_Rasheed_Winter_FORMATTED3STO5475_Rasheed_Winter_FORMATTED3
STO5475_Rasheed_Winter_FORMATTED3
Abdul Rasheed
 
Introduction to MVC in Flex and HydraMVC
Introduction to MVC in Flex and HydraMVCIntroduction to MVC in Flex and HydraMVC
Introduction to MVC in Flex and HydraMVC
cltru
 
symfony: An Open-Source Framework for Professionals (PHP Day 2008)
symfony: An Open-Source Framework for Professionals (PHP Day 2008)symfony: An Open-Source Framework for Professionals (PHP Day 2008)
symfony: An Open-Source Framework for Professionals (PHP Day 2008)
Fabien Potencier
 

Similar a Samuel Asher Rivello - PureMVC Hands On Part 2 (20)

Best Practices Guide: Introducing Web Application Firewalls
Best Practices Guide: Introducing Web Application FirewallsBest Practices Guide: Introducing Web Application Firewalls
Best Practices Guide: Introducing Web Application Firewalls
 
Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated ...
Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated ...Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated ...
Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated ...
 
PCDW For Owners
PCDW For OwnersPCDW For Owners
PCDW For Owners
 
Soa R 7 16 08 Appistry Private Clouds Etc Bob Lozano
Soa R 7 16 08   Appistry   Private Clouds Etc Bob LozanoSoa R 7 16 08   Appistry   Private Clouds Etc Bob Lozano
Soa R 7 16 08 Appistry Private Clouds Etc Bob Lozano
 
Seminar - JBoss Migration
Seminar - JBoss MigrationSeminar - JBoss Migration
Seminar - JBoss Migration
 
JavaFX Uni Parthenope
JavaFX Uni ParthenopeJavaFX Uni Parthenope
JavaFX Uni Parthenope
 
Úvod do programování 7
Úvod do programování 7Úvod do programování 7
Úvod do programování 7
 
Administrivia: Golden Tips for Making JIRA Hum
Administrivia: Golden Tips for Making JIRA HumAdministrivia: Golden Tips for Making JIRA Hum
Administrivia: Golden Tips for Making JIRA Hum
 
Administrivia: Golden Tips for Making JIRA Hum
Administrivia: Golden Tips for Making JIRA HumAdministrivia: Golden Tips for Making JIRA Hum
Administrivia: Golden Tips for Making JIRA Hum
 
Programmable infrastructure with FlyScript
Programmable infrastructure with FlyScriptProgrammable infrastructure with FlyScript
Programmable infrastructure with FlyScript
 
Getting started with open mobile development on the Openmoko platform
Getting started with open mobile development on the Openmoko platformGetting started with open mobile development on the Openmoko platform
Getting started with open mobile development on the Openmoko platform
 
My History with Atlassian Tools, and Why I'm Moving to Studio
My History with Atlassian Tools, and Why I'm Moving to StudioMy History with Atlassian Tools, and Why I'm Moving to Studio
My History with Atlassian Tools, and Why I'm Moving to Studio
 
Enterprise Cloud with IBM & Chef (ChefConf 2013)
Enterprise Cloud with IBM & Chef (ChefConf 2013)Enterprise Cloud with IBM & Chef (ChefConf 2013)
Enterprise Cloud with IBM & Chef (ChefConf 2013)
 
Supercharging Optimizely Performance by Moving Decisions to the Edge
Supercharging Optimizely Performance by Moving Decisions to the EdgeSupercharging Optimizely Performance by Moving Decisions to the Edge
Supercharging Optimizely Performance by Moving Decisions to the Edge
 
STO5475_Rasheed_Winter_FORMATTED3
STO5475_Rasheed_Winter_FORMATTED3STO5475_Rasheed_Winter_FORMATTED3
STO5475_Rasheed_Winter_FORMATTED3
 
Introduction to MVC in Flex and HydraMVC
Introduction to MVC in Flex and HydraMVCIntroduction to MVC in Flex and HydraMVC
Introduction to MVC in Flex and HydraMVC
 
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory Course
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory CourseRuby on Rails 101 - Presentation Slides for a Five Day Introductory Course
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory Course
 
Hands-On Lab: Quickly and Easily Monitor Applications using CA Application Pe...
Hands-On Lab: Quickly and Easily Monitor Applications using CA Application Pe...Hands-On Lab: Quickly and Easily Monitor Applications using CA Application Pe...
Hands-On Lab: Quickly and Easily Monitor Applications using CA Application Pe...
 
symfony: An Open-Source Framework for Professionals (PHP Day 2008)
symfony: An Open-Source Framework for Professionals (PHP Day 2008)symfony: An Open-Source Framework for Professionals (PHP Day 2008)
symfony: An Open-Source Framework for Professionals (PHP Day 2008)
 
Linux Everywhere? Matching the Workload to the Computer
Linux Everywhere? Matching the Workload to the ComputerLinux Everywhere? Matching the Workload to the Computer
Linux Everywhere? Matching the Workload to the Computer
 

Más de 360|Conferences

Giorgio Natilli - Blaze DS Connectivity Framework
Giorgio Natilli - Blaze DS Connectivity FrameworkGiorgio Natilli - Blaze DS Connectivity Framework
Giorgio Natilli - Blaze DS Connectivity Framework
360|Conferences
 

Más de 360|Conferences (20)

InsideMobile Keynote
InsideMobile KeynoteInsideMobile Keynote
InsideMobile Keynote
 
Metaio Mobile Augmented Reality
Metaio Mobile Augmented RealityMetaio Mobile Augmented Reality
Metaio Mobile Augmented Reality
 
Web Os Hands On
Web Os Hands OnWeb Os Hands On
Web Os Hands On
 
Mobile Apps- Business Toolkit for the Manager
Mobile Apps- Business Toolkit for the ManagerMobile Apps- Business Toolkit for the Manager
Mobile Apps- Business Toolkit for the Manager
 
Making Real Money with Mobile Apps
Making Real Money with Mobile AppsMaking Real Money with Mobile Apps
Making Real Money with Mobile Apps
 
Unlocking Android
Unlocking AndroidUnlocking Android
Unlocking Android
 
Inside Mobile Widgets Publish
Inside Mobile Widgets PublishInside Mobile Widgets Publish
Inside Mobile Widgets Publish
 
You Know WebOS
You Know WebOSYou Know WebOS
You Know WebOS
 
Ignite Denver 4 Master Deck
Ignite Denver 4 Master DeckIgnite Denver 4 Master Deck
Ignite Denver 4 Master Deck
 
Oğuz Demirkapı - Hands On Training: Creating Our First i18N Flex Application ...
Oğuz	Demirkapı - Hands On Training: Creating Our First i18N Flex Application ...Oğuz	Demirkapı - Hands On Training: Creating Our First i18N Flex Application ...
Oğuz Demirkapı - Hands On Training: Creating Our First i18N Flex Application ...
 
Tyler Wright - Undo History with Flight
Tyler Wright - Undo History with FlightTyler Wright - Undo History with Flight
Tyler Wright - Undo History with Flight
 
Chad Udell - Developers are from Mars, Designers are from Venus
Chad Udell - Developers are from Mars, Designers are from VenusChad Udell - Developers are from Mars, Designers are from Venus
Chad Udell - Developers are from Mars, Designers are from Venus
 
Mansour Raad & Anthony Jayaprakash - Yet Another Mapping Framework, NOT!
Mansour Raad & Anthony Jayaprakash - Yet Another Mapping Framework, NOT!Mansour Raad & Anthony Jayaprakash - Yet Another Mapping Framework, NOT!
Mansour Raad & Anthony Jayaprakash - Yet Another Mapping Framework, NOT!
 
Erik Loehfelm - Experience Design with Flash Catalyst and Flex Gumbo
Erik Loehfelm - Experience Design with Flash Catalyst and Flex GumboErik Loehfelm - Experience Design with Flash Catalyst and Flex Gumbo
Erik Loehfelm - Experience Design with Flash Catalyst and Flex Gumbo
 
Ryan Phelan - Bending and Flexing
Ryan Phelan - Bending and FlexingRyan Phelan - Bending and Flexing
Ryan Phelan - Bending and Flexing
 
Giorgio Natilli - Blaze DS Connectivity Framework
Giorgio Natilli - Blaze DS Connectivity FrameworkGiorgio Natilli - Blaze DS Connectivity Framework
Giorgio Natilli - Blaze DS Connectivity Framework
 
Douglas Knudsen - Great Mash Up
Douglas Knudsen - Great Mash UpDouglas Knudsen - Great Mash Up
Douglas Knudsen - Great Mash Up
 
Wes Leonardo - Putting AIR into your Application
Wes Leonardo - Putting AIR into your ApplicationWes Leonardo - Putting AIR into your Application
Wes Leonardo - Putting AIR into your Application
 
Adrian Pomilio - Flex Ajax Bridge and Legacy Applications
Adrian Pomilio - Flex Ajax Bridge and Legacy ApplicationsAdrian Pomilio - Flex Ajax Bridge and Legacy Applications
Adrian Pomilio - Flex Ajax Bridge and Legacy Applications
 
Ryan Fishberg and Joan Lafferty - ItemsRenderers
Ryan Fishberg and Joan Lafferty - ItemsRenderersRyan Fishberg and Joan Lafferty - ItemsRenderers
Ryan Fishberg and Joan Lafferty - ItemsRenderers
 

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Último (20)

WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 

Samuel Asher Rivello - PureMVC Hands On Part 2

  • 1. PureMVC: Next Steps & Conclusion Adobe Flex 3 Microarchitectures Series Samuel Asher Rivello Principal, RivelloMultimediaConsulting.com (RMC) Certified Designer & Developer (Adobe Flash) 2007 Adobe Systems Incorporated. All Rights Reserved.
  • 2. PureMVC Next Steps • Recap Today’s “Hello Google” Project • 10 Tips for Using PureMVC • PureMVC Alternatives • PureMVC.org Website • References, SourceCode 2009 Rivello Multimedia Consulting. All Rights Reserved.
  • 3. PureMVC: Recap The Framework • A framework is a collaborating set of design patterns • Learning a framework is a very worthy investment to empower your team to build bigger, better projects • PureMVC is a framework separates M,V,C logic in your app to enable teamwork, maintainability, and extensibility • UI, VO, and actors of PureMVC shown in diagram below 2009 Rivello Multimedia Consulting. All Rights Reserved.
  • 4. PureMVC: Recap Hello Google Sample App • Silly, but simple & complete example using PureMVC • The user clicks a Button which populates a TextField with text from Google’s homepage. • Entire Interaction from UI Button click to server call/response to update UI TextField summarized in diagram to right TextField Button 2009 Rivello Multimedia Consulting. All Rights Reserved.
  • 5. PureMVC: 10 Tips – 1 Through 5 1.  Think in (Pure)MVC •  How do I start using PureMVC? Short answer: Just think in MVC! 1.  Proxies = Model 2.  Mediator and View Components = View 3.  Commands = Controller 2.  Create an API for View Components •  A View Component might be a standard UI component (e.g. DataGrid) or a custom component (e.g. a world within a game) or whatever. Don’t use its public methods directly. Use its Mediator as a wrapper to create an API. 3.  Use one Mediator for multiple View Components •  To closely coordinate more than one View Component, use just one Mediator to control them all. 4.  Let Events bubble up •  Bubble events from the nested children of a view component up to the mediator. 5.  Communicate using Noti cations as often as possible •  It’s a bad practice to change a Proxy (Model) from a Mediator (View) directly without using a Command (Controller). 2009 Rivello Multimedia Consulting. All Rights Reserved.
  • 6. PureMVC: 10 Tips – 6 Through 10 6.  Use Commands / MacroCommands as often as possible •  Once code is in a command, simply send the appropriate noti cation from anywhere to repeat its execution. 7.  Use Remote Proxy to send and receive server-side data •  This is HUGE! If the server’s API changes, you will only have one area of your code to change. Very convenient encapsulation. 8.  Unregister unused Mediators 9.  The Power of VO’s (Value Objects) •  View Component has no access to the Model data directly. 10.  Practice, Practice, Practice •  Do a few demos from scratch to learn the basics •  Build time into your rst production project to learn-as-you-go! 2009 Rivello Multimedia Consulting. All Rights Reserved.
  • 7. PureMVC When to Use PureMVC (or a Framework in General) • When scalability and maintainability are more important than rapid execution • When the project feels more ‘application’-like (Many UI controls / Discrete business logic) than ‘game’-like • Medium to Large Projects (> 100 Man hours) • Team Projects ( > 2 Developers) • Long Term Projects (> v1.0 in discussion) My Opinion: Once expertly trained on PureMVC teams work faster with PureMVC than a custom solution. • Faster Architecture Stage • Faster Implementation (Debatable) • Faster Meetings / Discussions • Faster Development of Post-v1.0 Features (By Far) 2009 Rivello Multimedia Consulting. All Rights Reserved.
  • 8. PureMVC: Alternatives Flash Platform Frameworks • Cairngorm - http://opensource.adobe.com/wiki/display/cairngorm/Cairngorm • Mate - http://mate.asfusion.com/ • Swiz - http://code.google.com/p/swizframework/ • Others - ARP, MVCS, Flest, Model-Glue: Flex, ServerBox Foundry, Guasax, Slide, and many many more… • Comparison of Frameworks • http://puremvc.org/content/view/43/98/ • http://www.adobe.com/devnet/ ex/articles/ ex_framework.html 2009 Rivello Multimedia Consulting. All Rights Reserved.
  • 9. PureMVC: vs. Cairngorm: The Very Basics In Cairngorm, typically you: • De ne the ModelLocator class as a Singleton. • Add properties to it. • Fetch the ModelLocator Singleton at various places in the View by calling its getInstance method. • Bind to its properties. In PureMVC, you: • De ne proxies to hold the data • Register them with the Model, typically via the Facade • Retrieve the Proxies elsewhere with Commands or Mediators • Set the data on the View Components with Mediators 2009 Rivello Multimedia Consulting. All Rights Reserved.
  • 10. PureMVC: vs. Cairngorm: The Major Parts PureMVC Cairngorm Model Model View View Controller Controller Command Command Facade CairngormEvent Proxy Delegate Mediator Service Noti cation More Info: http://geekglue.blogspot.com/2007/10/cairngorm-vs-puremvc-quick-comparison.html Pros & Cons: http://robsondesign.com/demo/framework_comparison/ 2009 Rivello Multimedia Consulting. All Rights Reserved.
  • 11. PureMVC: Website PureMVC.org • Downloads • Documentation • Examples, Showcase, Forums, News • Plug-in Utilities • State Management • Startup App Loading Management • Much, Much More… 2009 Rivello Multimedia Consulting. All Rights Reserved.
  • 12. PureMVC: QA Any Questions on The Topics Covered? Section 1: De nition and Bene ts of PureMVC Section 2: PureMVC Applied • Adding PureMVC to your project • Using my PureMVCTemplate • Building “Your First Project” Section 3: Next Steps, QA, & Conclusion • 10 Tips for PureMVC • Comparison to Other Frameworks • References & Links 2009 Rivello Multimedia Consulting. All Rights Reserved.
  • 13. PureMVC: References & Thank you! SPEAKER • Samuel Asher Rivello| Principal, RivelloMultimediaConsulting.com (RMC) • RMC Services: Software Architecture, Consulting, Development, & Training • Specializes in PureMVC Architecture • Business Cards Available PureMVC on the EDGE! • Article Published: “An introduction to PureMVC for Adobe Flash and Flex” on Adobe’s EDGE newsletter a http://www.adobe.com/newsletters/edge/december2008/articles/article6/) REFERENCES SPECIAL THANKS!!! FULL DOCUMENTATION TO TODAYS TALK • Contact 360|Flex PUREMVC AUTHOR ARCHIVE OF TODAYS VIDEOS • Cliff Hall • Contact 360|Flex MY OTHER PRESENTATIONS • http://www.puremvc.org • See ‘Blog’ on RMC link above. (Post a Comment!) • Email & Contact – See Website PUREMVC • http://www.puremvc.org • ADOBE FLEX 3 • http://www.adobe.com/products/ ex/ 2009 Rivello Multimedia Consulting. All Rights Reserved.