SlideShare a Scribd company logo

Application Frameworks - The Good, The Bad & The Ugly

Richard Lord
Richard Lord
Richard LordCTO at Stick Sports Ltd.

These slides are from a presentation at Flex London User Group on 16 February 2010. With so many application frameworks available which should you choose? Cairngorm? PureMVC? Mate? Swiz? Parsley? Robotlegs? Or should you roll your own? Which frameworks require you to write the most code? Which provide the easiest refactoring? Which features make frameworks flexible and which make them brittle? Which make them easy to use and which make them hard? Richard presents an overview of how the different frameworks are architected and looks at their good and bad features. He looks at the core architecture of each, how they handle dependencies and events and the different philosophies that drive each forward. If you’'re interested in architecture, frameworks, or design patterns, this will be of interest to you. If you need to choose a framework for a project, or you want to know more about the framework you are using, this will be essential viewing.

Application Frameworks - The Good, The Bad & The Ugly

1 of 44
Flex London, Feb 2010



Application Frameworks
The Good, the Bad & the Ugly

          Richard Lord

         Technical Architect
             BrightTALK
         www.brighttalk.com
Application Frameworks

       Cairngorm
       PureMVC
         Mate
         Swiz
        Parsley
       RobotLegs
Coming Up
Model-View-Controller

Managing Dependencies

   Managing Events

 Presentation Patterns

What is Cairngorm 3?

Some measured opinion
Model-View-Controller

Model                View




        Controller
Managing Dependencies
                     Model
                                               View
         Model


Model
                                               View




                                               View




        Controller   Controller   Controller
Cairngorm uses global singletons
        Model Singleton
                                                    View
Model        Model        Model



                                                    View




                                                    View




           Controller     Controller   Controller

Recommended

Architectures in the compose world
Architectures in the compose worldArchitectures in the compose world
Architectures in the compose worldFabio Collini
 
Windows Store app using XAML and C#: Enterprise Product Development
Windows Store app using XAML and C#: Enterprise Product Development Windows Store app using XAML and C#: Enterprise Product Development
Windows Store app using XAML and C#: Enterprise Product Development Mahmoud Hamed Mahmoud
 
Android Bootcamp Tanzania: android manifest
Android Bootcamp Tanzania: android manifestAndroid Bootcamp Tanzania: android manifest
Android Bootcamp Tanzania: android manifestDenis Minja
 
Using hilt in a modularized project
Using hilt in a modularized projectUsing hilt in a modularized project
Using hilt in a modularized projectFabio Collini
 
Inversion of Control and Dependency Injection
Inversion of Control and Dependency InjectionInversion of Control and Dependency Injection
Inversion of Control and Dependency InjectionDinesh Sharma
 
Events and Listeners in Android
Events and Listeners in AndroidEvents and Listeners in Android
Events and Listeners in Androidma-polimi
 
Introduction to Google Guice
Introduction to Google GuiceIntroduction to Google Guice
Introduction to Google GuiceKnoldus Inc.
 
Mobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on Android
Mobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on AndroidMobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on Android
Mobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on AndroidAlberto Ruibal
 

More Related Content

What's hot

Vaadin 7 CN
Vaadin 7 CNVaadin 7 CN
Vaadin 7 CNjojule
 
Google Plus SignIn : l'Authentification Google
Google Plus SignIn : l'Authentification GoogleGoogle Plus SignIn : l'Authentification Google
Google Plus SignIn : l'Authentification GoogleMathias Seguy
 
Jug Guice Presentation
Jug Guice PresentationJug Guice Presentation
Jug Guice PresentationDmitry Buzdin
 
Dependency injection - the right way
Dependency injection - the right wayDependency injection - the right way
Dependency injection - the right wayThibaud Desodt
 
iOS Automation: XCUITest + Gherkin
iOS Automation: XCUITest + GherkiniOS Automation: XCUITest + Gherkin
iOS Automation: XCUITest + GherkinKenneth Poon
 
Why SOLID matters - even for JavaScript
Why SOLID matters - even for JavaScriptWhy SOLID matters - even for JavaScript
Why SOLID matters - even for JavaScriptmartinlippert
 
Laporan multi client
Laporan multi clientLaporan multi client
Laporan multi clientichsanbarokah
 
iOS Contact List Application Tutorial
iOS Contact List Application TutorialiOS Contact List Application Tutorial
iOS Contact List Application TutorialIshara Amarasekera
 
