SlideShare una empresa de Scribd logo
1 de 55
The Next Step in 
AS3 Framework 
Evolution


                    02.2013
About me

                               Raimundas Banevicius

                               Senior AS3 Developer

                               Working with Flash from 2001

                               Author of open source AS3 framework – mvcExpress




 Blog : http://www.mindscriptact.com/
 Twitter : @Deril
 E-mail : raima156@yahoo.com
About this presentation


●   AS3 framework evolution

●   Modular programming in mvcExpress
●   mvcExpress live
AS3 framework 
   evolution
AS3 framework history
    (ActionScript 3.0 released in 2006)

●PureMVC (2006)
●Cairngorm (2007?) [flex only]

●Springactionscript (2007)

●Parsley(2008)

●Mate(2008) [flex only]

●Robotlegs(2009)

●Swiz(2009) [flex only]



●mvcExpress(2012)
●Robotlegs 2 (2012) (in beta)
AS3 framework history
    (ActionScript 3.0 released in 2006)

●PureMVC (2006)
●Cairngorm (2007?) [flex only]

●Springactionscript (2007)

●Parsley(2008)

●Mate(2008) [flex only]

●Robotlegs(2009)

●Swiz(2009) [flex only]



●mvcExpress(2012)
●Robotlegs 2 (2012) (in beta)
AS3 framework history
    (ActionScript 3.0 released in 2006)

●PureMVC (2006)
●Cairngorm (2007?) [flex only]

●Springactionscript (2007)

●Parsley(2008)

●Mate(2008) [flex only]

●Robotlegs(2009)

●Swiz(2009) [flex only]



●mvcExpress(2012)
●Robotlegs 2 (2012) (in beta)
PureMVC

              The good                                 The bad

●   Organize your code in small units      ●   Slightly hurts performance
●   Let those units communicate
                                           ●   Built on static classes
●   Standardize your code
●   Focus on app instead of architecture   ●   Lots of boilerplate code

●   Ported to many languages




              Can it be done simpler?
robotlegs

           The good                       The bad

●   All PureMVC goodness.      ●   Hurts performance a lot!
●   Removed most boilerplate
    code
●   Introduces dependency
    injection




          Can it be done simpler...
                      and run fast?
robotlegs 2 (beta)

           The good                       The bad

●   Highly configurable       ●   Adds some boilerplate code
●   Modular                   ●   Code less standardized
●   Guards, hooks, rules.     ●   Hurts performance a lot
                                              (and more)




          Can it be done simpler...
                      and run fast?
mvcExpress

             The good                          The bad



●
    All PureMVC and robotlegs      ●   Hurts performance the least
    goodness.
                                   ●   Young framework
●   Focus on modular development
●   Simplifies code even more




          Simplest and fastest MVC framework!
package {                                                                 pureMVC mediator
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;
     }

}}
package {                                                                 pureMVC mediator
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;
     }

}}
package {                                                                 pureMVC mediator
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;
     }

}}
package {                                                                 pureMVC mediator
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;
     }

}}
mvcExress mediator




