SlideShare a Scribd company logo
1 of 34
gotoAndSki(), June 2010




  Application Frameworks
     The new kids on the block


Richard Lord                  twitter.com/Richard_Lord
Technical Architect                www.richardlord.net
BrightTALK                          www.brighttalk.com
Application Frameworks


      Robotlegs (1.0)
         Swiz (1.0)
        Parsley (2.2)
  Spring Actionscript (1.0)
History and evolution
Generation 1.0   Cairngorm       Out of date


                 PureMVC
Generation 1.5                     Mature
                   Mate

                   Swiz
                  Parsley
Generation 2.0               Entering their prime
                 Robotlegs
                 Spring AS
Coming Up

     Similarities

Dependency Injection

     Event Bus

    Differences

    Conclusions
They are very similar

• Open-source.
• May be used with the Flex Framework, Pure AS,
  or Flash CS.
• Non-prescriptive about your architecture.
 •   MVC is optional.

• Provide a dependency injection container.
• Provide an event bus.
Dependency Injection
Dependency Injection
How objects obtain references to each other
Not dependency injection
New         class Controller {
              private var _model:Model;
              public function Controller() {
                _model = new Model();
              }
            }
Singleton   class Controller {
              private var _model:Model;
              public function Controller() {
                _model = Model.getInstance();
              }
            }
Registry    class Controller {
              private var _model:Model;
              public function Controller() {
                _model = Registry.get( Model );
              }
            }
Factory     class Controller {
              private var _model:Model;
              public function Controller() {
                _model = Factory.create( Model );
              }
            }
Dependency injection

Constructor    class Controller {
Injection        private var _model:Model;
                 public function Controller( model:Model ) {
                   _model = model;
                 }
               }


Setter         class Controller {
Injection        private var _model:Model;
                 public function set model( value:Model ) {
                   _model = value;
                 }
               }
Dependency injection container

• The DI Container is an object for managing
  these dependencies.
• The DI Container is configured to inject the
  correct objects into the correct classes.
• We may ask the DI Container to create our
  objects.
• Or we may ask it to inject objects that are
  created by some other means.
Dependency injection container


Model
                1. Create
                                              2. Create
                                 DI                         Controller
                              Container
                                          3. Inject Model


                      4. Inject Model
           View
        (created by
           Flex)
Configure DI with XML
Spring Actionscript
  <objects>
   <object class="package.Model" id="model"/>
   <object class="package.Controller" scope="prototype">
    <property name="model" ref="model"/>
   </object>
   <object class="package.View" id="view" singleton="false">
    <property name="model" ref="model"/>
   </object>
  </objects>




                         Supported by
  Robotlegs                           Parsley         Spring AS
Configure DI with MXML
Parsley
  <Objects>
   <Model id="model"/>
   <Object type="{Controller}" singleton="false">
    <Property name="model" value="{model}"/>
   </Object>
   <View type="{View}">
    <Property name="model" value="{model}"/>
   </View>
  </Objects>

Swiz
  <BeanProvider>
   <Model id="model"/>
   <Prototype type="{Controller}" id="controller"
    constructor-arguments="{model}"/>
  </BeanProvider>        Supported by
                       Swiz             Parsley     Spring AS
Configure DI with actionscript
Robotlegs
  class MyAppContext extends Context {
    override public function startup():void {
      injector.mapSingleton( Model );
      injector.mapClass( Controller );
    }
  }

Swiz
  class MyAppContext {
    public function startup():void {
      var model:Model = new Model();
      var proto:Prototype = new Prototype( Controller );
      proto.constructorArguments = model;
      bp = new BeanProvider( [ model, proto ] );
    }
  }
                            Supported by
  Robotlegs             Swiz              Parsley
Configure injections with metadata
Robotlegs, Swiz & Parsley
  class View {
    [Inject]
    public function set model( value:Model ) {
      _model = value;
    }
  }

Spring Actionscript
  class View {
    [Autowired]
    public function set model( value:Model ) {
      _model = value;
    }
  }
                           Supported by
  Robotlegs             Swiz             Parsley   Spring AS
Injecting into view components
Use Annotations


                     Supported by
 Robotlegs        Swiz         Parsley   Spring AS



Use Configuration


                     Supported by
                               Parsley   Spring AS
The Event Bus
Event Bus
                            dispatch   dispatch   dispatch
                             event      event      event




                          Event Bus




listen for   listen for   listen for
   event        event        event