Client-side JavaScript
Client-side JavaScriptClient-side JavaScript
Client-side JavaScriptLilia Sfaxi
 
softshake 2014 - Java EE
softshake 2014 - Java EEsoftshake 2014 - Java EE
softshake 2014 - Java EEAlexis Hassler
 
Unit Test 最後一哩路
Unit Test 最後一哩路Unit Test 最後一哩路
Unit Test 最後一哩路Hokila Jan
 
iOS UI Testing in Xcode
iOS UI Testing in XcodeiOS UI Testing in Xcode
iOS UI Testing in XcodeJz Chang
 
Cut your Dependencies with Dependency Injection for East Bay.NET User Group
Cut your Dependencies with Dependency Injection for East Bay.NET User Group Cut your Dependencies with Dependency Injection for East Bay.NET User Group
Cut your Dependencies with Dependency Injection for East Bay.NET User Group Theo Jungeblut
 

What's hot (20)

Vaadin 7 CN
Vaadin 7 CNVaadin 7 CN
Vaadin 7 CN
 
Google Plus SignIn : l'Authentification Google
Google Plus SignIn : l'Authentification GoogleGoogle Plus SignIn : l'Authentification Google
Google Plus SignIn : l'Authentification Google
 
Jug Guice Presentation
Jug Guice PresentationJug Guice Presentation
Jug Guice Presentation
 
Lab1-android
Lab1-androidLab1-android
Lab1-android
 
Dependency injection - the right way
Dependency injection - the right wayDependency injection - the right way
Dependency injection - the right way
 
iOS Automation: XCUITest + Gherkin
iOS Automation: XCUITest + GherkiniOS Automation: XCUITest + Gherkin
iOS Automation: XCUITest + Gherkin
 
Why SOLID matters - even for JavaScript
Why SOLID matters - even for JavaScriptWhy SOLID matters - even for JavaScript
Why SOLID matters - even for JavaScript
 
Laporan multi client
Laporan multi clientLaporan multi client
Laporan multi client
 
Android 3
Android 3Android 3
Android 3
 
iOS Contact List Application Tutorial
iOS Contact List Application TutorialiOS Contact List Application Tutorial
iOS Contact List Application Tutorial
 
Google Guice
Google GuiceGoogle Guice
Google Guice
 
Client-side JavaScript
Client-side JavaScriptClient-side JavaScript
Client-side JavaScript
 
French kit2019
French kit2019French kit2019
French kit2019
 
softshake 2014 - Java EE
softshake 2014 - Java EEsoftshake 2014 - Java EE
softshake 2014 - Java EE
 
Unit Test 最後一哩路
Unit Test 最後一哩路Unit Test 最後一哩路
Unit Test 最後一哩路
 
Android UI Fundamentals part 1
Android UI Fundamentals part 1Android UI Fundamentals part 1
Android UI Fundamentals part 1
 
Deployment
DeploymentDeployment
Deployment
 
Android Basic Components
Android Basic ComponentsAndroid Basic Components
Android Basic Components
 
iOS UI Testing in Xcode
iOS UI Testing in XcodeiOS UI Testing in Xcode
iOS UI Testing in Xcode
 
Cut your Dependencies with Dependency Injection for East Bay.NET User Group
Cut your Dependencies with Dependency Injection for East Bay.NET User Group Cut your Dependencies with Dependency Injection for East Bay.NET User Group
Cut your Dependencies with Dependency Injection for East Bay.NET User Group
 

Similar to Application Frameworks - The Good, The Bad & The Ugly

Architecting ActionScript 3 applications using PureMVC
Architecting ActionScript 3 applications using PureMVCArchitecting ActionScript 3 applications using PureMVC
Architecting ActionScript 3 applications using PureMVCmarcocasario
 
Displaying additional image types in XMetaL
Displaying additional image types in XMetaLDisplaying additional image types in XMetaL
Displaying additional image types in XMetaLXMetaL
 
Developing ASP.NET Applications Using the Model View Controller Pattern
Developing ASP.NET Applications Using the Model View Controller PatternDeveloping ASP.NET Applications Using the Model View Controller Pattern
Developing ASP.NET Applications Using the Model View Controller Patterngoodfriday
 
Riacon swiz
Riacon swizRiacon swiz
Riacon swizntunney
 
#win8aca : How and when metro style apps run
#win8aca : How and when metro style apps run#win8aca : How and when metro style apps run
#win8aca : How and when metro style apps runFrederik De Bruyne
 
