SlideShare ist ein Scribd-Unternehmen logo
1 von 22
mvcExpress -
fastest and simplest
AS3 MVC frameworks

Raimundas Banevicius
Feb 14, 2012
Flash developer
1.   AS3 framework evolution
2.   simplicity
3.   performance
4.   extra perks




                               2
AS3 MVC Framework evolution
    Pros:
                                                                    Cons:

•    divide your code is small units        •     Slightly hurts performance
•    Good unit communication                •     Lot of boilerplate code.
•    Standardize your code
•    focus on app instead of architecture




+ Enforce TTD development                       - Hurts performance a lot
+ Removed most boilerplate code




                                            + Hurts performance the least
+ Enforce modular development
+ Simplifies code to the maximum            - Young framework


                                                                               3
AS3 MVC Framework evolution
    Pros:
                                                                    Cons:

•    divide your code is small units        •     Slightly hurts performance
•    Good unit communication                •     Lot of boilerplate code.
•    Standardize your code
•    focus on app instead of architecture




+ Enforce TTD development                       - Hurts performance a lot
+ Removed most boilerplate code




                                            + Hurts performance the least
+ Enforce modular development
+ Simplifies code to the maximum            - Young framework


                                                                               4
mvcExpress is simple!




                         5
mvcExpress is simple! – set up
• Set up PureMVC
   registerCommand((“startUp”, StartupCommand);

   registerProxy(new DataProxy());

   registerMediator(new GameMediator(new GameSprite()));

• Set up mvcExpress – MORE OPTIONS!
   commandMap.map(“startUp”, StartupCommand);

   commandMap.execute(AnotherCommand, new CommandParams());


   proxyMap.mapObject(new DataProxy());

   proxyMap.mapClass(DataProxy);

   mediatorMap.map(GameSprite, GameMediator);

   mediatorMap.mediate(new GameSprite());
                                                              6
mvcExpress is simple! – commands

• PureMVC:
  sendNotification(“new_message”);

    override public function execute(notice:INotification):void {
      // geting command parameters
      var params:ParamsVO = notice.getBody() as ParamsVO;

        // do stuff...
    }

• mvcExpress
  sendMessage(“new_message”);

    // geting command parameters
    public function execute(params:ParamsVO):void {

        // do stuff...
    }



                                                                    7
mvcExpress is simple! – getting stuff in commands

• PureMVC:
  // get data
  var dataProxy:DataProxy =
                facade.retrieveProxy(DataProxy.NAME) as DataProxy;


  // get mediator
   var testMediator:ViewMediator =
        facade.retrieveMediator(ViewMediator.NAME) as ViewMediator;

• mvcExpress
  // get data
  [Inject]
  public var dataProxy:DataProxy;


  // get mediator

     NOT POSSIBLE!!!
       It is bad practice to use mediators from commands.

                                                                      8
mvcExpress is simple! – Proxies

• PureMVC:
  public class PureMvcProxy extends Proxy implements IProxy {
    public static const NAME:String = "PureMvcProxy";

      public function PureMvcProxy() {
        var proxyData:DataVO = new DataVO();
        super(NAME, proxyData);
      }

      // get and cast data object for convenience..
      public function get dataVo():DataVO {
         return super.getData() as DataVO;
      }
  }
• mvcExpress
  public class MvcExpressProxy extends Proxy {

      private var dataVO:DataVO = new DataVO();

      public function MvcExpressProxy() {
      }
  }
                                                                9
mvcExpress is simple! – Mediator+View:
• PureMVC:
  public class PureMvcMediator extends Mediator implements IMediator {
    public static const NAME:String = "PureMvcMediator";

    public function PureMvcMediator(initViewComponent:ViewComponent) {
      super(NAME, initViewComponent);
    }

    // cast view for convenient local use.
    public function get view():ViewComponent {
        return super.getViewComponent() as ViewComponent;
    }

    // listen for framework notices
    override public function listNotificationInterests():Array {
        return [ //
           DataNote.STUFF_DONE //
           ];
    }

    // handle framework events
    override public function handleNotification(notice:INotification):void {
        switch (notice.getName()) {
          case DataNote.STUFF_DONE:
             // do stuff…
          break;
  } } }                                                                        10
mvcExpress is simple! – Mediator+View:
• PureMVC:
  public class PureMvcMediator extends Mediator implements IMediator {
    public static const NAME:String = "PureMvcMediator";

    public function PureMvcMediator(initViewComponent:ViewComponent) {
      super(NAME, initViewComponent);
    }

    // cast view for convenient local use.
    public function get view():ViewComponent {
        return super.getViewComponent() as ViewComponent;
    }

    // listen for framework notices
    override public function listNotificationInterests():Array {
        return [ //
           DataNote.STUFF_DONE //
           ];
    }

    // handle framework events
    override public function handleNotification(notice:INotification):void {
        switch (notice.getName()) {
          case DataNote.STUFF_DONE:
             // do stuff…
          break;
  } } }                                                                        11
mvcExpress is simple! – Mediator+View:
• mvcExpress:
  public class MvcExpressMediator extends Mediator {

      [Inject]
      public var view:ViewComponent;

      override public function onRegister():void {
        // listen for framework events
        addHandler(DataNote.STUFF_DONE, handleStuffDone);
      }

      // handle framework events
      private function handleStuffDone(params:DataChangeParamsVO):void {
          view.showStuff(params.dataParam1);
      }
  }




                                                                           12
mvcExpress is fast!




                       13
mvcExpress is fast! - Command execution

                      1600

                      1400

                      1200
Executions per 1 ms




                      1000

                      800                                                            RobotLegs
                                                                                     PureMVC
                      600
                                                                                     mvcExpress
                      400

                      200

                        0
                             with nothing:      with      with Model:   Model and
                                             parameter:                 View call:

                                                                                                  14
mvcExpress is fast! - Command execution

                      1600

                      1400

                      1200
Executions per 1 ms




                      1000

                      800                                                            RobotLegs
                                                                                     PureMVC
                      600
                                                                                     mvcExpress
                      400

                      200

                        0
                             with nothing:      with      with Model:   Model and
                                             parameter:                 View call:

                                                                                                  15
mvcExpress is fast! - mediator registering / removal

                      100
                      90
                      80
Executions per 1 ms




                      70
                      60
                      50                                                      RobotLegs
                      40                                                      PureMVC
                      30                                                      mvcExpress

                      20
                      10
                       0
                            Register Register Register Remove Remove Remove
                             1000:    2000:    5000:    1000:  2000:  5000:

                                                                                           16
mvcExpress is fast! - mediator registering / removal

                      100
                      90
                      80
Executions per 1 ms




                      70
                      60
                      50                                                      RobotLegs
                      40                                                      PureMVC
                      30                                                      mvcExpress

                      20
                      10
                       0
                            Register Register Register Remove Remove Remove
                             1000:    2000:    5000:    1000:  2000:  5000:

                                                                                           17
mvcExpress is fast! – communication speed

                      25000


                      20000
Executions per 1 ms




                      15000

                                                                                        RobotLegs
                      10000
                                                                                        PureMVC
                                                                                        mvcExpress
                      5000


                          0
                              1 receiving   100        200        500        1000
                              mediators: receiving receiving receiving receiving
                                          mediators: mediators: mediators: mediators:

                                                                                                     18
mvcExpress is fast! – communication speed

                      25000


                      20000
Executions per 1 ms




                      15000

                                                                                        RobotLegs
                      10000
                                                                                        PureMVC
                                                                                        mvcExpress
                      5000


                          0
                              1 receiving   100        200        500        1000
                              mediators: receiving receiving receiving receiving
                                          mediators: mediators: mediators: mediators:

                                                                                                     19
Extra perks


• Hard to misuse:
In mvcExpress you will have - what you need, where you need it.
No more no less.


• Modular:
Want it or not – you will be creating reusable modules by extending
ModuleCore.as class.



• Helps avoid errors:
mvcExpress uses conditional compilation very extensively!
Add ”-define+=CONFIG::DEBUG,true” to benefit from better error checking and
warnings.

                                                                              20
Check it out!


• Code on gitHub:
https://github.com/MindScriptAct/mvcExpress-framework



• mvcExpress homePage:
http://mvcexpress.org/




• My blog:
http://www.mindscriptact.com/




                                                        21
Thank you for your time!


            Questions?




                            22

Weitere ähnliche Inhalte

Was ist angesagt?

Spring 4 advanced final_xtr_presentation
Spring 4 advanced final_xtr_presentationSpring 4 advanced final_xtr_presentation
Spring 4 advanced final_xtr_presentationsourabh aggarwal
 
Java util concurrent
Java util concurrentJava util concurrent
Java util concurrentRoger Xia
 
Java Concurrency and Asynchronous
Java Concurrency and AsynchronousJava Concurrency and Asynchronous
Java Concurrency and AsynchronousLifan Yang
 
Architecting your GWT applications with GWT-Platform - Lesson 02
Architecting your GWT applications with GWT-Platform - Lesson 02Architecting your GWT applications with GWT-Platform - Lesson 02
Architecting your GWT applications with GWT-Platform - Lesson 02rhemsolutions
 
Se lancer dans l'aventure microservices avec Spring Cloud - Julien Roy
Se lancer dans l'aventure microservices avec Spring Cloud - Julien RoySe lancer dans l'aventure microservices avec Spring Cloud - Julien Roy
Se lancer dans l'aventure microservices avec Spring Cloud - Julien Royekino
 
Dive into SObjectizer 5.5. Ninth Part: Message Chains
Dive into SObjectizer 5.5. Ninth Part: Message ChainsDive into SObjectizer 5.5. Ninth Part: Message Chains
Dive into SObjectizer 5.5. Ninth Part: Message ChainsYauheni Akhotnikau
 
Parsley & Flex
Parsley & FlexParsley & Flex
Parsley & Flexprideconan
 
Java Concurrency, Memory Model, and Trends
Java Concurrency, Memory Model, and TrendsJava Concurrency, Memory Model, and Trends
Java Concurrency, Memory Model, and TrendsCarol McDonald
 
Other Approaches (Concurrency)
Other Approaches (Concurrency)Other Approaches (Concurrency)
Other Approaches (Concurrency)Sri Prasanna
 
In the Brain of Hans Dockter: Gradle
In the Brain of Hans Dockter: GradleIn the Brain of Hans Dockter: Gradle
In the Brain of Hans Dockter: GradleSkills Matter
 
Qt test framework
Qt test frameworkQt test framework
Qt test frameworkICS
 
Dive into SObjectizer 5.5. Tenth part: Mutable Messages
Dive into SObjectizer 5.5. Tenth part: Mutable MessagesDive into SObjectizer 5.5. Tenth part: Mutable Messages
Dive into SObjectizer 5.5. Tenth part: Mutable MessagesYauheni Akhotnikau
 
Java New Evolution
Java New EvolutionJava New Evolution
Java New EvolutionAllan Huang
 
Spring vs. Java EE QConSP 2012
Spring vs. Java EE QConSP 2012Spring vs. Java EE QConSP 2012
Spring vs. Java EE QConSP 2012Guilherme Moreira
 

Was ist angesagt? (20)

Spring 4 advanced final_xtr_presentation
Spring 4 advanced final_xtr_presentationSpring 4 advanced final_xtr_presentation
Spring 4 advanced final_xtr_presentation
 
Java util concurrent
Java util concurrentJava util concurrent
Java util concurrent
 
Java Concurrency and Asynchronous
Java Concurrency and AsynchronousJava Concurrency and Asynchronous
Java Concurrency and Asynchronous
 
Architecting your GWT applications with GWT-Platform - Lesson 02
Architecting your GWT applications with GWT-Platform - Lesson 02Architecting your GWT applications with GWT-Platform - Lesson 02
Architecting your GWT applications with GWT-Platform - Lesson 02
 
Se lancer dans l'aventure microservices avec Spring Cloud - Julien Roy
Se lancer dans l'aventure microservices avec Spring Cloud - Julien RoySe lancer dans l'aventure microservices avec Spring Cloud - Julien Roy
Se lancer dans l'aventure microservices avec Spring Cloud - Julien Roy
 
Vue next
Vue nextVue next
Vue next
 
Dive into SObjectizer 5.5. Ninth Part: Message Chains
Dive into SObjectizer 5.5. Ninth Part: Message ChainsDive into SObjectizer 5.5. Ninth Part: Message Chains
Dive into SObjectizer 5.5. Ninth Part: Message Chains
 
Parsley & Flex
Parsley & FlexParsley & Flex
Parsley & Flex
 
Java Concurrency, Memory Model, and Trends
Java Concurrency, Memory Model, and TrendsJava Concurrency, Memory Model, and Trends
Java Concurrency, Memory Model, and Trends
 
Other Approaches (Concurrency)
Other Approaches (Concurrency)Other Approaches (Concurrency)
Other Approaches (Concurrency)
 
In the Brain of Hans Dockter: Gradle
In the Brain of Hans Dockter: GradleIn the Brain of Hans Dockter: Gradle
In the Brain of Hans Dockter: Gradle
 
Qt test framework
Qt test frameworkQt test framework
Qt test framework
 
JEE.next()
JEE.next()JEE.next()
JEE.next()
 
Dive into SObjectizer 5.5. Tenth part: Mutable Messages
Dive into SObjectizer 5.5. Tenth part: Mutable MessagesDive into SObjectizer 5.5. Tenth part: Mutable Messages
Dive into SObjectizer 5.5. Tenth part: Mutable Messages
 
drmaatutggf12
drmaatutggf12drmaatutggf12
drmaatutggf12
 
Byte code field report
Byte code field reportByte code field report
Byte code field report
 
Java New Evolution
Java New EvolutionJava New Evolution
Java New Evolution
 
angular2.0
angular2.0angular2.0
angular2.0
 
The Java memory model made easy
The Java memory model made easyThe Java memory model made easy
The Java memory model made easy
 
Spring vs. Java EE QConSP 2012
Spring vs. Java EE QConSP 2012Spring vs. Java EE QConSP 2012
Spring vs. Java EE QConSP 2012
 

Ähnlich wie Fastest AS3 MVC Framework

Postgres MVCC - A Developer Centric View of Multi Version Concurrency Control
Postgres MVCC - A Developer Centric View of Multi Version Concurrency ControlPostgres MVCC - A Developer Centric View of Multi Version Concurrency Control
Postgres MVCC - A Developer Centric View of Multi Version Concurrency ControlReactive.IO
 
How to CQRS in node: Eventually Consistent, Distributed Microservice Systems..
How to CQRS in node: Eventually Consistent, Distributed Microservice Systems..How to CQRS in node: Eventually Consistent, Distributed Microservice Systems..
How to CQRS in node: Eventually Consistent, Distributed Microservice Systems..Matt Walters
 
Hardware supports for Virtualization
Hardware supports for VirtualizationHardware supports for Virtualization
Hardware supports for VirtualizationYoonje Choi
 
Efficient use of NodeJS
Efficient use of NodeJSEfficient use of NodeJS
Efficient use of NodeJSYura Bogdanov
 
murakumo Cloud Controller
murakumo Cloud Controllermurakumo Cloud Controller
murakumo Cloud ControllerShingo Kawano
 
Setup & Operate Tungsten Replicator
Setup & Operate Tungsten ReplicatorSetup & Operate Tungsten Replicator
Setup & Operate Tungsten ReplicatorContinuent
 
How to Test Asynchronous Code (v2)
How to Test Asynchronous Code (v2)How to Test Asynchronous Code (v2)
How to Test Asynchronous Code (v2)Felix Geisendörfer
 
Windows Azure Interoperability
Windows Azure InteroperabilityWindows Azure Interoperability
Windows Azure InteroperabilityMihai Dan Nadas
 
Inside the Matrix,How to Build Transparent Sandbox for Malware Analysis
Inside the Matrix,How to Build Transparent Sandbox for Malware AnalysisInside the Matrix,How to Build Transparent Sandbox for Malware Analysis
Inside the Matrix,How to Build Transparent Sandbox for Malware AnalysisChong-Kuan Chen
 
New Tools and Interfaces for Managing IBM MQ
New Tools and Interfaces for Managing IBM MQNew Tools and Interfaces for Managing IBM MQ
New Tools and Interfaces for Managing IBM MQMatt Leming
 
Set Up & Operate Tungsten Replicator
Set Up & Operate Tungsten ReplicatorSet Up & Operate Tungsten Replicator
Set Up & Operate Tungsten ReplicatorContinuent
 
Dena Loves Perl
Dena Loves PerlDena Loves Perl
Dena Loves Perlnotolab
 
Low latency microservices in java QCon New York 2016
Low latency microservices in java   QCon New York 2016Low latency microservices in java   QCon New York 2016
Low latency microservices in java QCon New York 2016Peter Lawrey
 
Docker Swarm secrets for creating great FIWARE platforms
Docker Swarm secrets for creating great FIWARE platformsDocker Swarm secrets for creating great FIWARE platforms
Docker Swarm secrets for creating great FIWARE platformsFederico Michele Facca
 
Projet d'accès aux résultats des étudiant via client mobile
Projet d'accès aux résultats des étudiant via client mobile Projet d'accès aux résultats des étudiant via client mobile
Projet d'accès aux résultats des étudiant via client mobile Patrick Bashizi
 
Multi Client Development with Spring
Multi Client Development with SpringMulti Client Development with Spring
Multi Client Development with SpringJoshua Long
 
Xamarin & MvvmCross in depth
Xamarin & MvvmCross in depthXamarin & MvvmCross in depth
Xamarin & MvvmCross in depthNicolas Milcoff
 
Squeak DBX
Squeak DBXSqueak DBX
Squeak DBXESUG
 
NodeJS guide for beginners
NodeJS guide for beginnersNodeJS guide for beginners
NodeJS guide for beginnersEnoch Joshua
 

Ähnlich wie Fastest AS3 MVC Framework (20)

Postgres MVCC - A Developer Centric View of Multi Version Concurrency Control
Postgres MVCC - A Developer Centric View of Multi Version Concurrency ControlPostgres MVCC - A Developer Centric View of Multi Version Concurrency Control
Postgres MVCC - A Developer Centric View of Multi Version Concurrency Control
 
How to CQRS in node: Eventually Consistent, Distributed Microservice Systems..
How to CQRS in node: Eventually Consistent, Distributed Microservice Systems..How to CQRS in node: Eventually Consistent, Distributed Microservice Systems..
How to CQRS in node: Eventually Consistent, Distributed Microservice Systems..
 
Hardware supports for Virtualization
Hardware supports for VirtualizationHardware supports for Virtualization
Hardware supports for Virtualization
 
Efficient use of NodeJS
Efficient use of NodeJSEfficient use of NodeJS
Efficient use of NodeJS
 
murakumo Cloud Controller
murakumo Cloud Controllermurakumo Cloud Controller
murakumo Cloud Controller
 
Demystifying openvswitch
Demystifying openvswitchDemystifying openvswitch
Demystifying openvswitch
 
Setup & Operate Tungsten Replicator
Setup & Operate Tungsten ReplicatorSetup & Operate Tungsten Replicator
Setup & Operate Tungsten Replicator
 
How to Test Asynchronous Code (v2)
How to Test Asynchronous Code (v2)How to Test Asynchronous Code (v2)
How to Test Asynchronous Code (v2)
 
Windows Azure Interoperability
Windows Azure InteroperabilityWindows Azure Interoperability
Windows Azure Interoperability
 
Inside the Matrix,How to Build Transparent Sandbox for Malware Analysis
Inside the Matrix,How to Build Transparent Sandbox for Malware AnalysisInside the Matrix,How to Build Transparent Sandbox for Malware Analysis
Inside the Matrix,How to Build Transparent Sandbox for Malware Analysis
 
New Tools and Interfaces for Managing IBM MQ
New Tools and Interfaces for Managing IBM MQNew Tools and Interfaces for Managing IBM MQ
New Tools and Interfaces for Managing IBM MQ
 
Set Up & Operate Tungsten Replicator
Set Up & Operate Tungsten ReplicatorSet Up & Operate Tungsten Replicator
Set Up & Operate Tungsten Replicator
 
Dena Loves Perl
Dena Loves PerlDena Loves Perl
Dena Loves Perl
 
Low latency microservices in java QCon New York 2016
Low latency microservices in java   QCon New York 2016Low latency microservices in java   QCon New York 2016
Low latency microservices in java QCon New York 2016
 
Docker Swarm secrets for creating great FIWARE platforms
Docker Swarm secrets for creating great FIWARE platformsDocker Swarm secrets for creating great FIWARE platforms
Docker Swarm secrets for creating great FIWARE platforms
 
Projet d'accès aux résultats des étudiant via client mobile
Projet d'accès aux résultats des étudiant via client mobile Projet d'accès aux résultats des étudiant via client mobile
Projet d'accès aux résultats des étudiant via client mobile
 
Multi Client Development with Spring
Multi Client Development with SpringMulti Client Development with Spring
Multi Client Development with Spring
 
Xamarin & MvvmCross in depth
Xamarin & MvvmCross in depthXamarin & MvvmCross in depth
Xamarin & MvvmCross in depth
 
Squeak DBX
Squeak DBXSqueak DBX
Squeak DBX
 
NodeJS guide for beginners
NodeJS guide for beginnersNodeJS guide for beginners
NodeJS guide for beginners
 

Kürzlich hochgeladen

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 

Kürzlich hochgeladen (20)

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 

Fastest AS3 MVC Framework

  • 1. mvcExpress - fastest and simplest AS3 MVC frameworks Raimundas Banevicius Feb 14, 2012 Flash developer
  • 2. 1. AS3 framework evolution 2. simplicity 3. performance 4. extra perks 2
  • 3. AS3 MVC Framework evolution Pros: Cons: • divide your code is small units • Slightly hurts performance • Good unit communication • Lot of boilerplate code. • Standardize your code • focus on app instead of architecture + Enforce TTD development - Hurts performance a lot + Removed most boilerplate code + Hurts performance the least + Enforce modular development + Simplifies code to the maximum - Young framework 3
  • 4. AS3 MVC Framework evolution Pros: Cons: • divide your code is small units • Slightly hurts performance • Good unit communication • Lot of boilerplate code. • Standardize your code • focus on app instead of architecture + Enforce TTD development - Hurts performance a lot + Removed most boilerplate code + Hurts performance the least + Enforce modular development + Simplifies code to the maximum - Young framework 4
  • 6. mvcExpress is simple! – set up • Set up PureMVC registerCommand((“startUp”, StartupCommand); registerProxy(new DataProxy()); registerMediator(new GameMediator(new GameSprite())); • Set up mvcExpress – MORE OPTIONS! commandMap.map(“startUp”, StartupCommand); commandMap.execute(AnotherCommand, new CommandParams()); proxyMap.mapObject(new DataProxy()); proxyMap.mapClass(DataProxy); mediatorMap.map(GameSprite, GameMediator); mediatorMap.mediate(new GameSprite()); 6
  • 7. mvcExpress is simple! – commands • PureMVC: sendNotification(“new_message”); override public function execute(notice:INotification):void { // geting command parameters var params:ParamsVO = notice.getBody() as ParamsVO; // do stuff... } • mvcExpress sendMessage(“new_message”); // geting command parameters public function execute(params:ParamsVO):void { // do stuff... } 7
  • 8. mvcExpress is simple! – getting stuff in commands • PureMVC: // get data var dataProxy:DataProxy = facade.retrieveProxy(DataProxy.NAME) as DataProxy; // get mediator var testMediator:ViewMediator = facade.retrieveMediator(ViewMediator.NAME) as ViewMediator; • mvcExpress // get data [Inject] public var dataProxy:DataProxy; // get mediator NOT POSSIBLE!!! It is bad practice to use mediators from commands. 8
  • 9. mvcExpress is simple! – Proxies • PureMVC: public class PureMvcProxy extends Proxy implements IProxy { public static const NAME:String = "PureMvcProxy"; public function PureMvcProxy() { var proxyData:DataVO = new DataVO(); super(NAME, proxyData); } // get and cast data object for convenience.. public function get dataVo():DataVO { return super.getData() as DataVO; } } • mvcExpress public class MvcExpressProxy extends Proxy { private var dataVO:DataVO = new DataVO(); public function MvcExpressProxy() { } } 9
  • 10. mvcExpress is simple! – Mediator+View: • PureMVC: public class PureMvcMediator extends Mediator implements IMediator { public static const NAME:String = "PureMvcMediator"; public function PureMvcMediator(initViewComponent:ViewComponent) { super(NAME, initViewComponent); } // cast view for convenient local use. public function get view():ViewComponent { return super.getViewComponent() as ViewComponent; } // listen for framework notices override public function listNotificationInterests():Array { return [ // DataNote.STUFF_DONE // ]; } // handle framework events override public function handleNotification(notice:INotification):void { switch (notice.getName()) { case DataNote.STUFF_DONE: // do stuff… break; } } } 10
  • 11. mvcExpress is simple! – Mediator+View: • PureMVC: public class PureMvcMediator extends Mediator implements IMediator { public static const NAME:String = "PureMvcMediator"; public function PureMvcMediator(initViewComponent:ViewComponent) { super(NAME, initViewComponent); } // cast view for convenient local use. public function get view():ViewComponent { return super.getViewComponent() as ViewComponent; } // listen for framework notices override public function listNotificationInterests():Array { return [ // DataNote.STUFF_DONE // ]; } // handle framework events override public function handleNotification(notice:INotification):void { switch (notice.getName()) { case DataNote.STUFF_DONE: // do stuff… break; } } } 11
  • 12. mvcExpress is simple! – Mediator+View: • mvcExpress: public class MvcExpressMediator extends Mediator { [Inject] public var view:ViewComponent; override public function onRegister():void { // listen for framework events addHandler(DataNote.STUFF_DONE, handleStuffDone); } // handle framework events private function handleStuffDone(params:DataChangeParamsVO):void { view.showStuff(params.dataParam1); } } 12
  • 14. mvcExpress is fast! - Command execution 1600 1400 1200 Executions per 1 ms 1000 800 RobotLegs PureMVC 600 mvcExpress 400 200 0 with nothing: with with Model: Model and parameter: View call: 14
  • 15. mvcExpress is fast! - Command execution 1600 1400 1200 Executions per 1 ms 1000 800 RobotLegs PureMVC 600 mvcExpress 400 200 0 with nothing: with with Model: Model and parameter: View call: 15
  • 16. mvcExpress is fast! - mediator registering / removal 100 90 80 Executions per 1 ms 70 60 50 RobotLegs 40 PureMVC 30 mvcExpress 20 10 0 Register Register Register Remove Remove Remove 1000: 2000: 5000: 1000: 2000: 5000: 16
  • 17. mvcExpress is fast! - mediator registering / removal 100 90 80 Executions per 1 ms 70 60 50 RobotLegs 40 PureMVC 30 mvcExpress 20 10 0 Register Register Register Remove Remove Remove 1000: 2000: 5000: 1000: 2000: 5000: 17
  • 18. mvcExpress is fast! – communication speed 25000 20000 Executions per 1 ms 15000 RobotLegs 10000 PureMVC mvcExpress 5000 0 1 receiving 100 200 500 1000 mediators: receiving receiving receiving receiving mediators: mediators: mediators: mediators: 18
  • 19. mvcExpress is fast! – communication speed 25000 20000 Executions per 1 ms 15000 RobotLegs 10000 PureMVC mvcExpress 5000 0 1 receiving 100 200 500 1000 mediators: receiving receiving receiving receiving mediators: mediators: mediators: mediators: 19
  • 20. Extra perks • Hard to misuse: In mvcExpress you will have - what you need, where you need it. No more no less. • Modular: Want it or not – you will be creating reusable modules by extending ModuleCore.as class. • Helps avoid errors: mvcExpress uses conditional compilation very extensively! Add ”-define+=CONFIG::DEBUG,true” to benefit from better error checking and warnings. 20
  • 21. Check it out! • Code on gitHub: https://github.com/MindScriptAct/mvcExpress-framework • mvcExpress homePage: http://mvcexpress.org/ • My blog: http://www.mindscriptact.com/ 21
  • 22. Thank you for your time!   Questions? 22