Using a single event dispatcher
                             dispatch   dispatch   dispatch
                              event      event      event




                             Event
                           Dispatcher




 listen for   listen for   listen for
    event        event        event
Using a single event dispatcher

                        Dispatcher

      var event:Event = new
      Event( EventNames.CUSTOM );
      eventBus.dispatchEvent( event );



                          Listener

eventBus.addEventListener( EventNames.CUSTOM, eventHandler );
Implementations
Inject the event bus
Robotlegs
  [Inject]
  public var eventBus:EventDispatcher;

  var event:Event = new Event( EventNames.CUSTOM );
  eventBus.dispatchEvent( event );


Swiz
  [Dispatcher]
  public var eventBus:EventDispatcher;

  var event:Event = new Event( EventNames.CUSTOM );
  eventBus.dispatchEvent( event );

                          Supported by
  Robotlegs            Swiz              Parsley
Inject the event bus
Robotlegs
  [Inject]
  public var eventBus:EventDispatcher;

  eventBus.addEventListener( EventNames.CUSTOM, eventHandler );



Swiz
  [Dispatcher]
  public var eventBus:EventDispatcher;

  eventBus.addEventListener( EventNames.CUSTOM, eventHandler );


                          Supported by
  Robotlegs            Swiz              Parsley
Use metadata to indicate bus events
Parsley
  [Event(name="custom",type="Event")]
  [ManagedEvents("custom")]

  var event:Event = new Event( EventNames.CUSTOM );
  dispatchEvent( event );



Spring Actionscript
  [Event(name="custom",type="Event")]
  [RouteEvents("custom")]

  var event:Event = new Event( EventNames.CUSTOM );
  dispatchEvent( event );


                         Supported by
                                        Parsley       Spring AS
Use metadata to indicate listeners
Parsley
  [MessageHandler( selector="custom")]
  public function eventHandler( event:Event ) {...}


Spring AS
  [EventHandler( selector="custom")]
  public function eventHandler( event:Event ) {...}

Swiz
  [Mediate( event="EventNames.CUSTOM")]
  public function eventHandler( event:Event ) {...}



                            Supported by
                        Swiz              Parsley     Spring AS
Autowire commands

Robotlegs
  commandMap.mapEvent( EventNames.CUSTOM, MyCommand,
  Event );



Parsley
  <DynamicCommand type="MyCommand" selector="custom"/>




                      Supported by
  Robotlegs                      Parsley
Which leaves one question
Which is best?
Spring Actionscript

         Favours XML configuration
    Very good for Spring Java developers
        Very detailed documentation
        Lots of configuration options