Java Web Programming [8/9] : JSF and AJAX
Java Web Programming [8/9] : JSF and AJAXJava Web Programming [8/9] : JSF and AJAX
Java Web Programming [8/9] : JSF and AJAXIMC Institute
 
Controllers & actions
Controllers & actionsControllers & actions
Controllers & actionsEyal Vardi
 
Will your code blend? : Toronto Code Camp 2010 : Barry Gervin
Will your code blend? : Toronto Code Camp 2010 : Barry GervinWill your code blend? : Toronto Code Camp 2010 : Barry Gervin
Will your code blend? : Toronto Code Camp 2010 : Barry GervinBarry Gervin
 
Integrating Security Roles into Microsoft Silverlight Applications
Integrating Security Roles into Microsoft Silverlight ApplicationsIntegrating Security Roles into Microsoft Silverlight Applications
Integrating Security Roles into Microsoft Silverlight ApplicationsDan Wahlin
 
Command Query Responsibility Segregation and Event Sourcing
Command Query Responsibility Segregation and Event SourcingCommand Query Responsibility Segregation and Event Sourcing
Command Query Responsibility Segregation and Event SourcingMitinPavel
 
Parsley & Flex
Parsley & FlexParsley & Flex
Parsley & Flexprideconan
 
Inversion Of Control
Inversion Of ControlInversion Of Control
Inversion Of ControlChad Hietala
 
Behavioral pattern 4
Behavioral pattern 4Behavioral pattern 4
Behavioral pattern 4Naga Muruga
 
Dependency Injection for Android @ Ciklum speakers corner Kiev 29. May 2014
Dependency Injection for Android @ Ciklum speakers corner Kiev 29. May 2014Dependency Injection for Android @ Ciklum speakers corner Kiev 29. May 2014
Dependency Injection for Android @ Ciklum speakers corner Kiev 29. May 2014First Tuesday Bergen
 
iPhoneOS3.1でのカメラAPIについて
iPhoneOS3.1でのカメラAPIについてiPhoneOS3.1でのカメラAPIについて
iPhoneOS3.1でのカメラAPIについてKyosuke Takayama
 

Similar to Application Frameworks - The Good, The Bad & The Ugly (20)

Architecting ActionScript 3 applications using PureMVC
Architecting ActionScript 3 applications using PureMVCArchitecting ActionScript 3 applications using PureMVC
Architecting ActionScript 3 applications using PureMVC
 
Displaying additional image types in XMetaL
Displaying additional image types in XMetaLDisplaying additional image types in XMetaL
Displaying additional image types in XMetaL
 
Developing ASP.NET Applications Using the Model View Controller Pattern
Developing ASP.NET Applications Using the Model View Controller PatternDeveloping ASP.NET Applications Using the Model View Controller Pattern
Developing ASP.NET Applications Using the Model View Controller Pattern
 
Riacon swiz
Riacon swizRiacon swiz
Riacon swiz
 
#win8aca : How and when metro style apps run
#win8aca : How and when metro style apps run#win8aca : How and when metro style apps run
#win8aca : How and when metro style apps run
 
Java Web Programming [8/9] : JSF and AJAX
Java Web Programming [8/9] : JSF and AJAXJava Web Programming [8/9] : JSF and AJAX
Java Web Programming [8/9] : JSF and AJAX
 
Controllers & actions
Controllers & actionsControllers & actions
Controllers & actions
 
Will your code blend? : Toronto Code Camp 2010 : Barry Gervin
Will your code blend? : Toronto Code Camp 2010 : Barry GervinWill your code blend? : Toronto Code Camp 2010 : Barry Gervin
Will your code blend? : Toronto Code Camp 2010 : Barry Gervin
 
Integrating Security Roles into Microsoft Silverlight Applications
Integrating Security Roles into Microsoft Silverlight ApplicationsIntegrating Security Roles into Microsoft Silverlight Applications
Integrating Security Roles into Microsoft Silverlight Applications
 
Command Query Responsibility Segregation and Event Sourcing
Command Query Responsibility Segregation and Event SourcingCommand Query Responsibility Segregation and Event Sourcing
Command Query Responsibility Segregation and Event Sourcing
 
Parsley & Flex
Parsley & FlexParsley & Flex
Parsley & Flex
 
Asp.Net Control Architecture
Asp.Net Control ArchitectureAsp.Net Control Architecture
Asp.Net Control Architecture
 
