SlideShare une entreprise Scribd logo
1  sur  18
Télécharger pour lire hors ligne
mvcExpress
 (simplest and fastest ActionScript 3 MVC framework)



 training course


Raimundas Banevicius
raima156@yahoo.com
senior flash developer
2012.03.24
About me

●   Hi, My name is Raimundas Banevicius, and I love flash!

●   I work with flash technology from 2000.07

●   I work as senior flash developer, and I build big multiplayer games

●   I rely heavily on tools and frameworks to make my work manageable and to stay productive

●   In the past I used PureMVC, Robotlegs to build games, but discovered a lot of things I don't like
    about those framework.

●   I build mvcExpress framework to solve those problems.
About this course
●   You will learn:

    ○     How to create applications using mvcExpress framework
    ○     MVC pattern theory and practice
    ○     different ways you can approach your problems, and help you pick one that suits your
          situation better.


●   You will NOT learn:

    ○     basics of ActionScript 3 programming.
    ○     Object oriented programming.



●   You don't need any knowledge of other frameworks.
Learning curve
●   Most frameworks has steep initial learning curve...

●   ...but then you done with it - you will fly!




●   Basic concepts are easy... but grasping all of them at once is challenging

    ○     learn in in small pieces! Don't try to fit everything in your head from the start!
    ○     give some time for those small pieces sit in your head.



●   you need to learn think in MVC pattern. Not only know MVC. (It will take some time.)

●   don't forget to have fun! (start with small-fun application before starting big commercial projects)
MVC architecture

mvcExpress training course   part 1

Raimundas Banevicius
raima156@yahoo.com
senior flash developer
2012.03.24
What will be covered