package {
public class MvcExpressMediator extends Mediator {

     [Inject]
     public var view:ViewComponent;

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

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




package {
public class MvcExpressMediator extends Mediator {

     [Inject]
     public var view:ViewComponent;

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

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




package {
public class MvcExpressMediator extends Mediator {

     [Inject]
     public var view:ViewComponent;

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

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




package {
public class MvcExpressMediator extends Mediator {

     [Inject]
     public var view:ViewComponent;

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

     // handle framework events
     private function handleStuffDone(params:DataChangeParamsVO):void {
         view.showStuff(params.dataParam1);
     }
}}
Speed test data
                                    mvcExpress      pureMVC    robotlegs    robotlegs 2



 Command creation and execution:   0.00087         0.00219    0.00866      0.01894

                                             1.0      /2.5     /10.0          /21.8
 Proxy inject into command:        0.00037         0.00024    0.00491      0.00247

                                             1.0     /0.7 /13.2                /6.6
 Mediator create:                  0.02100         0.02100    0.05100      0.13600

                                             1.0     /1.0        /2.4           /6.5
     https://github.com/MindScriptAct/as3-mvcFramework-performanceTest
 Mediator remove:                  0.01700         0.10300    0.01850      0.05550

                                             1.0     /6.1        /1.1           /3.3
 Communication 1 to 1:             0.00030         0.00060    0.00153      0.00141

                                             1.0     /2.0        /5.0           /4.6
 Communication 1 to 10:            0.00073         0.00788    0.00670      0.00629

                                             1.0    /10.9        /9.2           /8.7
 Communication 1 to 100:           0.00480         0.06897    0.05746      0.05071

                                             1.0    /14.4      /12.0          /10.6
Command performance

Command runs /1ms         pureMVC    robotlegs   robotlegs 2   mvcExpress   mvcExpress
                                                                             (pooled)

Command with nothing:        495.0       109.3          55.3       1010.1         1754.4


Command with 1 inject:       487.5        70.4          49.6        961.5         1694.9


Command with 2 injects:      458.7        58.6          47.2        724.6         1724.1


Command with 4 injects:      340.1        44.1          42.7        480.8         1783.3
Communication performance
Direct communication:
     runs /1ms                    1 parameter          5 parameters
     Events:                                688                   654
     Signals:                               1116                  741
     Callback:                         28571                 10416




Indirect communication:

     runs /1ms                1 parameter          5 parameters
     PureMvc notifications:                 552                   454
     robotlegs events:                      652                   622
     mvcExpress messages:                   5464                  2584
Overview
Modular programming in 
     mvcExpress
Modular programming
features
●   Aggregation
●   Communication
●   Dependencies(data)

●   Permission control (v1.4)
Aggregation




var moduleB:ModuleB = new ModuleB();

view.addChild(moduleB);
mediatorMap.mediate(moduleB);
Module communication
Module communication
Module communication




sendScopeMessage("scopeName", "messageType", new ParamObject());

addScopeHandler("scopeName", "messageType", scopedMessageHandrlerFunction);
Module data sharing
(data dependencies)
Module data sharing
(data dependencies)
Module data sharing
(data dependencies)




proxyMap.scopeMap("scopeName", myProxyObject);

[Inject(scope="scopeName")]
public var myProxy:MyProxy;
Scope permissions




   registerScope(scopeName:String,
                 messageSending:Boolean = true,
                 messageReceiving:Boolean = true,
                 proxieMapping:Boolean = false
                ):void
Dungeon viewer example
Modular programming
pitfalls
●   Planning is needed
●   Good module should be able to stand
    as application on its own
    –   Chat window
    –   Stand alone tutorial
●   Worst case scenario: extracting
    module/reintegrating module refactoring.
mvcExpress live
mvcExpress live
●   mvcExpress live = mvcExpress + game engine

    –   Continuous logic execution
    –   Dynamic animations
    –   Breaking execution in parts. (batching)

●   Compatible with mvcExpress
mvcExress live diagram
mvcExress live diagram
mvcExress live diagram
mvcExress live diagram
mvcExress live diagram
mvcExress live diagram
mvcExress live diagram
package com.mindscriptact.testProject.engine {                   Process example
public class GameEngineProcess extends Process {

     override protected function onRegister():void {
         addTask(MoveHeroTask);
         addTask(MoveEnemiesTask);
         addTask(HeroCollideEnemiesTask);
         addTask(EnemySpawnTask);
         addTask(ShowHeroTask);
         addTask(ShowEnemiesTask);

         addHandler(Message.PAUSE_GAME, handleGamePause);
     }

     private function handleGamePause(isPaused:Boolean):void {
         if (isPaused) {
             disableTask(MoveHeroTask);
             disableTask(MoveEnemiesTask);
         } else {
             enableTask(MoveHeroTask);
             enableTask(MoveEnemiesTask);
         }
     }
}}
Task example

package com.mindscriptact.testProject.engine.tasks {
public class ShowEnemiesTask extends Task {

     [Inject(name="enemyDatas")]
     public var enemyDatas:Vector.<EnemyVO>;

     [Inject(name="enemyViews")]
     public var enemyImages:Vector.<EnemySprite>;

     override public function run():void {
        for (var i:int = 0; i < enemyDatas.length; i++) {
            enemyImages[i].x = enemyDatas[i].x;
            enemyImages[i].y = enemyDatas[i].y;
            enemyImages[i].rotation = enemyDatas[i].rotations;
        }
     }
}}
mvcExpress live testing
package com.mindscriptact.testProject.engine.tasks {

public class ShowEnemiesTask extends Task {

     [Inject(name="enemyDatas")]
     public var enemyDatas:Vector.<EnemyVO>;

     [Inject(name="enemyViews")]
     public var enemyImages:Vector.<EnemySprite>;

     override public function run():void {
          for (var i:int = 0; i < enemyDatas.length; i++) {
               enemyImages[i].x = enemyDatas[i].x;
               enemyImages[i].y = enemyDatas[i].y;
               enemyImages[i].rotation = enemyDatas[i].rotations;
          }
     }

     [Test]
     public function showEnemiesTask_enemyViewAndDataCount_isEqual():void {
            assert.equals(enemyDatas.length, enemyImages.length, "Enemies data and view count must be the same!");
     }

     [Test(delay="500")]
     public function showEnemiesTask_enemyViewAndDataPosition_isEqual():void {
           for (var i:int = 0; i < enemyDatas.length; i++) {
                  assert.equals(enemyImages[i].x, enemyDatas[i].x, "Enemy x is damaged. enemyId:" + enemyDatas[i].id);
                  assert.equals(enemyImages[i].y, enemyDatas[i].y, "Enemy y is damaged. enemyId:" + enemyDatas[i].id);
           }
     }

}}
Process run speed


●   Best case:
    – Runs   1000000 empty Task's in 17 ms
    – 58823   empty tasks in 1 ms
●   Worst case:
    – 13300   empty tasks in 1 ms
mvcExpress live overview

●   Designed with games in mind but can be used in any
    application than has repeating logic to run.
●   Processes and Task's are decoupled
●   Convenient communication with MVC
●   It is possible to break Model and View decoupling
    rules, but gives tools to detect it.
●   It is fast!
●   It just works!
On learning 
   curve
On learning curve

●   MVC framework initial learning curve is steep...
●   But if you learned one – learning another is easy!


     http://mvcexpress.org/documentation/

     https://github.com/MindScriptAct/mvcExpress-examples


     Also I do workshops.
mvcExpress logger
Links

http://mvcexpress.org/

https://github.com/MindScriptAct/mvcExpress-framework
https://github.com/MindScriptAct/mvcExpress-examples
https://github.com/MindScriptAct/mvcExpress-downloads

                                                    http://puremvc.org/

                                              http://www.robotlegs.org/

Raimundas Banevicius
Blog : http://www.mindscriptact.com/
Twitter : @Deril
E-mail : raima156@yahoo.com
                 Thank you for your time!
                        Questions?
Links

http://mvcexpress.org/

https://github.com/MindScriptAct/mvcExpress-framework
https://github.com/MindScriptAct/mvcExpress-examples
https://github.com/MindScriptAct/mvcExpress-downloads

                                                    http://puremvc.org/

                                              http://www.robotlegs.org/

Raimundas Banevicius
Blog : http://www.mindscriptact.com/
Twitter : @Deril
E-mail : raima156@yahoo.com

                             Questions?
Links

http://mvcexpress.org/

https://github.com/MindScriptAct/mvcExpress-framework
https://github.com/MindScriptAct/mvcExpress-examples
https://github.com/MindScriptAct/mvcExpress-downloads

                                                    http://puremvc.org/

                                              http://www.robotlegs.org/

Raimundas Banevicius
Blog : http://www.mindscriptact.com/
Twitter : @Deril
E-mail : raima156@yahoo.com

                             Questions?

Más contenido relacionado

La actualidad más candente

Dalvik Source Code Reading
Dalvik Source Code ReadingDalvik Source Code Reading
Dalvik Source Code Readingkishima7
 
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
 
Groovy, Transforming Language
Groovy, Transforming LanguageGroovy, Transforming Language
Groovy, Transforming LanguageUehara Junji
 
Fault Tolerance in a High Volume, Distributed System
Fault Tolerance in a  High Volume, Distributed SystemFault Tolerance in a  High Volume, Distributed System
Fault Tolerance in a High Volume, Distributed SystemBen Christensen
 
OSGi and Eclipse RCP
OSGi and Eclipse RCPOSGi and Eclipse RCP
OSGi and Eclipse RCPEric Jain
 
How to build to do app using vue composition api and vuex 4 with typescript
How to build to do app using vue composition api and vuex 4 with typescriptHow to build to do app using vue composition api and vuex 4 with typescript
How to build to do app using vue composition api and vuex 4 with typescriptKaty Slemon
 
Command and Adapter Pattern
Command and Adapter PatternCommand and Adapter Pattern
Command and Adapter PatternJonathan Simon
 
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
 
Petcube epic battle: architecture vs product. UA Mobile 2017.
Petcube epic battle: architecture vs product. UA Mobile 2017.Petcube epic battle: architecture vs product. UA Mobile 2017.
Petcube epic battle: architecture vs product. UA Mobile 2017.UA Mobile
 
Java Concurrency and Asynchronous
Java Concurrency and AsynchronousJava Concurrency and Asynchronous
Java Concurrency and AsynchronousLifan Yang
 
Gradle talk, Javarsovia 2010
Gradle talk, Javarsovia 2010Gradle talk, Javarsovia 2010
Gradle talk, Javarsovia 2010Tomek Kaczanowski
 
Knock, knock, who is there? Doze.
Knock, knock, who is there? Doze.Knock, knock, who is there? Doze.
Knock, knock, who is there? Doze.Yonatan Levin
 

La actualidad más candente (14)

Dalvik Source Code Reading
Dalvik Source Code ReadingDalvik Source Code Reading
Dalvik Source Code Reading
 
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
 
Groovy, Transforming Language
Groovy, Transforming LanguageGroovy, Transforming Language
Groovy, Transforming Language
 
JEE.next()
JEE.next()JEE.next()
JEE.next()
 
Fault Tolerance in a High Volume, Distributed System
Fault Tolerance in a  High Volume, Distributed SystemFault Tolerance in a  High Volume, Distributed System
Fault Tolerance in a High Volume, Distributed System
 
OSGi and Eclipse RCP
OSGi and Eclipse RCPOSGi and Eclipse RCP
OSGi and Eclipse RCP
 
How to build to do app using vue composition api and vuex 4 with typescript
How to build to do app using vue composition api and vuex 4 with typescriptHow to build to do app using vue composition api and vuex 4 with typescript
How to build to do app using vue composition api and vuex 4 with typescript
 
Command and Adapter Pattern
Command and Adapter PatternCommand and Adapter Pattern
Command and Adapter Pattern
 
Vm
VmVm
Vm
 
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
 
Petcube epic battle: architecture vs product. UA Mobile 2017.
Petcube epic battle: architecture vs product. UA Mobile 2017.Petcube epic battle: architecture vs product. UA Mobile 2017.
Petcube epic battle: architecture vs product. UA Mobile 2017.
 
Java Concurrency and Asynchronous
Java Concurrency and AsynchronousJava Concurrency and Asynchronous
Java Concurrency and Asynchronous
 
Gradle talk, Javarsovia 2010
Gradle talk, Javarsovia 2010Gradle talk, Javarsovia 2010
Gradle talk, Javarsovia 2010
 
Knock, knock, who is there? Doze.
Knock, knock, who is there? Doze.Knock, knock, who is there? Doze.
Knock, knock, who is there? Doze.
 

Similar a The Next Step in AS3 Framework Evolution

Architecting ActionScript 3 applications using PureMVC
Architecting ActionScript 3 applications using PureMVCArchitecting ActionScript 3 applications using PureMVC
Architecting ActionScript 3 applications using PureMVCmarcocasario
 
Architecture your android_application
Architecture your android_applicationArchitecture your android_application
Architecture your android_applicationMark Brady
 
Android Architecture Components
Android Architecture ComponentsAndroid Architecture Components
Android Architecture ComponentsBurhanuddinRashid
 
Building non-blocking JavaFX 8 applications with JacpFX [CON1823]
Building non-blocking JavaFX 8 applications with JacpFX [CON1823]Building non-blocking JavaFX 8 applications with JacpFX [CON1823]
Building non-blocking JavaFX 8 applications with JacpFX [CON1823]Andy Moncsek
 
Spring mvc my Faviourite Slide
Spring mvc my Faviourite SlideSpring mvc my Faviourite Slide
Spring mvc my Faviourite SlideDaniel Adenew
 
RL2 Dot Brighton
RL2 Dot BrightonRL2 Dot Brighton
RL2 Dot BrightonShaun Smith
 
What's new in Android P @ I/O Extended Bangkok 2018
What's new in Android P @ I/O Extended Bangkok 2018What's new in Android P @ I/O Extended Bangkok 2018
What's new in Android P @ I/O Extended Bangkok 2018Somkiat Khitwongwattana
 
Taming startup dynamics - Magnus Jungsbluth & Domagoj Cosic
Taming startup dynamics - Magnus Jungsbluth & Domagoj CosicTaming startup dynamics - Magnus Jungsbluth & Domagoj Cosic
Taming startup dynamics - Magnus Jungsbluth & Domagoj Cosicmfrancis
 
4Developers: Dominik Przybysz- Message Brokers
4Developers: Dominik Przybysz- Message Brokers4Developers: Dominik Przybysz- Message Brokers
4Developers: Dominik Przybysz- Message BrokersPROIDEA
 
DDD Framework for Java: JdonFramework
DDD Framework for Java: JdonFrameworkDDD Framework for Java: JdonFramework
DDD Framework for Java: JdonFrameworkbanq jdon
 
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
 
softshake 2014 - Java EE
softshake 2014 - Java EEsoftshake 2014 - Java EE
softshake 2014 - Java EEAlexis Hassler
 
JEDI Slides-Intro2-Chapter20-GUI Event Handling.pdf
JEDI Slides-Intro2-Chapter20-GUI Event Handling.pdfJEDI Slides-Intro2-Chapter20-GUI Event Handling.pdf
JEDI Slides-Intro2-Chapter20-GUI Event Handling.pdfMarlouFelixIIICunana
 
Google Web Toolkits
Google Web ToolkitsGoogle Web Toolkits
Google Web ToolkitsYiguang Hu
 
React for Re-use: Creating UI Components with Confluence Connect
React for Re-use: Creating UI Components with Confluence ConnectReact for Re-use: Creating UI Components with Confluence Connect
React for Re-use: Creating UI Components with Confluence ConnectAtlassian
 
Spring Performance Gains
Spring Performance GainsSpring Performance Gains
Spring Performance GainsVMware Tanzu
 
TDC2017 | São Paulo - Trilha Android How we figured out we had a SRE team at ...
TDC2017 | São Paulo - Trilha Android How we figured out we had a SRE team at ...TDC2017 | São Paulo - Trilha Android How we figured out we had a SRE team at ...
TDC2017 | São Paulo - Trilha Android How we figured out we had a SRE team at ...tdc-globalcode
 
Architecting Single Activity Applications (With or Without Fragments)
Architecting Single Activity Applications (With or Without Fragments)Architecting Single Activity Applications (With or Without Fragments)
Architecting Single Activity Applications (With or Without Fragments)Gabor Varadi
 

Similar a The Next Step in AS3 Framework Evolution (20)

Architecting ActionScript 3 applications using PureMVC
Architecting ActionScript 3 applications using PureMVCArchitecting ActionScript 3 applications using PureMVC
Architecting ActionScript 3 applications using PureMVC
 
Architecture your android_application
Architecture your android_applicationArchitecture your android_application
Architecture your android_application
 
Android Architecture Components
Android Architecture ComponentsAndroid Architecture Components
Android Architecture Components
 
Building non-blocking JavaFX 8 applications with JacpFX [CON1823]
Building non-blocking JavaFX 8 applications with JacpFX [CON1823]Building non-blocking JavaFX 8 applications with JacpFX [CON1823]
Building non-blocking JavaFX 8 applications with JacpFX [CON1823]
 
Spring mvc my Faviourite Slide
Spring mvc my Faviourite SlideSpring mvc my Faviourite Slide
Spring mvc my Faviourite Slide
 
C#on linux
C#on linuxC#on linux
C#on linux
 
RL2 Dot Brighton
RL2 Dot BrightonRL2 Dot Brighton
RL2 Dot Brighton
 
What's new in Android P @ I/O Extended Bangkok 2018
What's new in Android P @ I/O Extended Bangkok 2018What's new in Android P @ I/O Extended Bangkok 2018
What's new in Android P @ I/O Extended Bangkok 2018
 
Devoxx 2012 (v2)
Devoxx 2012 (v2)Devoxx 2012 (v2)
Devoxx 2012 (v2)
 
Taming startup dynamics - Magnus Jungsbluth & Domagoj Cosic
Taming startup dynamics - Magnus Jungsbluth & Domagoj CosicTaming startup dynamics - Magnus Jungsbluth & Domagoj Cosic
Taming startup dynamics - Magnus Jungsbluth & Domagoj Cosic
 
4Developers: Dominik Przybysz- Message Brokers
4Developers: Dominik Przybysz- Message Brokers4Developers: Dominik Przybysz- Message Brokers
4Developers: Dominik Przybysz- Message Brokers
 
DDD Framework for Java: JdonFramework
DDD Framework for Java: JdonFrameworkDDD Framework for Java: JdonFramework
DDD Framework for Java: JdonFramework
 
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
 
softshake 2014 - Java EE
softshake 2014 - Java EEsoftshake 2014 - Java EE
softshake 2014 - Java EE
 
JEDI Slides-Intro2-Chapter20-GUI Event Handling.pdf
JEDI Slides-Intro2-Chapter20-GUI Event Handling.pdfJEDI Slides-Intro2-Chapter20-GUI Event Handling.pdf
JEDI Slides-Intro2-Chapter20-GUI Event Handling.pdf
 
Google Web Toolkits
Google Web ToolkitsGoogle Web Toolkits
Google Web Toolkits
 
React for Re-use: Creating UI Components with Confluence Connect
React for Re-use: Creating UI Components with Confluence ConnectReact for Re-use: Creating UI Components with Confluence Connect
React for Re-use: Creating UI Components with Confluence Connect
 
Spring Performance Gains
Spring Performance GainsSpring Performance Gains
Spring Performance Gains
 
TDC2017 | São Paulo - Trilha Android How we figured out we had a SRE team at ...
TDC2017 | São Paulo - Trilha Android How we figured out we had a SRE team at ...TDC2017 | São Paulo - Trilha Android How we figured out we had a SRE team at ...
TDC2017 | São Paulo - Trilha Android How we figured out we had a SRE team at ...
 
Architecting Single Activity Applications (With or Without Fragments)
Architecting Single Activity Applications (With or Without Fragments)Architecting Single Activity Applications (With or Without Fragments)
Architecting Single Activity Applications (With or Without Fragments)
 

Más de FITC

Cut it up
Cut it upCut it up
Cut it upFITC
 
Designing for Digital Health
Designing for Digital HealthDesigning for Digital Health
Designing for Digital HealthFITC
 
Profiling JavaScript Performance
Profiling JavaScript PerformanceProfiling JavaScript Performance
Profiling JavaScript PerformanceFITC
 
Surviving Your Tech Stack
Surviving Your Tech StackSurviving Your Tech Stack
Surviving Your Tech StackFITC
 
How to Pitch Your First AR Project
How to Pitch Your First AR ProjectHow to Pitch Your First AR Project
How to Pitch Your First AR ProjectFITC
 
Start by Understanding the Problem, Not by Delivering the Answer
Start by Understanding the Problem, Not by Delivering the AnswerStart by Understanding the Problem, Not by Delivering the Answer
Start by Understanding the Problem, Not by Delivering the AnswerFITC
 
Cocaine to Carrots: The Art of Telling Someone Else’s Story
Cocaine to Carrots: The Art of Telling Someone Else’s StoryCocaine to Carrots: The Art of Telling Someone Else’s Story
Cocaine to Carrots: The Art of Telling Someone Else’s StoryFITC
 
Everyday Innovation
Everyday InnovationEveryday Innovation
Everyday InnovationFITC
 
HyperLight Websites
HyperLight WebsitesHyperLight Websites
HyperLight WebsitesFITC
 
Everything is Terrifying
Everything is TerrifyingEverything is Terrifying
Everything is TerrifyingFITC
 
Post-Earth Visions: Designing for Space and the Future Human
Post-Earth Visions: Designing for Space and the Future HumanPost-Earth Visions: Designing for Space and the Future Human
Post-Earth Visions: Designing for Space and the Future HumanFITC
 
The Rise of the Creative Social Influencer (and How to Become One)
The Rise of the Creative Social Influencer (and How to Become One)The Rise of the Creative Social Influencer (and How to Become One)
The Rise of the Creative Social Influencer (and How to Become One)FITC
 
East of the Rockies: Developing an AR Game
East of the Rockies: Developing an AR GameEast of the Rockies: Developing an AR Game
East of the Rockies: Developing an AR GameFITC
 
Creating a Proactive Healthcare System
Creating a Proactive Healthcare SystemCreating a Proactive Healthcare System
Creating a Proactive Healthcare SystemFITC
 
World Transformation: The Secret Agenda of Product Design
World Transformation: The Secret Agenda of Product DesignWorld Transformation: The Secret Agenda of Product Design
World Transformation: The Secret Agenda of Product DesignFITC
 
The Power of Now
The Power of NowThe Power of Now
The Power of NowFITC
 
High Performance PWAs
High Performance PWAsHigh Performance PWAs
High Performance PWAsFITC
 
Rise of the JAMstack
Rise of the JAMstackRise of the JAMstack
Rise of the JAMstackFITC
 
From Closed to Open: A Journey of Self Discovery
From Closed to Open: A Journey of Self DiscoveryFrom Closed to Open: A Journey of Self Discovery
From Closed to Open: A Journey of Self DiscoveryFITC
 
Projects Ain’t Nobody Got Time For
Projects Ain’t Nobody Got Time ForProjects Ain’t Nobody Got Time For
Projects Ain’t Nobody Got Time ForFITC
 

Más de FITC (20)

Cut it up
Cut it upCut it up
Cut it up
 
Designing for Digital Health
Designing for Digital HealthDesigning for Digital Health
Designing for Digital Health
 
Profiling JavaScript Performance
Profiling JavaScript PerformanceProfiling JavaScript Performance
Profiling JavaScript Performance
 
Surviving Your Tech Stack
Surviving Your Tech StackSurviving Your Tech Stack
Surviving Your Tech Stack
 
How to Pitch Your First AR Project
How to Pitch Your First AR ProjectHow to Pitch Your First AR Project
How to Pitch Your First AR Project
 
Start by Understanding the Problem, Not by Delivering the Answer
Start by Understanding the Problem, Not by Delivering the AnswerStart by Understanding the Problem, Not by Delivering the Answer
Start by Understanding the Problem, Not by Delivering the Answer
 
Cocaine to Carrots: The Art of Telling Someone Else’s Story
Cocaine to Carrots: The Art of Telling Someone Else’s StoryCocaine to Carrots: The Art of Telling Someone Else’s Story
Cocaine to Carrots: The Art of Telling Someone Else’s Story
 
Everyday Innovation
Everyday InnovationEveryday Innovation
Everyday Innovation
 
HyperLight Websites
HyperLight WebsitesHyperLight Websites
HyperLight Websites
 
Everything is Terrifying
Everything is TerrifyingEverything is Terrifying
Everything is Terrifying
 
Post-Earth Visions: Designing for Space and the Future Human
Post-Earth Visions: Designing for Space and the Future HumanPost-Earth Visions: Designing for Space and the Future Human
Post-Earth Visions: Designing for Space and the Future Human
 
The Rise of the Creative Social Influencer (and How to Become One)
The Rise of the Creative Social Influencer (and How to Become One)The Rise of the Creative Social Influencer (and How to Become One)
The Rise of the Creative Social Influencer (and How to Become One)
 
East of the Rockies: Developing an AR Game
East of the Rockies: Developing an AR GameEast of the Rockies: Developing an AR Game
East of the Rockies: Developing an AR Game
 
Creating a Proactive Healthcare System
Creating a Proactive Healthcare SystemCreating a Proactive Healthcare System
Creating a Proactive Healthcare System
 
World Transformation: The Secret Agenda of Product Design
World Transformation: The Secret Agenda of Product DesignWorld Transformation: The Secret Agenda of Product Design
World Transformation: The Secret Agenda of Product Design
 
The Power of Now
The Power of NowThe Power of Now
The Power of Now
 
High Performance PWAs
High Performance PWAsHigh Performance PWAs
High Performance PWAs
 
Rise of the JAMstack
Rise of the JAMstackRise of the JAMstack
Rise of the JAMstack
 
From Closed to Open: A Journey of Self Discovery
From Closed to Open: A Journey of Self DiscoveryFrom Closed to Open: A Journey of Self Discovery
From Closed to Open: A Journey of Self Discovery
 
Projects Ain’t Nobody Got Time For
Projects Ain’t Nobody Got Time ForProjects Ain’t Nobody Got Time For
Projects Ain’t Nobody Got Time For
 

Último

办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书zdzoqco
 
TRENDS Enabling and inhibiting dimensions.pptx
TRENDS Enabling and inhibiting dimensions.pptxTRENDS Enabling and inhibiting dimensions.pptx
TRENDS Enabling and inhibiting dimensions.pptxAndrieCagasanAkio
 
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书rnrncn29
 
Top 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxTop 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxDyna Gilbert
 
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书rnrncn29
 
SCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is prediSCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is predieusebiomeyer
 
IP addressing and IPv6, presented by Paul Wilson at IETF 119
IP addressing and IPv6, presented by Paul Wilson at IETF 119IP addressing and IPv6, presented by Paul Wilson at IETF 119
IP addressing and IPv6, presented by Paul Wilson at IETF 119APNIC
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa494f574xmv
 
ETHICAL HACKING dddddddddddddddfnandni.pptx
ETHICAL HACKING dddddddddddddddfnandni.pptxETHICAL HACKING dddddddddddddddfnandni.pptx
ETHICAL HACKING dddddddddddddddfnandni.pptxNIMMANAGANTI RAMAKRISHNA
 
Unidad 4 – Redes de ordenadores (en inglés).pptx
Unidad 4 – Redes de ordenadores (en inglés).pptxUnidad 4 – Redes de ordenadores (en inglés).pptx
Unidad 4 – Redes de ordenadores (en inglés).pptxmibuzondetrabajo
 
Company Snapshot Theme for Business by Slidesgo.pptx
Company Snapshot Theme for Business by Slidesgo.pptxCompany Snapshot Theme for Business by Slidesgo.pptx
Company Snapshot Theme for Business by Slidesgo.pptxMario
 

Último (11)

办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
 
TRENDS Enabling and inhibiting dimensions.pptx
TRENDS Enabling and inhibiting dimensions.pptxTRENDS Enabling and inhibiting dimensions.pptx
TRENDS Enabling and inhibiting dimensions.pptx
 
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
 
Top 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxTop 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptx
 
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
 
SCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is prediSCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is predi
 
IP addressing and IPv6, presented by Paul Wilson at IETF 119
IP addressing and IPv6, presented by Paul Wilson at IETF 119IP addressing and IPv6, presented by Paul Wilson at IETF 119
IP addressing and IPv6, presented by Paul Wilson at IETF 119
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa
 
ETHICAL HACKING dddddddddddddddfnandni.pptx
ETHICAL HACKING dddddddddddddddfnandni.pptxETHICAL HACKING dddddddddddddddfnandni.pptx
ETHICAL HACKING dddddddddddddddfnandni.pptx
 
Unidad 4 – Redes de ordenadores (en inglés).pptx
Unidad 4 – Redes de ordenadores (en inglés).pptxUnidad 4 – Redes de ordenadores (en inglés).pptx
Unidad 4 – Redes de ordenadores (en inglés).pptx
 
Company Snapshot Theme for Business by Slidesgo.pptx
Company Snapshot Theme for Business by Slidesgo.pptxCompany Snapshot Theme for Business by Slidesgo.pptx
Company Snapshot Theme for Business by Slidesgo.pptx
 

The Next Step in AS3 Framework Evolution

  • 2. About me Raimundas Banevicius Senior AS3 Developer Working with Flash from 2001 Author of open source AS3 framework – mvcExpress Blog : http://www.mindscriptact.com/ Twitter : @Deril E-mail : raima156@yahoo.com
  • 3. About this presentation ● AS3 framework evolution ● Modular programming in mvcExpress ● mvcExpress live
  • 4. AS3 framework  evolution
  • 5. AS3 framework history (ActionScript 3.0 released in 2006) ●PureMVC (2006) ●Cairngorm (2007?) [flex only] ●Springactionscript (2007) ●Parsley(2008) ●Mate(2008) [flex only] ●Robotlegs(2009) ●Swiz(2009) [flex only] ●mvcExpress(2012) ●Robotlegs 2 (2012) (in beta)
  • 6. AS3 framework history (ActionScript 3.0 released in 2006) ●PureMVC (2006) ●Cairngorm (2007?) [flex only] ●Springactionscript (2007) ●Parsley(2008) ●Mate(2008) [flex only] ●Robotlegs(2009) ●Swiz(2009) [flex only] ●mvcExpress(2012) ●Robotlegs 2 (2012) (in beta)
  • 7. AS3 framework history (ActionScript 3.0 released in 2006) ●PureMVC (2006) ●Cairngorm (2007?) [flex only] ●Springactionscript (2007) ●Parsley(2008) ●Mate(2008) [flex only] ●Robotlegs(2009) ●Swiz(2009) [flex only] ●mvcExpress(2012) ●Robotlegs 2 (2012) (in beta)
  • 8. PureMVC The good The bad ● Organize your code in small units ● Slightly hurts performance ● Let those units communicate ● Built on static classes ● Standardize your code ● Focus on app instead of architecture ● Lots of boilerplate code ● Ported to many languages Can it be done simpler?
  • 9. robotlegs The good The bad ● All PureMVC goodness. ● Hurts performance a lot! ● Removed most boilerplate code ● Introduces dependency injection Can it be done simpler... and run fast?
  • 10. robotlegs 2 (beta) The good The bad ● Highly configurable ● Adds some boilerplate code ● Modular ● Code less standardized ● Guards, hooks, rules. ● Hurts performance a lot (and more) Can it be done simpler... and run fast?
  • 11. mvcExpress The good The bad ● All PureMVC and robotlegs ● Hurts performance the least goodness. ● Young framework ● Focus on modular development ● Simplifies code even more Simplest and fastest MVC framework!
  • 12. package { pureMVC mediator 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; } }}
  • 13. package { pureMVC mediator 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; } }}
  • 14. package { pureMVC mediator 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; } }}
  • 15. package { pureMVC mediator 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; } }}
  • 16. mvcExress mediator package { public class MvcExpressMediator extends Mediator { [Inject] public var view:ViewComponent; override public function onRegister():void { // listen for framework events addHandler(DataMessage.STUFF_DONE, handleStuffDone); } // handle framework events private function handleStuffDone(params:DataChangeParamsVO):void { view.showStuff(params.dataParam1); } }}
  • 17. mvcExress mediator package { public class MvcExpressMediator extends Mediator { [Inject] public var view:ViewComponent; override public function onRegister():void { // listen for framework events addHandler(DataMessage.STUFF_DONE, handleStuffDone); } // handle framework events private function handleStuffDone(params:DataChangeParamsVO):void { view.showStuff(params.dataParam1); } }}
  • 18. mvcExress mediator package { public class MvcExpressMediator extends Mediator { [Inject] public var view:ViewComponent; override public function onRegister():void { // listen for framework events addHandler(DataMessage.STUFF_DONE, handleStuffDone); } // handle framework events private function handleStuffDone(params:DataChangeParamsVO):void { view.showStuff(params.dataParam1); } }}
  • 19. mvcExress mediator package { public class MvcExpressMediator extends Mediator { [Inject] public var view:ViewComponent; override public function onRegister():void { // listen for framework events addHandler(DataMessage.STUFF_DONE, handleStuffDone); } // handle framework events private function handleStuffDone(params:DataChangeParamsVO):void { view.showStuff(params.dataParam1); } }}
  • 20. Speed test data mvcExpress pureMVC robotlegs robotlegs 2 Command creation and execution: 0.00087 0.00219 0.00866 0.01894 1.0 /2.5 /10.0 /21.8 Proxy inject into command: 0.00037 0.00024 0.00491 0.00247 1.0 /0.7 /13.2 /6.6 Mediator create: 0.02100 0.02100 0.05100 0.13600 1.0 /1.0 /2.4 /6.5 https://github.com/MindScriptAct/as3-mvcFramework-performanceTest Mediator remove: 0.01700 0.10300 0.01850 0.05550 1.0 /6.1 /1.1 /3.3 Communication 1 to 1: 0.00030 0.00060 0.00153 0.00141 1.0 /2.0 /5.0 /4.6 Communication 1 to 10: 0.00073 0.00788 0.00670 0.00629 1.0 /10.9 /9.2 /8.7 Communication 1 to 100: 0.00480 0.06897 0.05746 0.05071 1.0 /14.4 /12.0 /10.6
  • 21. Command performance Command runs /1ms pureMVC robotlegs robotlegs 2 mvcExpress mvcExpress (pooled) Command with nothing: 495.0 109.3 55.3 1010.1 1754.4 Command with 1 inject: 487.5 70.4 49.6 961.5 1694.9 Command with 2 injects: 458.7 58.6 47.2 724.6 1724.1 Command with 4 injects: 340.1 44.1 42.7 480.8 1783.3
  • 22. Communication performance Direct communication: runs /1ms 1 parameter 5 parameters Events: 688 654 Signals: 1116 741 Callback: 28571 10416 Indirect communication: runs /1ms 1 parameter 5 parameters PureMvc notifications: 552 454 robotlegs events: 652 622 mvcExpress messages: 5464 2584
  • 25. Modular programming features ● Aggregation ● Communication ● Dependencies(data) ● Permission control (v1.4)
  • 26. Aggregation var moduleB:ModuleB = new ModuleB(); view.addChild(moduleB); mediatorMap.mediate(moduleB);
  • 29. Module communication sendScopeMessage("scopeName", "messageType", new ParamObject()); addScopeHandler("scopeName", "messageType", scopedMessageHandrlerFunction);
  • 30. Module data sharing (data dependencies)
  • 31. Module data sharing (data dependencies)
  • 32. Module data sharing (data dependencies) proxyMap.scopeMap("scopeName", myProxyObject); [Inject(scope="scopeName")] public var myProxy:MyProxy;
  • 33. Scope permissions registerScope(scopeName:String, messageSending:Boolean = true, messageReceiving:Boolean = true, proxieMapping:Boolean = false ):void
  • 35. Modular programming pitfalls ● Planning is needed ● Good module should be able to stand as application on its own – Chat window – Stand alone tutorial ● Worst case scenario: extracting module/reintegrating module refactoring.
  • 37. mvcExpress live ● mvcExpress live = mvcExpress + game engine – Continuous logic execution – Dynamic animations – Breaking execution in parts. (batching) ● Compatible with mvcExpress
  • 45. package com.mindscriptact.testProject.engine { Process example public class GameEngineProcess extends Process { override protected function onRegister():void { addTask(MoveHeroTask); addTask(MoveEnemiesTask); addTask(HeroCollideEnemiesTask); addTask(EnemySpawnTask); addTask(ShowHeroTask); addTask(ShowEnemiesTask); addHandler(Message.PAUSE_GAME, handleGamePause); } private function handleGamePause(isPaused:Boolean):void { if (isPaused) { disableTask(MoveHeroTask); disableTask(MoveEnemiesTask); } else { enableTask(MoveHeroTask); enableTask(MoveEnemiesTask); } } }}
  • 46. Task example package com.mindscriptact.testProject.engine.tasks { public class ShowEnemiesTask extends Task { [Inject(name="enemyDatas")] public var enemyDatas:Vector.<EnemyVO>; [Inject(name="enemyViews")] public var enemyImages:Vector.<EnemySprite>; override public function run():void { for (var i:int = 0; i < enemyDatas.length; i++) { enemyImages[i].x = enemyDatas[i].x; enemyImages[i].y = enemyDatas[i].y; enemyImages[i].rotation = enemyDatas[i].rotations; } } }}
  • 47. mvcExpress live testing package com.mindscriptact.testProject.engine.tasks { public class ShowEnemiesTask extends Task { [Inject(name="enemyDatas")] public var enemyDatas:Vector.<EnemyVO>; [Inject(name="enemyViews")] public var enemyImages:Vector.<EnemySprite>; override public function run():void { for (var i:int = 0; i < enemyDatas.length; i++) { enemyImages[i].x = enemyDatas[i].x; enemyImages[i].y = enemyDatas[i].y; enemyImages[i].rotation = enemyDatas[i].rotations; } } [Test] public function showEnemiesTask_enemyViewAndDataCount_isEqual():void { assert.equals(enemyDatas.length, enemyImages.length, "Enemies data and view count must be the same!"); } [Test(delay="500")] public function showEnemiesTask_enemyViewAndDataPosition_isEqual():void { for (var i:int = 0; i < enemyDatas.length; i++) { assert.equals(enemyImages[i].x, enemyDatas[i].x, "Enemy x is damaged. enemyId:" + enemyDatas[i].id); assert.equals(enemyImages[i].y, enemyDatas[i].y, "Enemy y is damaged. enemyId:" + enemyDatas[i].id); } } }}
  • 48. Process run speed ● Best case: – Runs 1000000 empty Task's in 17 ms – 58823 empty tasks in 1 ms ● Worst case: – 13300 empty tasks in 1 ms
  • 49. mvcExpress live overview ● Designed with games in mind but can be used in any application than has repeating logic to run. ● Processes and Task's are decoupled ● Convenient communication with MVC ● It is possible to break Model and View decoupling rules, but gives tools to detect it. ● It is fast! ● It just works!
  • 50. On learning  curve
  • 51. On learning curve ● MVC framework initial learning curve is steep... ● But if you learned one – learning another is easy! http://mvcexpress.org/documentation/ https://github.com/MindScriptAct/mvcExpress-examples Also I do workshops.
  • 53. Links http://mvcexpress.org/ https://github.com/MindScriptAct/mvcExpress-framework https://github.com/MindScriptAct/mvcExpress-examples https://github.com/MindScriptAct/mvcExpress-downloads http://puremvc.org/ http://www.robotlegs.org/ Raimundas Banevicius Blog : http://www.mindscriptact.com/ Twitter : @Deril E-mail : raima156@yahoo.com Thank you for your time! Questions?
  • 54. Links http://mvcexpress.org/ https://github.com/MindScriptAct/mvcExpress-framework https://github.com/MindScriptAct/mvcExpress-examples https://github.com/MindScriptAct/mvcExpress-downloads http://puremvc.org/ http://www.robotlegs.org/ Raimundas Banevicius Blog : http://www.mindscriptact.com/ Twitter : @Deril E-mail : raima156@yahoo.com Questions?
  • 55. Links http://mvcexpress.org/ https://github.com/MindScriptAct/mvcExpress-framework https://github.com/MindScriptAct/mvcExpress-examples https://github.com/MindScriptAct/mvcExpress-downloads http://puremvc.org/ http://www.robotlegs.org/ Raimundas Banevicius Blog : http://www.mindscriptact.com/ Twitter : @Deril E-mail : raima156@yahoo.com Questions?