Inversion Of Control
Inversion Of ControlInversion Of Control
Inversion Of Control
 
From mvc to viper
From mvc to viperFrom mvc to viper
From mvc to viper
 
Behavioral pattern 4
Behavioral pattern 4Behavioral pattern 4
Behavioral pattern 4
 
Dependency Injection for Android
Dependency Injection for AndroidDependency Injection for Android
Dependency Injection for Android
 
Dependency Injection for Android @ Ciklum speakers corner Kiev 29. May 2014
Dependency Injection for Android @ Ciklum speakers corner Kiev 29. May 2014Dependency Injection for Android @ Ciklum speakers corner Kiev 29. May 2014
Dependency Injection for Android @ Ciklum speakers corner Kiev 29. May 2014
 
Provider vs BLoC vs Redux
Provider vs BLoC vs ReduxProvider vs BLoC vs Redux
Provider vs BLoC vs Redux
 
ASP .net MVC
ASP .net MVCASP .net MVC
ASP .net MVC
 
iPhoneOS3.1でのカメラAPIについて
iPhoneOS3.1でのカメラAPIについてiPhoneOS3.1でのカメラAPIについて
iPhoneOS3.1でのカメラAPIについて
 

Recently uploaded

OTel Orientation_ How to Train Teams (OTel in Practice).pdf
OTel Orientation_ How to Train Teams (OTel in Practice).pdfOTel Orientation_ How to Train Teams (OTel in Practice).pdf
OTel Orientation_ How to Train Teams (OTel in Practice).pdfPaige Cruz
 
Heltun_HE-RS01_User_Manual_B9AH.pdf
Heltun_HE-RS01_User_Manual_B9AH.pdfHeltun_HE-RS01_User_Manual_B9AH.pdf
Heltun_HE-RS01_User_Manual_B9AH.pdfMarielaL5
 
Bit N Build Poland
Bit N Build PolandBit N Build Poland
Bit N Build PolandGDSC PJATK
 
My self introduction to know others abut me
My self  introduction to know others abut meMy self  introduction to know others abut me
My self introduction to know others abut meManoj Prabakar B
 
Journey of Television in World & in India
Journey of Television in World & in IndiaJourney of Television in World & in India
Journey of Television in World & in IndiaAdarshAgarwal66
 
Enhancing SaaS Performance: A Hands-on Workshop for Partners
Enhancing SaaS Performance: A Hands-on Workshop for PartnersEnhancing SaaS Performance: A Hands-on Workshop for Partners
Enhancing SaaS Performance: A Hands-on Workshop for PartnersThousandEyes
 
H3 Platform CXL Solution_Memory Fabric Forum.pptx
H3 Platform CXL Solution_Memory Fabric Forum.pptxH3 Platform CXL Solution_Memory Fabric Forum.pptx
H3 Platform CXL Solution_Memory Fabric Forum.pptxMemory Fabric Forum
 
Azure Migration Guide for IT Professionals
Azure Migration Guide for IT ProfessionalsAzure Migration Guide for IT Professionals
Azure Migration Guide for IT ProfessionalsChristine Shepherd
 
My sample product research idea for you!
My sample product research idea for you!My sample product research idea for you!
My sample product research idea for you!KivenRaySarsaba
 
Evolution of Chatbots: From Custom AI Chatbots and AI Chatbots for Websites.pptx
Evolution of Chatbots: From Custom AI Chatbots and AI Chatbots for Websites.pptxEvolution of Chatbots: From Custom AI Chatbots and AI Chatbots for Websites.pptx
Evolution of Chatbots: From Custom AI Chatbots and AI Chatbots for Websites.pptxKyle Willson
 
Navigating the Never Normal Strategies for Portfolio Leaders
Navigating the Never Normal Strategies for Portfolio LeadersNavigating the Never Normal Strategies for Portfolio Leaders
Navigating the Never Normal Strategies for Portfolio LeadersOnePlan Solutions
 
21ST CENTURY LITERACY FROM TRADITIONAL TO MODERN
21ST CENTURY LITERACY FROM TRADITIONAL TO MODERN21ST CENTURY LITERACY FROM TRADITIONAL TO MODERN
21ST CENTURY LITERACY FROM TRADITIONAL TO MODERNRonnelBaroc
 
Breaking Barriers & Leveraging the Latest Developments in AI Technology
Breaking Barriers & Leveraging the Latest Developments in AI TechnologyBreaking Barriers & Leveraging the Latest Developments in AI Technology
Breaking Barriers & Leveraging the Latest Developments in AI TechnologySafe Software
 