Still has a few bugs (but they're working on it)
Parsley

 Greatest range of features
Favoured by Adobe Consulting
       Few examples
Little community involvement
      Single developer
Swiz

    Favours MXML configuration
           Loves Metadata
   Extendable metadata processor
   Lots of community involvement
Limited documentation (but improving)
Robotlegs

Favours Actionscript configuration
     Choice of DI Container
Reference MVCS implementation
 Lots of community involvement
      Good documentation
You choose.
This is me



  www.richardlord.net

twitter.com/Richard_Lord

More Related Content

What's hot

Writing testable Android apps
Writing testable Android appsWriting testable Android apps
Writing testable Android appsTomáš Kypta
 
Barcamp Auckland Rails3 presentation
Barcamp Auckland Rails3 presentationBarcamp Auckland Rails3 presentation
Barcamp Auckland Rails3 presentationSociable
 
Java Libraries You Can’t Afford to Miss
Java Libraries You Can’t Afford to MissJava Libraries You Can’t Afford to Miss
Java Libraries You Can’t Afford to MissAndres Almiray
 
Activator and Reactive at Play NYC meetup
Activator and Reactive at Play NYC meetupActivator and Reactive at Play NYC meetup
Activator and Reactive at Play NYC meetupHenrik Engström
 
JavaScripters Event Oct 22, 2016 · 2:00 PM: Common Mistakes made by Angular D...
JavaScripters Event Oct 22, 2016 · 2:00 PM: Common Mistakes made by Angular D...JavaScripters Event Oct 22, 2016 · 2:00 PM: Common Mistakes made by Angular D...
JavaScripters Event Oct 22, 2016 · 2:00 PM: Common Mistakes made by Angular D...JavaScripters Community
 
Dagger 2 - Injeção de Dependência
Dagger 2 - Injeção de DependênciaDagger 2 - Injeção de Dependência
Dagger 2 - Injeção de DependênciaEdson Menegatti
 
We Are All Testers Now: The Testing Pyramid and Front-End Development
We Are All Testers Now: The Testing Pyramid and Front-End DevelopmentWe Are All Testers Now: The Testing Pyramid and Front-End Development
We Are All Testers Now: The Testing Pyramid and Front-End DevelopmentAll Things Open
 
Distributing information on iOS
Distributing information on iOSDistributing information on iOS
Distributing information on iOSMake School
 
When Enterprise Java Micro Profile meets Angular
When Enterprise Java Micro Profile meets AngularWhen Enterprise Java Micro Profile meets Angular
When Enterprise Java Micro Profile meets AngularAntonio Goncalves
 
Android application model
Android application modelAndroid application model
Android application modelmagicshui
 
Making the Most of Your Gradle Build
Making the Most of Your Gradle BuildMaking the Most of Your Gradle Build
Making the Most of Your Gradle BuildAndres Almiray
 
Better Code through Lint and Checkstyle
Better Code through Lint and CheckstyleBetter Code through Lint and Checkstyle
Better Code through Lint and CheckstyleMarc Prengemann
 
Making the Most of Your Gradle Build
Making the Most of Your Gradle BuildMaking the Most of Your Gradle Build
Making the Most of Your Gradle BuildAndres Almiray
 
Java EE 6 CDI Integrates with Spring & JSF
Java EE 6 CDI Integrates with Spring & JSFJava EE 6 CDI Integrates with Spring & JSF
Java EE 6 CDI Integrates with Spring & JSFJiayun Zhou
 
Memory Management on iOS
Memory Management on iOSMemory Management on iOS
Memory Management on iOSMake School
 
Testable JavaScript: Application Architecture
Testable JavaScript:  Application ArchitectureTestable JavaScript:  Application Architecture
Testable JavaScript: Application ArchitectureMark Trostler
 
Serial Killer - Silently Pwning your Java Endpoints // OWASP BeNeLux Day 2016
Serial Killer - Silently Pwning your Java Endpoints // OWASP BeNeLux Day 2016Serial Killer - Silently Pwning your Java Endpoints // OWASP BeNeLux Day 2016
Serial Killer - Silently Pwning your Java Endpoints // OWASP BeNeLux Day 2016Christian Schneider
 
Working with AngularJS
Working with AngularJSWorking with AngularJS
Working with AngularJSAndré Vala
 

What's hot (20)

Writing testable Android apps
Writing testable Android appsWriting testable Android apps
Writing testable Android apps
 
Barcamp Auckland Rails3 presentation
Barcamp Auckland Rails3 presentationBarcamp Auckland Rails3 presentation
Barcamp Auckland Rails3 presentation
 
Java Libraries You Can’t Afford to Miss
Java Libraries You Can’t Afford to MissJava Libraries You Can’t Afford to Miss
Java Libraries You Can’t Afford to Miss
 
Activator and Reactive at Play NYC meetup
Activator and Reactive at Play NYC meetupActivator and Reactive at Play NYC meetup
Activator and Reactive at Play NYC meetup
 
JavaScripters Event Oct 22, 2016 · 2:00 PM: Common Mistakes made by Angular D...
JavaScripters Event Oct 22, 2016 · 2:00 PM: Common Mistakes made by Angular D...JavaScripters Event Oct 22, 2016 · 2:00 PM: Common Mistakes made by Angular D...
JavaScripters Event Oct 22, 2016 · 2:00 PM: Common Mistakes made by Angular D...
 
Dagger 2 - Injeção de Dependência
Dagger 2 - Injeção de DependênciaDagger 2 - Injeção de Dependência
Dagger 2 - Injeção de Dependência
 
We Are All Testers Now: The Testing Pyramid and Front-End Development
We Are All Testers Now: The Testing Pyramid and Front-End DevelopmentWe Are All Testers Now: The Testing Pyramid and Front-End Development
We Are All Testers Now: The Testing Pyramid and Front-End Development
 
Distributing information on iOS
Distributing information on iOSDistributing information on iOS
Distributing information on iOS
 
When Enterprise Java Micro Profile meets Angular
When Enterprise Java Micro Profile meets AngularWhen Enterprise Java Micro Profile meets Angular
When Enterprise Java Micro Profile meets Angular
 
ClassJS
ClassJSClassJS
ClassJS
 
Android application model
Android application modelAndroid application model
Android application model
 
Making the Most of Your Gradle Build
Making the Most of Your Gradle BuildMaking the Most of Your Gradle Build
Making the Most of Your Gradle Build
 
Better Code through Lint and Checkstyle
Better Code through Lint and CheckstyleBetter Code through Lint and Checkstyle
Better Code through Lint and Checkstyle
 
Making the Most of Your Gradle Build
Making the Most of Your Gradle BuildMaking the Most of Your Gradle Build
Making the Most of Your Gradle Build
 
Java EE 6 CDI Integrates with Spring & JSF
Java EE 6 CDI Integrates with Spring & JSFJava EE 6 CDI Integrates with Spring & JSF
Java EE 6 CDI Integrates with Spring & JSF
 
Memory Management on iOS
Memory Management on iOSMemory Management on iOS
Memory Management on iOS
 
Testable JavaScript: Application Architecture
Testable JavaScript:  Application ArchitectureTestable JavaScript:  Application Architecture
Testable JavaScript: Application Architecture
 
Serial Killer - Silently Pwning your Java Endpoints // OWASP BeNeLux Day 2016
Serial Killer - Silently Pwning your Java Endpoints // OWASP BeNeLux Day 2016Serial Killer - Silently Pwning your Java Endpoints // OWASP BeNeLux Day 2016
Serial Killer - Silently Pwning your Java Endpoints // OWASP BeNeLux Day 2016
 
Testing untestable code - DPC10
Testing untestable code - DPC10Testing untestable code - DPC10
Testing untestable code - DPC10
 
Working with AngularJS
Working with AngularJSWorking with AngularJS
Working with AngularJS
 

Similar to Application Frameworks: The new kids on the block

Cross-Platform Native Mobile Development with Eclipse
Cross-Platform Native Mobile Development with EclipseCross-Platform Native Mobile Development with Eclipse
Cross-Platform Native Mobile Development with EclipsePeter Friese
 
Jeff English: Demystifying Module Development - How to Extend Titanium
Jeff English: Demystifying Module Development - How to Extend TitaniumJeff English: Demystifying Module Development - How to Extend Titanium
Jeff English: Demystifying Module Development - How to Extend TitaniumAxway Appcelerator
 
Adding a modern twist to legacy web applications
Adding a modern twist to legacy web applicationsAdding a modern twist to legacy web applications
Adding a modern twist to legacy web applicationsJeff Durta
 
Adding a modern twist to legacy web applications
Adding a modern twist to legacy web applicationsAdding a modern twist to legacy web applications
Adding a modern twist to legacy web applicationsJeff Durta
 
SharePoint Saturday Atlanta 2015
SharePoint Saturday Atlanta 2015SharePoint Saturday Atlanta 2015
SharePoint Saturday Atlanta 2015Pushkar Chivate
 
A tour through Swift attributes
A tour through Swift attributesA tour through Swift attributes
A tour through Swift attributesMarco Eidinger
 
Spring training
Spring trainingSpring training
Spring trainingTechFerry
 
2-0. Spring ecosytem.pdf
2-0. Spring ecosytem.pdf2-0. Spring ecosytem.pdf
2-0. Spring ecosytem.pdfDeoDuaNaoHet
 
[Ultracode Munich #4] Short introduction to the new Android build system incl...
[Ultracode Munich #4] Short introduction to the new Android build system incl...[Ultracode Munich #4] Short introduction to the new Android build system incl...
[Ultracode Munich #4] Short introduction to the new Android build system incl...BeMyApp
 
Delegateless Coordinators - take 2
Delegateless Coordinators - take 2Delegateless Coordinators - take 2
Delegateless Coordinators - take 2Tales Andrade
 
Design patterns in java script, jquery, angularjs
Design patterns in java script, jquery, angularjsDesign patterns in java script, jquery, angularjs
Design patterns in java script, jquery, angularjsRavi Bhadauria
 
Parsley & Flex
Parsley & FlexParsley & Flex
Parsley & Flexprideconan
 
Developing maintainable Cordova applications
Developing maintainable Cordova applicationsDeveloping maintainable Cordova applications
Developing maintainable Cordova applicationsIvano Malavolta
 
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
 
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
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...Fabio Franzini
 

Similar to Application Frameworks: The new kids on the block (20)

Backbone.js
Backbone.jsBackbone.js
Backbone.js
 
Cross-Platform Native Mobile Development with Eclipse
Cross-Platform Native Mobile Development with EclipseCross-Platform Native Mobile Development with Eclipse
Cross-Platform Native Mobile Development with Eclipse
 
Jeff English: Demystifying Module Development - How to Extend Titanium
Jeff English: Demystifying Module Development - How to Extend TitaniumJeff English: Demystifying Module Development - How to Extend Titanium
Jeff English: Demystifying Module Development - How to Extend Titanium
 
Adding a modern twist to legacy web applications
Adding a modern twist to legacy web applicationsAdding a modern twist to legacy web applications
Adding a modern twist to legacy web applications
 
Adding a modern twist to legacy web applications
Adding a modern twist to legacy web applicationsAdding a modern twist to legacy web applications
Adding a modern twist to legacy web applications
 
SharePoint Saturday Atlanta 2015
SharePoint Saturday Atlanta 2015SharePoint Saturday Atlanta 2015
SharePoint Saturday Atlanta 2015
 
Real World MVC
Real World MVCReal World MVC
Real World MVC
 
A tour through Swift attributes
A tour through Swift attributesA tour through Swift attributes
A tour through Swift attributes
 
Spring training
Spring trainingSpring training
Spring training
 
Swiz DAO
Swiz DAOSwiz DAO
Swiz DAO
 
2-0. Spring ecosytem.pdf
2-0. Spring ecosytem.pdf2-0. Spring ecosytem.pdf
2-0. Spring ecosytem.pdf
 
[Ultracode Munich #4] Short introduction to the new Android build system incl...
[Ultracode Munich #4] Short introduction to the new Android build system incl...[Ultracode Munich #4] Short introduction to the new Android build system incl...
[Ultracode Munich #4] Short introduction to the new Android build system incl...
 
Delegateless Coordinators - take 2
Delegateless Coordinators - take 2Delegateless Coordinators - take 2
Delegateless Coordinators - take 2
 
Design patterns in java script, jquery, angularjs
Design patterns in java script, jquery, angularjsDesign patterns in java script, jquery, angularjs
Design patterns in java script, jquery, angularjs
 
Automating Analysis with the API
Automating Analysis with the APIAutomating Analysis with the API
Automating Analysis with the API
 
Parsley & Flex
Parsley & FlexParsley & Flex
Parsley & Flex
 
Developing maintainable Cordova applications
Developing maintainable Cordova applicationsDeveloping maintainable Cordova applications
Developing maintainable Cordova applications
 
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
 
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
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
 

Recently uploaded

Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 

Recently uploaded (20)

Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

Application Frameworks: The new kids on the block

  • 1. gotoAndSki(), June 2010 Application Frameworks The new kids on the block Richard Lord twitter.com/Richard_Lord Technical Architect www.richardlord.net BrightTALK www.brighttalk.com
  • 2. Application Frameworks Robotlegs (1.0) Swiz (1.0) Parsley (2.2) Spring Actionscript (1.0)
  • 3. History and evolution Generation 1.0 Cairngorm Out of date PureMVC Generation 1.5 Mature Mate Swiz Parsley Generation 2.0 Entering their prime Robotlegs Spring AS
  • 4. Coming Up Similarities Dependency Injection Event Bus Differences Conclusions
  • 5. They are very similar • Open-source. • May be used with the Flex Framework, Pure AS, or Flash CS. • Non-prescriptive about your architecture. • MVC is optional. • Provide a dependency injection container. • Provide an event bus.
  • 7. Dependency Injection How objects obtain references to each other
  • 8. Not dependency injection New class Controller { private var _model:Model; public function Controller() { _model = new Model(); } } Singleton class Controller { private var _model:Model; public function Controller() { _model = Model.getInstance(); } } Registry class Controller { private var _model:Model; public function Controller() { _model = Registry.get( Model ); } } Factory class Controller { private var _model:Model; public function Controller() { _model = Factory.create( Model ); } }
  • 9. Dependency injection Constructor class Controller { Injection private var _model:Model; public function Controller( model:Model ) { _model = model; } } Setter class Controller { Injection private var _model:Model; public function set model( value:Model ) { _model = value; } }
  • 10. Dependency injection container • The DI Container is an object for managing these dependencies. • The DI Container is configured to inject the correct objects into the correct classes. • We may ask the DI Container to create our objects. • Or we may ask it to inject objects that are created by some other means.
  • 11. Dependency injection container Model 1. Create 2. Create DI Controller Container 3. Inject Model 4. Inject Model View (created by Flex)
  • 12. Configure DI with XML Spring Actionscript <objects> <object class="package.Model" id="model"/> <object class="package.Controller" scope="prototype"> <property name="model" ref="model"/> </object> <object class="package.View" id="view" singleton="false"> <property name="model" ref="model"/> </object> </objects> Supported by Robotlegs Parsley Spring AS
  • 13. Configure DI with MXML Parsley <Objects> <Model id="model"/> <Object type="{Controller}" singleton="false"> <Property name="model" value="{model}"/> </Object> <View type="{View}"> <Property name="model" value="{model}"/> </View> </Objects> Swiz <BeanProvider> <Model id="model"/> <Prototype type="{Controller}" id="controller" constructor-arguments="{model}"/> </BeanProvider> Supported by Swiz Parsley Spring AS
  • 14. Configure DI with actionscript Robotlegs class MyAppContext extends Context { override public function startup():void { injector.mapSingleton( Model ); injector.mapClass( Controller ); } } Swiz class MyAppContext { public function startup():void { var model:Model = new Model(); var proto:Prototype = new Prototype( Controller ); proto.constructorArguments = model; bp = new BeanProvider( [ model, proto ] ); } } Supported by Robotlegs Swiz Parsley
  • 15. Configure injections with metadata Robotlegs, Swiz & Parsley class View { [Inject] public function set model( value:Model ) { _model = value; } } Spring Actionscript class View { [Autowired] public function set model( value:Model ) { _model = value; } } Supported by Robotlegs Swiz Parsley Spring AS
  • 16. Injecting into view components Use Annotations Supported by Robotlegs Swiz Parsley Spring AS Use Configuration Supported by Parsley Spring AS
  • 18. Event Bus dispatch dispatch dispatch event event event Event Bus listen for listen for listen for event event event
  • 19. Using a single event dispatcher dispatch dispatch dispatch event event event Event Dispatcher listen for listen for listen for event event event
  • 20. Using a single event dispatcher Dispatcher var event:Event = new Event( EventNames.CUSTOM ); eventBus.dispatchEvent( event ); Listener eventBus.addEventListener( EventNames.CUSTOM, eventHandler );
  • 22. Inject the event bus Robotlegs [Inject] public var eventBus:EventDispatcher; var event:Event = new Event( EventNames.CUSTOM ); eventBus.dispatchEvent( event ); Swiz [Dispatcher] public var eventBus:EventDispatcher; var event:Event = new Event( EventNames.CUSTOM ); eventBus.dispatchEvent( event ); Supported by Robotlegs Swiz Parsley
  • 23. Inject the event bus Robotlegs [Inject] public var eventBus:EventDispatcher; eventBus.addEventListener( EventNames.CUSTOM, eventHandler ); Swiz [Dispatcher] public var eventBus:EventDispatcher; eventBus.addEventListener( EventNames.CUSTOM, eventHandler ); Supported by Robotlegs Swiz Parsley
  • 24. Use metadata to indicate bus events Parsley [Event(name="custom",type="Event")] [ManagedEvents("custom")] var event:Event = new Event( EventNames.CUSTOM ); dispatchEvent( event ); Spring Actionscript [Event(name="custom",type="Event")] [RouteEvents("custom")] var event:Event = new Event( EventNames.CUSTOM ); dispatchEvent( event ); Supported by Parsley Spring AS
  • 25. Use metadata to indicate listeners Parsley [MessageHandler( selector="custom")] public function eventHandler( event:Event ) {...} Spring AS [EventHandler( selector="custom")] public function eventHandler( event:Event ) {...} Swiz [Mediate( event="EventNames.CUSTOM")] public function eventHandler( event:Event ) {...} Supported by Swiz Parsley Spring AS
  • 26. Autowire commands Robotlegs commandMap.mapEvent( EventNames.CUSTOM, MyCommand, Event ); Parsley <DynamicCommand type="MyCommand" selector="custom"/> Supported by Robotlegs Parsley
  • 27. Which leaves one question
  • 29. Spring Actionscript Favours XML configuration Very good for Spring Java developers Very detailed documentation Lots of configuration options Still has a few bugs (but they're working on it)
  • 30. Parsley Greatest range of features Favoured by Adobe Consulting Few examples Little community involvement Single developer
  • 31. Swiz Favours MXML configuration Loves Metadata Extendable metadata processor Lots of community involvement Limited documentation (but improving)
  • 32. Robotlegs Favours Actionscript configuration Choice of DI Container Reference MVCS implementation Lots of community involvement Good documentation
  • 34. This is me www.richardlord.net twitter.com/Richard_Lord

Editor's Notes