●   What is MVC pattern
●   MVC parts
●   Model ,View, Controller overview
●   Communication overview
●   mvcExpress module overview
What is MVC pattern
●   MVC is architectural pattern used to construct your application.

    ○    it main purpose is separation of concerns to
          ■    data domain logic (Model)
          ■    view interaction and view domain logic (View)
          ■    business logic (Controller)
    ○    uses loose coupling (objects don't have to know each other to interact)
          ■    uses messaging system for that. (Events or Signals for example)
    ○    comes in many flavours
          ■    some implementations is more strict, some are more flexible and loose.
          ■    communications(direct and indirect) can be implemented differently
●   mvcExpress is framework that uses MVC principles and tries to pick a golden middle:
    ○    it leaves options on how to approach a problem but limits it enough to prevent a mess.
    ○    communications set not only for control but also with convenience in mind
MVC parts
Model                                                                 View
 ●   Stores data                                                      ●   handles user inputs
 ●   Provides data                                                    ●   shows view change
 ●   Gives a way to change data                                       ●   implements view domain
 ●   Implements data domain logic                                         logic




                                    Controller
                                     ●   implements application
                                         business logic

                                     ●   can reacts to view inputs
                                     ●   can reacts to data changes
mvcExpress Model
Model                              userName:String;

                                   moneyAmmount:int;


                                   mapLayout:MapLayoutVO;

                                   inventory:Vector.<ItemVO>;


                                   qualityLevel:String
                                   videoSettings:VideoSettingVO;




then we write application we have to deal with all kinds of data:
  ●    simple data. (like String and int),
  ●    various Value Object classes.
  ●    complex data, like collections, or compositions of other data.
mvcExpress Model
Model                             userName:String;                                 InventoryProxy
     UserProxy                    moneyAmmount:int;


                                  mapLayout:MapLayoutVO;

                                  inventory:Vector.<ItemVO>;
     MapProxy
                                                                                   SettingsProxy

                                  qualityLevel:String
                                  videoSettings:VideoSettingVO;




Model layer of MVC is implemented using Proxy design pattern.
 ●    data is aggregated and 'hidden' inside proxy class.


 ●    proxy provides set of public functions to work with data from outside:   (uses direct communication)
mvcExpress View
                                   menuBtn:Button;
View
                                   label:TextField;

                                   main:Sprite;

                                   mapLayout:Group;

                                   gameScreen:Sprite;
                                       -menuScreen:Sprite;
                                       -windowScreen:Sprite;

                                   playField:Sprite;
                                         -ships:Vector.<Ship>;




then we write application we have to deal with all kinds of view objects:
  ●    simple view objects, or components. (like Button's or TextField's)
  ●    containers that hold simple views or other containers.
  ●    containers that hold collections or arrays of other views.
mvcExpress View
                                 menuBtn:Button;
View
                                 label:TextField;
     MainMediator                                                       GameScreenMediator
                                 main:Sprite;

                                 mapLayout:Group;

                                 gameScreen:Sprite;
                                     -menuScreen:Sprite;
     MapMediator                     -windowScreen:Sprite;                 PlayFieldMediator

                                 playField:Sprite;
                                       -ships:Vector.<Ship>;



View layer of MVC is implemented using Mediator design pattern.


 ●     view object is aggregated and 'hidden' inside mediator class.
 ●     mediators does not mediate components(Button's. TextField's), instead they mediate component containers.
 ●     mediator mediates one and only one view object. (often with children of that view object)
 ●     mediator acts as a middleman for view objects communication with rest of application. (uses indirect
       communication)
mvcExpress Controller
                    function startNewGame(){
Controller                // change game state to represent new game
                    }

                    function handleChessMove(){
                          // check if move is valid,
                          // update game board data if it is.
                          // send message to show error if it is not.
                    }

                    function addFormData(){
                          // store new form data
                          // check if form is compleated
                          // if it is - change form data state to isCompleated = true...
                    }


Then we write application we need some code to do business logic for us, or in other words do 'thinking'.
We don't want logic code to be in the View or in the Model layers - we want it separated in Controller layer!
Best way is to imagine controller as set of functions, that work with application state, and do various tasks using
different parts of application.
mvcExpress Controller
                StartNewGameCommand
Controller
                      // change game state to represent new game

                HandleChessMoveCommand

                      // check if move is valid,
                      // update game board data if it is.
                      // send message to show error if it is not.

                AddFormDataCommand

                      // store new form data
                      // check if form is compleated
                      // if it is - change form data state to isCompleated = true...



Controller layer of MVC is implemented using Command design pattern.
 ●   Best way to look at it as class-function.
 ●   Command classes are created, performs one task(function), and dies.
mvcExpress parts, recap

Model                                                                View
                                                                     Deals with view objects by using
Deals with data by using Proxies.
                                                                     Mediators
    Proxy                                                                        Mediator
       Proxy                                                                        Mediator
            Proxy                                                                           Mediator




                                Controller
                                Deals with business logic by using
                                Commands
                                            Command
                                              Command
                                                  Command
mvcExpress communications

Model                                                                View
                                                                     Deals with view objects by using
Deals with data by using Proxies.
                                                                     Mediators
    Proxy                                                                        Mediator
       Proxy                                                                        Mediator
            Proxy                                                                           Mediator




                                Controller
                                Deals with business logic by using
                                Commands
                                            Command
                                              Command                                  can get object
                                                  Command                              can send message
mvcExpress modules
Module
    Model                                        View
    Deals with data by                           Deals with view objects
    using Proxies.                               by using
                                                 Mediators



                          Controller
                          Deals with business
                          logic by using
                          Commands


Module represents:
 ● stand alone application that uses mvc architecture.
 ● stand alone module that uses mvc architecture and can be used by application
    module or other modules.
Thanks for listening!
mvcExress framwork resources:
  ● mvcExpress homepage:
      http://mvcexpress.org/

  ● Code on GitHub:
      https://github.com/MindScriptAct/mvcExpress-framework

  ● my blog:
      http://www.mindscriptact.com/

Contenu connexe

Tendances

Qt & Webkit
Qt & WebkitQt & Webkit
Qt & WebkitQT-day
 
Spring 4 advanced final_xtr_presentation
Spring 4 advanced final_xtr_presentationSpring 4 advanced final_xtr_presentation
Spring 4 advanced final_xtr_presentationsourabh aggarwal
 
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
 
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
 
Parsley & Flex
Parsley & FlexParsley & Flex
Parsley & Flexprideconan
 
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
 
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
 
Java Concurrency, Memory Model, and Trends
Java Concurrency, Memory Model, and TrendsJava Concurrency, Memory Model, and Trends
Java Concurrency, Memory Model, and TrendsCarol McDonald
 
Qt test framework
Qt test frameworkQt test framework
Qt test frameworkICS
 
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
 
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
 
Other Approaches (Concurrency)
Other Approaches (Concurrency)Other Approaches (Concurrency)
Other Approaches (Concurrency)Sri Prasanna
 
Taking Apache Camel For a Ride
Taking Apache Camel For a RideTaking Apache Camel For a Ride
Taking Apache Camel For a RideBruce Snyder
 
Java New Evolution
Java New EvolutionJava New Evolution
Java New EvolutionAllan Huang
 

Tendances (20)

Qt & Webkit
Qt & WebkitQt & Webkit
Qt & Webkit
 
Spring 4 advanced final_xtr_presentation
Spring 4 advanced final_xtr_presentationSpring 4 advanced final_xtr_presentation
Spring 4 advanced final_xtr_presentation
 
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
 
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
 
Vue next
Vue nextVue next
Vue next
 
Parsley & Flex
Parsley & FlexParsley & Flex
Parsley & Flex
 
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
 
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
 
Java Concurrency, Memory Model, and Trends
Java Concurrency, Memory Model, and TrendsJava Concurrency, Memory Model, and Trends
Java Concurrency, Memory Model, and Trends
 
Qt test framework
Qt test frameworkQt test framework
Qt test framework
 
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
 
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
 
Other Approaches (Concurrency)
Other Approaches (Concurrency)Other Approaches (Concurrency)
Other Approaches (Concurrency)
 
JEE.next()
JEE.next()JEE.next()
JEE.next()
 
04b swing tutorial
04b swing tutorial04b swing tutorial
04b swing tutorial
 
drmaatutggf12
drmaatutggf12drmaatutggf12
drmaatutggf12
 
Byte code field report
Byte code field reportByte code field report
Byte code field report
 
Taking Apache Camel For a Ride
Taking Apache Camel For a RideTaking Apache Camel For a Ride
Taking Apache Camel For a Ride
 
Java New Evolution
Java New EvolutionJava New Evolution
Java New Evolution
 

Similaire à mvcExpress training course : part1

Meetup - Getting Started with MVVM Light for WPF - 11 may 2019
Meetup  - Getting Started with MVVM Light for WPF - 11 may 2019Meetup  - Getting Started with MVVM Light for WPF - 11 may 2019
Meetup - Getting Started with MVVM Light for WPF - 11 may 2019iFour Technolab Pvt. Ltd.
 
MVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVCMVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVCAnton Krasnoshchok
 
MVP Mix 2015 Leveraging MVVM on all Platforms
MVP Mix 2015  Leveraging MVVM on all PlatformsMVP Mix 2015  Leveraging MVVM on all Platforms
MVP Mix 2015 Leveraging MVVM on all PlatformsJames Montemagno
 
Architectural Design Pattern: Android
Architectural Design Pattern: AndroidArchitectural Design Pattern: Android
Architectural Design Pattern: AndroidJitendra Kumar
 
MVVM Design Pattern NDC2009
MVVM Design Pattern NDC2009MVVM Design Pattern NDC2009
MVVM Design Pattern NDC2009Jonas Follesø
 
Introduction To MVVM
Introduction To MVVMIntroduction To MVVM
Introduction To MVVMBoulos Dib
 
Modern ASP.NET Webskills
Modern ASP.NET WebskillsModern ASP.NET Webskills
Modern ASP.NET WebskillsCaleb Jenkins
 
A report on mvc using the information
A report on mvc using the informationA report on mvc using the information
A report on mvc using the informationToushik Paul
 
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (1/3)
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (1/3)[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (1/3)
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (1/3)Carles Farré
 
Building an enterprise app in silverlight 4 and NHibernate
Building an enterprise app in silverlight 4 and NHibernateBuilding an enterprise app in silverlight 4 and NHibernate
Building an enterprise app in silverlight 4 and NHibernatebwullems
 
Software architectural design patterns(MVC, MVP, MVVM, VIPER) for iOS
Software architectural design patterns(MVC, MVP, MVVM, VIPER) for iOSSoftware architectural design patterns(MVC, MVP, MVVM, VIPER) for iOS
Software architectural design patterns(MVC, MVP, MVVM, VIPER) for iOSJinkyu Kim
 
Model-View-Controller: Tips&Tricks
Model-View-Controller: Tips&TricksModel-View-Controller: Tips&Tricks
Model-View-Controller: Tips&TricksCiklum Ukraine
 
Ios development 2
Ios development 2Ios development 2
Ios development 2elnaqah
 
Advanced MVVM in Windows 8
Advanced MVVM in Windows 8Advanced MVVM in Windows 8
Advanced MVVM in Windows 8Gill Cleeren
 

Similaire à mvcExpress training course : part1 (20)

Spring Framework-II
Spring Framework-IISpring Framework-II
Spring Framework-II
 
Meetup - Getting Started with MVVM Light for WPF - 11 may 2019
Meetup  - Getting Started with MVVM Light for WPF - 11 may 2019Meetup  - Getting Started with MVVM Light for WPF - 11 may 2019
Meetup - Getting Started with MVVM Light for WPF - 11 may 2019
 
MVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVCMVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVC
 
MVP Mix 2015 Leveraging MVVM on all Platforms
MVP Mix 2015  Leveraging MVVM on all PlatformsMVP Mix 2015  Leveraging MVVM on all Platforms
MVP Mix 2015 Leveraging MVVM on all Platforms
 
Architectural Design Pattern: Android
Architectural Design Pattern: AndroidArchitectural Design Pattern: Android
Architectural Design Pattern: Android
 
Training: MVVM Pattern
Training: MVVM PatternTraining: MVVM Pattern
Training: MVVM Pattern
 
MVVM Design Pattern NDC2009
MVVM Design Pattern NDC2009MVVM Design Pattern NDC2009
MVVM Design Pattern NDC2009
 
Introduction To MVVM
Introduction To MVVMIntroduction To MVVM
Introduction To MVVM
 
Modern ASP.NET Webskills
Modern ASP.NET WebskillsModern ASP.NET Webskills
Modern ASP.NET Webskills
 
A report on mvc using the information
A report on mvc using the informationA report on mvc using the information
A report on mvc using the information
 
Fundaments of Knockout js
Fundaments of Knockout jsFundaments of Knockout js
Fundaments of Knockout js
 
Building richwebapplicationsusingasp
Building richwebapplicationsusingaspBuilding richwebapplicationsusingasp
Building richwebapplicationsusingasp
 
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (1/3)
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (1/3)[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (1/3)
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (1/3)
 
Building an enterprise app in silverlight 4 and NHibernate
Building an enterprise app in silverlight 4 and NHibernateBuilding an enterprise app in silverlight 4 and NHibernate
Building an enterprise app in silverlight 4 and NHibernate
 
Mvc architecture
Mvc architectureMvc architecture
Mvc architecture
 
Software architectural design patterns(MVC, MVP, MVVM, VIPER) for iOS
Software architectural design patterns(MVC, MVP, MVVM, VIPER) for iOSSoftware architectural design patterns(MVC, MVP, MVVM, VIPER) for iOS
Software architectural design patterns(MVC, MVP, MVVM, VIPER) for iOS
 
Model-View-Controller: Tips&Tricks
Model-View-Controller: Tips&TricksModel-View-Controller: Tips&Tricks
Model-View-Controller: Tips&Tricks
 
Ios development 2
Ios development 2Ios development 2
Ios development 2
 
Advanced MVVM in Windows 8
Advanced MVVM in Windows 8Advanced MVVM in Windows 8
Advanced MVVM in Windows 8
 
iOS storyboard
iOS storyboardiOS storyboard
iOS storyboard
 

Dernier

Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 

Dernier (20)

Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 

mvcExpress training course : part1

  • 1. mvcExpress (simplest and fastest ActionScript 3 MVC framework) training course Raimundas Banevicius raima156@yahoo.com senior flash developer 2012.03.24
  • 2. About me ● Hi, My name is Raimundas Banevicius, and I love flash! ● I work with flash technology from 2000.07 ● I work as senior flash developer, and I build big multiplayer games ● I rely heavily on tools and frameworks to make my work manageable and to stay productive ● In the past I used PureMVC, Robotlegs to build games, but discovered a lot of things I don't like about those framework. ● I build mvcExpress framework to solve those problems.
  • 3. About this course ● You will learn: ○ How to create applications using mvcExpress framework ○ MVC pattern theory and practice ○ different ways you can approach your problems, and help you pick one that suits your situation better. ● You will NOT learn: ○ basics of ActionScript 3 programming. ○ Object oriented programming. ● You don't need any knowledge of other frameworks.
  • 4. Learning curve ● Most frameworks has steep initial learning curve... ● ...but then you done with it - you will fly! ● Basic concepts are easy... but grasping all of them at once is challenging ○ learn in in small pieces! Don't try to fit everything in your head from the start! ○ give some time for those small pieces sit in your head. ● you need to learn think in MVC pattern. Not only know MVC. (It will take some time.) ● don't forget to have fun! (start with small-fun application before starting big commercial projects)
  • 5. MVC architecture mvcExpress training course part 1 Raimundas Banevicius raima156@yahoo.com senior flash developer 2012.03.24
  • 6. What will be covered ● What is MVC pattern ● MVC parts ● Model ,View, Controller overview ● Communication overview ● mvcExpress module overview
  • 7. What is MVC pattern ● MVC is architectural pattern used to construct your application. ○ it main purpose is separation of concerns to ■ data domain logic (Model) ■ view interaction and view domain logic (View) ■ business logic (Controller) ○ uses loose coupling (objects don't have to know each other to interact) ■ uses messaging system for that. (Events or Signals for example) ○ comes in many flavours ■ some implementations is more strict, some are more flexible and loose. ■ communications(direct and indirect) can be implemented differently ● mvcExpress is framework that uses MVC principles and tries to pick a golden middle: ○ it leaves options on how to approach a problem but limits it enough to prevent a mess. ○ communications set not only for control but also with convenience in mind
  • 8. MVC parts Model View ● Stores data ● handles user inputs ● Provides data ● shows view change ● Gives a way to change data ● implements view domain ● Implements data domain logic logic Controller ● implements application business logic ● can reacts to view inputs ● can reacts to data changes
  • 9. mvcExpress Model Model userName:String; moneyAmmount:int; mapLayout:MapLayoutVO; inventory:Vector.<ItemVO>; qualityLevel:String videoSettings:VideoSettingVO; then we write application we have to deal with all kinds of data: ● simple data. (like String and int), ● various Value Object classes. ● complex data, like collections, or compositions of other data.
  • 10. mvcExpress Model Model userName:String; InventoryProxy UserProxy moneyAmmount:int; mapLayout:MapLayoutVO; inventory:Vector.<ItemVO>; MapProxy SettingsProxy qualityLevel:String videoSettings:VideoSettingVO; Model layer of MVC is implemented using Proxy design pattern. ● data is aggregated and 'hidden' inside proxy class. ● proxy provides set of public functions to work with data from outside: (uses direct communication)
  • 11. mvcExpress View menuBtn:Button; View label:TextField; main:Sprite; mapLayout:Group; gameScreen:Sprite; -menuScreen:Sprite; -windowScreen:Sprite; playField:Sprite; -ships:Vector.<Ship>; then we write application we have to deal with all kinds of view objects: ● simple view objects, or components. (like Button's or TextField's) ● containers that hold simple views or other containers. ● containers that hold collections or arrays of other views.
  • 12. mvcExpress View menuBtn:Button; View label:TextField; MainMediator GameScreenMediator main:Sprite; mapLayout:Group; gameScreen:Sprite; -menuScreen:Sprite; MapMediator -windowScreen:Sprite; PlayFieldMediator playField:Sprite; -ships:Vector.<Ship>; View layer of MVC is implemented using Mediator design pattern. ● view object is aggregated and 'hidden' inside mediator class. ● mediators does not mediate components(Button's. TextField's), instead they mediate component containers. ● mediator mediates one and only one view object. (often with children of that view object) ● mediator acts as a middleman for view objects communication with rest of application. (uses indirect communication)
  • 13. mvcExpress Controller function startNewGame(){ Controller // change game state to represent new game } function handleChessMove(){ // check if move is valid, // update game board data if it is. // send message to show error if it is not. } function addFormData(){ // store new form data // check if form is compleated // if it is - change form data state to isCompleated = true... } Then we write application we need some code to do business logic for us, or in other words do 'thinking'. We don't want logic code to be in the View or in the Model layers - we want it separated in Controller layer! Best way is to imagine controller as set of functions, that work with application state, and do various tasks using different parts of application.
  • 14. mvcExpress Controller StartNewGameCommand Controller // change game state to represent new game HandleChessMoveCommand // check if move is valid, // update game board data if it is. // send message to show error if it is not. AddFormDataCommand // store new form data // check if form is compleated // if it is - change form data state to isCompleated = true... Controller layer of MVC is implemented using Command design pattern. ● Best way to look at it as class-function. ● Command classes are created, performs one task(function), and dies.
  • 15. mvcExpress parts, recap Model View Deals with view objects by using Deals with data by using Proxies. Mediators Proxy Mediator Proxy Mediator Proxy Mediator Controller Deals with business logic by using Commands Command Command Command
  • 16. mvcExpress communications Model View Deals with view objects by using Deals with data by using Proxies. Mediators Proxy Mediator Proxy Mediator Proxy Mediator Controller Deals with business logic by using Commands Command Command can get object Command can send message
  • 17. mvcExpress modules Module Model View Deals with data by Deals with view objects using Proxies. by using Mediators Controller Deals with business logic by using Commands Module represents: ● stand alone application that uses mvc architecture. ● stand alone module that uses mvc architecture and can be used by application module or other modules.
  • 18. Thanks for listening! mvcExress framwork resources: ● mvcExpress homepage: http://mvcexpress.org/ ● Code on GitHub: https://github.com/MindScriptAct/mvcExpress-framework ● my blog: http://www.mindscriptact.com/