5 Things You Shouldn’t Do at Salesforce World Tour Sydney 2024!
5 Things You Shouldn’t Do at Salesforce World Tour Sydney 2024!5 Things You Shouldn’t Do at Salesforce World Tour Sydney 2024!
5 Things You Shouldn’t Do at Salesforce World Tour Sydney 2024!XfilesPro
 
Introduction to Serverless with AWS Lambda in C#.pptx
Introduction to Serverless with AWS Lambda in C#.pptxIntroduction to Serverless with AWS Lambda in C#.pptx
Introduction to Serverless with AWS Lambda in C#.pptxBrandon Minnick, MBA
 
Quinto Z-Wave Heltun_HE-RS01_User_Manual_B9AH.pdf
Quinto Z-Wave Heltun_HE-RS01_User_Manual_B9AH.pdfQuinto Z-Wave Heltun_HE-RS01_User_Manual_B9AH.pdf
Quinto Z-Wave Heltun_HE-RS01_User_Manual_B9AH.pdfDomotica daVinci
 
DNA LIGASE BIOTECHNOLOGY BIOLOGY STUDY OF LIFE
DNA LIGASE BIOTECHNOLOGY BIOLOGY STUDY OF LIFEDNA LIGASE BIOTECHNOLOGY BIOLOGY STUDY OF LIFE
DNA LIGASE BIOTECHNOLOGY BIOLOGY STUDY OF LIFEandreiandasan
 
Q1 Memory Fabric Forum: SMART CXL Product Lineup
Q1 Memory Fabric Forum: SMART CXL Product LineupQ1 Memory Fabric Forum: SMART CXL Product Lineup
Q1 Memory Fabric Forum: SMART CXL Product LineupMemory Fabric Forum
 
Manual sensor Zigbee 3.0 MOES ZSS-X-PIRL-C
Manual  sensor Zigbee 3.0 MOES ZSS-X-PIRL-CManual  sensor Zigbee 3.0 MOES ZSS-X-PIRL-C
Manual sensor Zigbee 3.0 MOES ZSS-X-PIRL-CDomotica daVinci
 
AWS reInvent 2023 recaps from Chicago AWS user group
AWS reInvent 2023 recaps from Chicago AWS user groupAWS reInvent 2023 recaps from Chicago AWS user group
AWS reInvent 2023 recaps from Chicago AWS user groupAWS Chicago
 

Recently uploaded (20)

OTel Orientation_ How to Train Teams (OTel in Practice).pdf
OTel Orientation_ How to Train Teams (OTel in Practice).pdfOTel Orientation_ How to Train Teams (OTel in Practice).pdf
OTel Orientation_ How to Train Teams (OTel in Practice).pdf
 
Heltun_HE-RS01_User_Manual_B9AH.pdf
Heltun_HE-RS01_User_Manual_B9AH.pdfHeltun_HE-RS01_User_Manual_B9AH.pdf
Heltun_HE-RS01_User_Manual_B9AH.pdf
 
Bit N Build Poland
Bit N Build PolandBit N Build Poland
Bit N Build Poland
 
My self introduction to know others abut me
My self  introduction to know others abut meMy self  introduction to know others abut me
My self introduction to know others abut me
 
Journey of Television in World & in India
Journey of Television in World & in IndiaJourney of Television in World & in India
Journey of Television in World & in India
 
Enhancing SaaS Performance: A Hands-on Workshop for Partners
Enhancing SaaS Performance: A Hands-on Workshop for PartnersEnhancing SaaS Performance: A Hands-on Workshop for Partners
Enhancing SaaS Performance: A Hands-on Workshop for Partners
 
H3 Platform CXL Solution_Memory Fabric Forum.pptx
H3 Platform CXL Solution_Memory Fabric Forum.pptxH3 Platform CXL Solution_Memory Fabric Forum.pptx
H3 Platform CXL Solution_Memory Fabric Forum.pptx
 
Azure Migration Guide for IT Professionals
Azure Migration Guide for IT ProfessionalsAzure Migration Guide for IT Professionals
Azure Migration Guide for IT Professionals
 
My sample product research idea for you!
My sample product research idea for you!My sample product research idea for you!
My sample product research idea for you!
 
Evolution of Chatbots: From Custom AI Chatbots and AI Chatbots for Websites.pptx
Evolution of Chatbots: From Custom AI Chatbots and AI Chatbots for Websites.pptxEvolution of Chatbots: From Custom AI Chatbots and AI Chatbots for Websites.pptx
Evolution of Chatbots: From Custom AI Chatbots and AI Chatbots for Websites.pptx
 
Navigating the Never Normal Strategies for Portfolio Leaders
Navigating the Never Normal Strategies for Portfolio LeadersNavigating the Never Normal Strategies for Portfolio Leaders
Navigating the Never Normal Strategies for Portfolio Leaders
 
21ST CENTURY LITERACY FROM TRADITIONAL TO MODERN
21ST CENTURY LITERACY FROM TRADITIONAL TO MODERN21ST CENTURY LITERACY FROM TRADITIONAL TO MODERN
21ST CENTURY LITERACY FROM TRADITIONAL TO MODERN
 
Breaking Barriers & Leveraging the Latest Developments in AI Technology
Breaking Barriers & Leveraging the Latest Developments in AI TechnologyBreaking Barriers & Leveraging the Latest Developments in AI Technology
Breaking Barriers & Leveraging the Latest Developments in AI Technology
 
5 Things You Shouldn’t Do at Salesforce World Tour Sydney 2024!
5 Things You Shouldn’t Do at Salesforce World Tour Sydney 2024!5 Things You Shouldn’t Do at Salesforce World Tour Sydney 2024!
5 Things You Shouldn’t Do at Salesforce World Tour Sydney 2024!
 
Introduction to Serverless with AWS Lambda in C#.pptx
Introduction to Serverless with AWS Lambda in C#.pptxIntroduction to Serverless with AWS Lambda in C#.pptx
Introduction to Serverless with AWS Lambda in C#.pptx
 
Quinto Z-Wave Heltun_HE-RS01_User_Manual_B9AH.pdf
Quinto Z-Wave Heltun_HE-RS01_User_Manual_B9AH.pdfQuinto Z-Wave Heltun_HE-RS01_User_Manual_B9AH.pdf
Quinto Z-Wave Heltun_HE-RS01_User_Manual_B9AH.pdf
 
DNA LIGASE BIOTECHNOLOGY BIOLOGY STUDY OF LIFE
DNA LIGASE BIOTECHNOLOGY BIOLOGY STUDY OF LIFEDNA LIGASE BIOTECHNOLOGY BIOLOGY STUDY OF LIFE
DNA LIGASE BIOTECHNOLOGY BIOLOGY STUDY OF LIFE
 
Q1 Memory Fabric Forum: SMART CXL Product Lineup
Q1 Memory Fabric Forum: SMART CXL Product LineupQ1 Memory Fabric Forum: SMART CXL Product Lineup
Q1 Memory Fabric Forum: SMART CXL Product Lineup
 
Manual sensor Zigbee 3.0 MOES ZSS-X-PIRL-C
Manual  sensor Zigbee 3.0 MOES ZSS-X-PIRL-CManual  sensor Zigbee 3.0 MOES ZSS-X-PIRL-C
Manual sensor Zigbee 3.0 MOES ZSS-X-PIRL-C
 
AWS reInvent 2023 recaps from Chicago AWS user group
AWS reInvent 2023 recaps from Chicago AWS user groupAWS reInvent 2023 recaps from Chicago AWS user group
AWS reInvent 2023 recaps from Chicago AWS user group
 

Application Frameworks - The Good, The Bad & The Ugly

  • 1. Flex London, Feb 2010 Application Frameworks The Good, the Bad & the Ugly Richard Lord Technical Architect BrightTALK www.brighttalk.com
  • 2. Application Frameworks Cairngorm PureMVC Mate Swiz Parsley RobotLegs
  • 3. Coming Up Model-View-Controller Managing Dependencies Managing Events Presentation Patterns What is Cairngorm 3? Some measured opinion
  • 4. Model-View-Controller Model View Controller
  • 5. Managing Dependencies Model View Model Model View View Controller Controller Controller
  • 6. Cairngorm uses global singletons Model Singleton View Model Model Model View View Controller Controller Controller
  • 7. Cairngorm uses a Singleton Model is a Singleton class ModelLocator implements IModelLocator { public static function getInstance():ModelLocator { ... } [Bindable] public var user:User; } View / Controller access that Singleton var user:User = ModelLocator.getInstance().user;
  • 8. PureMVC uses a registry Model View Model Model View Model Registry View Controller Controller Controller
  • 9. Accessing the model in Pure MVC Model is a registry of proxies class UserProxy extends Proxy implements IProxy { public function get user():User { ... } Add object to registry } facade.registerProxy( new UserProxy() ); View / Controller fetch proxies from the registry var userProxy:UserProxy = facade.retrieveProxy( "UserProxy" ) as UserProxy; var user:User = userProxy.user; Fetch object from registry
  • 10. Others use dependency injection Model View Model Model Dependency View Injection Container View Controller Controller Controller
  • 11. Accessing the model in Mate Injection rules are defined in EventMaps <mx:Script> modelManager = new ModelManager(); modelManager.user = new User(); The Model is one or </mx:Script> more regular objects <Injectors target="{ProfileView}"> <PropertyInjector source="{ModelManager}" sourceKey="user" targetKey="user"/> </Injectors> Define injection rules Properties are injected into the view public class ProfileView { public var user:User; This will be set by //... } the DI container
  • 12. Accessing the model in Swiz Injection rules are defined in BeanLoaders <BeanLoader> <User id="user"/> </BeanLoader> Regular object defined in MXML BeanLoaders are instatiated in your application <SwizConfig beanLoaders="{[MyBeans]}"> Objects specify their requirements [Autowire] public var user:User; And injected into other objects
  • 13. Accessing the model in RobotLegs Injection rules are defined in a context class MyAppContext { override public function startup():void { injector.mapSingleton( User ); } Injection rules are } defined in the context Context is instatiated in your application <MyAppContext contextView="{this}"> Objects specify their requirements [Inject] public var user:User; And injected into other objects
  • 14. Accessing the model in Parsley Injection rules are defined in a configuration object <mx:Object> <User id="user"/> Model objects </mx:Object> are created in a config object Configuration object is instatiated in your application <ContextBuilder config="{MyAppConfig}"> Objects specify their requirements [Inject] public var user:User; And injected into other objects
  • 15. Managing Dependencies Singleton Registry Dependency Injection
  • 16. Handling Events Model View Controller
  • 17. Event Bus View View View Event Bus Controller Controller Controller
  • 18. Using a single event dispatcher View View View Event Dispatcher Controller Controller Controller
  • 19. Using a single event dispatcher View var loginEvent:LoginEvent = new LoginEvent(LoginEvent.LOGIN); loginEvent.username = username.text; loginEvent.password = password.text; singleEventDispatcher.dispatchEvent( loginEvent ); Controller singleEventDispatcher.addEventListener( LoginEvent.LOGIN, loginHandler )
  • 20. View-Controller in Cairngorm extends CairngormEvent View var loginEvent:LoginEvent = new LoginEvent( LoginEvent.LOGIN ); loginEvent.username = username.text; loginEvent.password = password.text; loginEvent.dispatchEvent(); Front Controller addCommand( LoginEvent.LOGIN, LoginCommand ); Command public class LoginCommand extends Command { public function execute( event:Event ):void { var loginEvent:LoginEvent = event as LoginEvent; ... } }
  • 21. View-Controller in Pure MVC View Notifications are var loginData:LoginData = new LoginData(); like Events loginData.username = username.text; loginData.password = password.text; sendNotification( NotificationNames.LOGIN, loginData ); Controller registerCommand( NotificationNames.LOGIN, LoginCommand ); Command public class LoginCommand extends SimpleCommand { public function execute( note:INotification ):void { var loginData: LoginData = note.getBody() as LoginData; ... } }
  • 22. View-Controller in RobotLegs View var loginEvent:LoginEvent = new LoginEvent(LoginEvent.LOGIN); loginEvent.username = username.text; loginEvent.password = password.text; Reference to eventDispatcher.dispatchEvent( loginEvent ); central dispatcher is injected Context commandMap.mapEvent( LoginCommand, LoginEvent.LOGIN ); Command public class LoginCommand extends Command { [Inject] public var event:LoginEvent; public function execute():void { ... } }
  • 23. View-Controller in Parsley Central dispatcher will View redispatch this event [Event(name="login",type="LoginEvent")] [ManagedEvents("login")] var loginEvent:LoginEvent = new LoginEvent(LoginEvent.LOGIN); loginEvent.username = username.text; loginEvent.password = password.text; dispatchEvent( loginEvent ); Configuration <DynamicCommand type="" selector="login"/> Command public class LoginCommand { public function execute( event:LoginEvent ):void { ... } }
  • 24. View-Controller in Parsley II Central dispatcher will View redispatch this event [Event(name="login",type="LoginEvent")] [ManagedEvents("login")] var loginEvent:LoginEvent = new LoginEvent(LoginEvent.LOGIN); loginEvent.username = username.text; loginEvent.password = password.text; dispatchEvent( loginEvent ); The method Controller handles this event [MessageHandler(selector="login")] public function loginHandler( event:LoginEvent ):void { ... }
  • 25. Using the display list Add listeners here System Manager Application Pop-up Display Object Display Object Module Display Object Display Object Display Object Display Object Display Object Display Object
  • 26. View-Controller in Swiz View var loginEvent:LoginEvent = new LoginEvent(LoginEvent.LOGIN, true); loginEvent.username = username.text; loginEvent.password = password.text; dispatchEvent( loginEvent ); Bubbling Event Controller [Mediate(event="LoginEvent.LOGIN")] public function loginHandler( event:LoginEvent ):void { ... }
  • 27. View-Controller in Mate View var loginEvent:LoginEvent = new LoginEvent(LoginEvent.LOGIN, true); loginEvent.username = username.text; loginEvent.password = password.text; dispatchEvent( loginEvent ); Bubbling Event Event Map <EventHandlers type="{LoginEvent.LOGIN}"> ... </EventHandlers>
  • 28. Mate has local event maps Main event map System Manager Application Pop-up Display Object Display Object Module Local event map Display Object Display Object Display Object Display Object Display Object Display Object
  • 29. Event Bus Single Event Dispatcher (may have multiple with access method) Display List (may use localised event handling)
  • 30. Presentation Patterns View View Model logic display Controller
  • 31. Code Behind View Display <LoginCanvas> <VBox> <TextInput id="username"/> <TextInput id="password"/> <Button click="sendLogin( username.text, password.text )"/> </VBox> </LoginCanvas> View Logic class LoginCanvas extends Canvas { public function sendLogin( username, password ) { .... } }
  • 32. Presentation Model View Display <Canvas> <LoginPresentationModel id="pm"/> <VBox> <TextInput id="username"/> <TextInput id="password"/> <Button click="pm.sendLogin( username.text, password.text )"/> </VBox> </Canvas> View Logic class LoginPresentationModel { public function sendLogin( username, password ) { .... } }
  • 33. Supervising Controller View Display <Canvas> <VBox> <TextInput id="username"/> <TextInput id="password"/> <Button click="dispatchEvent( new LoginEvent( LoginEvent.LOGIN, username.text, password.text ) )"/> </VBox> </Canvas> View Logic class LoginController { public function LoginController( display:LoginDisplay ) { display.addEventListener( LoginEvent.LOGIN, sendLogin ); } private function sendLogin( event:LoginEvent ) { .... } }
  • 34. Passive View View Display <Canvas> <VBox> <TextInput id="username"/> <TextInput id="password"/> <Button id="loginBtn"/> </VBox> </Canvas> View Logic class LoginController { public function LoginController( display:LoginDisplay ) { display.loginBtn.addEventListener( MouseEvent.click, sendLogin ); } private function sendLogin( event:MouseEvent ) { .... } }
  • 35. Presentation Patterns Code Behind Presentation Model Supervising Controller Passive View PureMVC & Robotlegs Mediators
  • 36. Setting up the mediator Pure MVC facade.registerMediator( new LoginMediator( loginView ) ); Logic Display RobotLegs mediatorMap.mapView( LoginView, LoginMediator ); Display Logic
  • 37. So what is Cairngorm 3? Cairngorm 3 == Parsley 2.2
  • 38. Summary and Opinion Cairngorm PureMVC Mate Swiz Parsley RobotLegs
  • 39. Framework or Toolkit MVC Framework Toolkit Cairngorm Swiz PureMVC Parsley Mate RobotLegs
  • 40. Platforms Flash & Flex Flex only PureMVC Cairngorm Parsley Mate RobotLegs Swiz
  • 41. Modular features Yes No PureMVC (multicore) Cairngorm Mate PureMVC (standard) Parsley RobotLegs Swiz
  • 42. Community involvement Corporate Community Cairngorm Robotlegs Parsley Swiz Mate PureMVC
  • 43. History and evolution Generation 1.0 Cairngorm Out of date PureMVC Generation 1.5 Mature Mate Swiz Generation 2.0 Parsley Cutting edge RobotLegs
  • 44. This is me www.richardlord.net twitter.com/Richard_Lord