SlideShare une entreprise Scribd logo
1  sur  32
Télécharger pour lire hors ligne
Deconstructing Flex
How to build a rich, modular, scalable RIA (without going insane)


by Francis Lukesh, andCulture // 05-07-2009
What is an application?

• An application is a recursive concert of purpose, design, and science.


• Purpose: Product of a conversation between the Client and the Designer


• Design: Product of a conversation between the Designer and Architect


• Science: Product of a conversation between Architect and Engineer


• Architecture is design; engineering is how to achieve that design.
What is an application? » Designer

• The Designer answers the
  question of Purpose:
  “What does this component
  need to do?”


• Success: “The component
  effortlessly and pleasantly
  fulfills its purpose.”
What is an application? » Architect

• The Architect answers the
  question of Design:
  “What is the best way to
  structure classes, data, and
  interface to achieve this
  purpose?”


• Success: “The code and data
  facilitate the interaction
  specified by the Designer, while
  finding the correct balance of
  scalability and performance.”
What is an application? » Engineer

• The Engineer answers the
  question of Science:
  “What synthesis of patterns,
  invention, and innovation make
  the most logical sense to
  implement?”


• Success: “Can it be developed
  quickly? Does it work? Can it be
  maintained easily? Does it
  perform well? Does it scale
  well? Does it change well?”
The basic parts of an RIA

• User Interface


• Application Logic


• Data


• Communication Protocol
The basic parts of an RIA

• Architecture and engineering
  must be applied to each
  component as well as the overall
  application at each level of the
  development process.
Why should I care?

• Managers: Understand how Flex
  and Flash interact in the context
  of the entire application.


• Designers: Understand what
  happens behind the UI, and learn
  to think in 4D.


• Developers: Knowledge is power.
Common Flex Myths

• It’s prescriptive


• It’s fast


• It’s easy


• It looks good


• It looks bad
What is the Flex SDK?

• A set of Actionscript classes built
  for the Flash runtime.


• A compiler that takes structured
  MXML and creates corresponding
  Actionscript.


• NOT an application framework.
Challenges vs. conventional page-
based web development.

• Asynchronous


• Compiled (vs. scripting environments like PHP)


• Requires (more) Resource Awareness
Closing the Gap

• Implement frameworks that allow you to separate concerns.


• Implement any additional patterns that solve a known isolatable concern.


• Recognize opportunity for invention and innovation.
What is MVC?



• MVC is a way of structuring three common fundamental concerns,
  Model, View, and Controller


• It is not strictly a “design pattern”, as its implementation varies; it is a
  principle of software design.


• Can be applied throughout the application in various ways.


• The moment an application becomes more complex to the developer
  than a logical assembly of components, it’s time to refactor.
Model: The actual time


  2009:05:07 17:30:45
                                      View: How the time is
                                            presented



     Controller: Actions that
             happen



User selects
                     User sets time
display mode


           Time is
         updated from
            server
MVC in Flex

• Ultimately, Flex is a view layer tool, and
  connects a user to the application.


• A Flex application is a composition of
  simple views.


• Restated: The moment a Flex application
  becomes more complex to the developer
  than logical assembly of simple views,
  it’s time to refactor.
MVC in Flex » Procedurally

• Decompose your interface by:


• Separating concerns


• Defining states


• Define Testable scenarios
MVC in Flex » Procedurally

• Define the actors by asking:


• What does this triad need to do?


• What is my view?


• What actions can the user take?


• How does the view need to respond to
  changes in its data?


• Where does the component store its data?


• Translate into an MVC implementation.
MVC in Flex » Practically » Creating the View

• Create the MXML components


• Skinning


• Adding interactivity
MVC in Flex » Practically » Creating the Model

• Storing and managing data


• Storing application state


• Interacting with data


      • SOAP


      • AMF


      • JSON


      • Custom XML structures
MVC in Flex » Practically » Creating the Controller

• How does the View interact with the user?


• How does the View interact with the data?
The need for frameworks becomes evident.
Available Frameworks

MVC                IoC

  • HydraMVC         • Swiz


  • PureMVC          • Mate


  • Cairngorm        • Prana (now Swing)


  • Model / Glue     • Parsley
PureMVC Advantages:

• Language Agnostic


• Promotes writing
  encapsulated code


• Open and lightweight


• Very hands-on
  (no “PFM”)
PureMVC Disadvantages:

• Mission of product requires no leveraging of Flex-specific functionality (only
  AS3-ported patterns, i.e. Notifier)


• Extremely verbose


• Difficult to debug


• No magic at all!
Introducing HydraMVC

• A rewrite of PureMVC (MultiCore)


• The mission of Hydra is to extend beyond
  an MVC to an end-to-end, prescriptive
  development methodology for Flex.
Deconstructing a HydraMVC implementation
Simple HydraMVC component: Hydra Time Demo
Simple HydraMVC component: Hello World Demo
Simple HydraMVC component: FlexGrowl

• Define the basic view


• Define interactions and name them as Notifications


• Create proxies that maintain the state and store the data for the view


• Create controller commands that wire up application logic


• Add interactivity for the mediator


• Profit! ...from encapsulated components.
Future of HydraMVC

• Inversion of Control implementation


• Plugins


• Debugging console via De MonsterDebugger


• Unit testing


• Documentation
Q&A

Contenu connexe

Tendances

Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJSJumping Bean
 
Testing apps with MTM and Tea Foundation Service
Testing apps with MTM and Tea Foundation ServiceTesting apps with MTM and Tea Foundation Service
Testing apps with MTM and Tea Foundation ServiceKevin DeRudder
 
DEVOPS LIVE 2018 JaC
DEVOPS LIVE 2018 JaCDEVOPS LIVE 2018 JaC
DEVOPS LIVE 2018 JaCBrian Mericle
 
VISUG: Visual studio for web developers
VISUG: Visual studio for web developersVISUG: Visual studio for web developers
VISUG: Visual studio for web developersKevin DeRudder
 
jBPM Overview & Alfresco Workflows
jBPM Overview &  Alfresco WorkflowsjBPM Overview &  Alfresco Workflows
jBPM Overview & Alfresco WorkflowsFrancesco Valente
 
Continuous integration using jenkins
Continuous integration using jenkinsContinuous integration using jenkins
Continuous integration using jenkinsVinay H G
 
Deploying node.js at scale - Maraschi, Collina - Codemotion Amsterdam 2016
Deploying node.js at scale - Maraschi, Collina - Codemotion Amsterdam 2016Deploying node.js at scale - Maraschi, Collina - Codemotion Amsterdam 2016
Deploying node.js at scale - Maraschi, Collina - Codemotion Amsterdam 2016Codemotion
 
The 36th Chamber of Shaolin - Improve Your Microservices Kung Fu in 36 Easy S...
The 36th Chamber of Shaolin - Improve Your Microservices Kung Fu in 36 Easy S...The 36th Chamber of Shaolin - Improve Your Microservices Kung Fu in 36 Easy S...
The 36th Chamber of Shaolin - Improve Your Microservices Kung Fu in 36 Easy S...Stefan Richter
 
Continuous Delivery: Fly the Friendly CI in Pivotal Cloud Foundry with Concourse
Continuous Delivery: Fly the Friendly CI in Pivotal Cloud Foundry with ConcourseContinuous Delivery: Fly the Friendly CI in Pivotal Cloud Foundry with Concourse
Continuous Delivery: Fly the Friendly CI in Pivotal Cloud Foundry with ConcourseVMware Tanzu
 
The Architectural Thinking Behind Full Stack Serverless
The Architectural Thinking Behind Full Stack ServerlessThe Architectural Thinking Behind Full Stack Serverless
The Architectural Thinking Behind Full Stack ServerlessYazid Hamdi
 
Go Pro, Inc. Case Study: Dive into the details of our node.js applications
Go Pro, Inc. Case Study: Dive into the details of our node.js applicationsGo Pro, Inc. Case Study: Dive into the details of our node.js applications
Go Pro, Inc. Case Study: Dive into the details of our node.js applicationsAndrew Maxwell
 

Tendances (14)

Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
Testing apps with MTM and Tea Foundation Service
Testing apps with MTM and Tea Foundation ServiceTesting apps with MTM and Tea Foundation Service
Testing apps with MTM and Tea Foundation Service
 
DEVOPS LIVE 2018 JaC
DEVOPS LIVE 2018 JaCDEVOPS LIVE 2018 JaC
DEVOPS LIVE 2018 JaC
 
VISUG: Visual studio for web developers
VISUG: Visual studio for web developersVISUG: Visual studio for web developers
VISUG: Visual studio for web developers
 
jBPM Overview & Alfresco Workflows
jBPM Overview &  Alfresco WorkflowsjBPM Overview &  Alfresco Workflows
jBPM Overview & Alfresco Workflows
 
Continuous integration using jenkins
Continuous integration using jenkinsContinuous integration using jenkins
Continuous integration using jenkins
 
Deploying node.js at scale - Maraschi, Collina - Codemotion Amsterdam 2016
Deploying node.js at scale - Maraschi, Collina - Codemotion Amsterdam 2016Deploying node.js at scale - Maraschi, Collina - Codemotion Amsterdam 2016
Deploying node.js at scale - Maraschi, Collina - Codemotion Amsterdam 2016
 
The 36th Chamber of Shaolin - Improve Your Microservices Kung Fu in 36 Easy S...
The 36th Chamber of Shaolin - Improve Your Microservices Kung Fu in 36 Easy S...The 36th Chamber of Shaolin - Improve Your Microservices Kung Fu in 36 Easy S...
The 36th Chamber of Shaolin - Improve Your Microservices Kung Fu in 36 Easy S...
 
Continuous Delivery: Fly the Friendly CI in Pivotal Cloud Foundry with Concourse
Continuous Delivery: Fly the Friendly CI in Pivotal Cloud Foundry with ConcourseContinuous Delivery: Fly the Friendly CI in Pivotal Cloud Foundry with Concourse
Continuous Delivery: Fly the Friendly CI in Pivotal Cloud Foundry with Concourse
 
Mvp pattern
Mvp patternMvp pattern
Mvp pattern
 
Team City
Team CityTeam City
Team City
 
The Architectural Thinking Behind Full Stack Serverless
The Architectural Thinking Behind Full Stack ServerlessThe Architectural Thinking Behind Full Stack Serverless
The Architectural Thinking Behind Full Stack Serverless
 
Go Pro, Inc. Case Study: Dive into the details of our node.js applications
Go Pro, Inc. Case Study: Dive into the details of our node.js applicationsGo Pro, Inc. Case Study: Dive into the details of our node.js applications
Go Pro, Inc. Case Study: Dive into the details of our node.js applications
 
Continuous integration with Jenkins
Continuous integration with JenkinsContinuous integration with Jenkins
Continuous integration with Jenkins
 

En vedette

Blogak haur hezkuntzan
Blogak haur hezkuntzanBlogak haur hezkuntzan
Blogak haur hezkuntzaniblanco
 
Nu 2 A Clasanim 08
Nu 2 A Clasanim 08Nu 2 A Clasanim 08
Nu 2 A Clasanim 08guest9d0872
 
Experian hitwise online_media_round-up_march_2011
Experian hitwise online_media_round-up_march_2011Experian hitwise online_media_round-up_march_2011
Experian hitwise online_media_round-up_march_2011Jonathan Lyon
 
Social Media 101: Social Media 101: Discover the power of your voice
Social Media 101: Social Media 101: Discover the power of your voiceSocial Media 101: Social Media 101: Discover the power of your voice
Social Media 101: Social Media 101: Discover the power of your voiceWunderman
 

En vedette (7)

Nu 3ab Con$$ 08
Nu 3ab Con$$ 08Nu 3ab Con$$ 08
Nu 3ab Con$$ 08
 
Blogak haur hezkuntzan
Blogak haur hezkuntzanBlogak haur hezkuntzan
Blogak haur hezkuntzan
 
Nu 2 A Clasanim 08
Nu 2 A Clasanim 08Nu 2 A Clasanim 08
Nu 2 A Clasanim 08
 
Experian hitwise online_media_round-up_march_2011
Experian hitwise online_media_round-up_march_2011Experian hitwise online_media_round-up_march_2011
Experian hitwise online_media_round-up_march_2011
 
LGM Presentation
LGM PresentationLGM Presentation
LGM Presentation
 
Social Media 101: Social Media 101: Discover the power of your voice
Social Media 101: Social Media 101: Discover the power of your voiceSocial Media 101: Social Media 101: Discover the power of your voice
Social Media 101: Social Media 101: Discover the power of your voice
 
TNT
TNTTNT
TNT
 

Similaire à Introduction to MVC in Flex and HydraMVC

React Js vs Node Js_ Which Framework to Choose for Your Next Web Application
React Js vs Node Js_ Which Framework to Choose for Your Next Web ApplicationReact Js vs Node Js_ Which Framework to Choose for Your Next Web Application
React Js vs Node Js_ Which Framework to Choose for Your Next Web Applicationadityakumar2080
 
Selecting the Best Javascript Web Framework
Selecting the Best Javascript Web FrameworkSelecting the Best Javascript Web Framework
Selecting the Best Javascript Web FrameworkRajitha Pathiraja
 
MWLUG 2015 - An Introduction to MVC
MWLUG 2015 - An Introduction to MVCMWLUG 2015 - An Introduction to MVC
MWLUG 2015 - An Introduction to MVCUlrich Krause
 
Feature Development with jQuery
Feature Development with jQueryFeature Development with jQuery
Feature Development with jQueryMichael Edwards
 
Vue Or React - Which One is the Best_.pptx
Vue Or React - Which One is the Best_.pptxVue Or React - Which One is the Best_.pptx
Vue Or React - Which One is the Best_.pptx75waytechnologies
 
Comparing AngularJS and ReactJS_ Finding the Best Framework for your Next Pro...
Comparing AngularJS and ReactJS_ Finding the Best Framework for your Next Pro...Comparing AngularJS and ReactJS_ Finding the Best Framework for your Next Pro...
Comparing AngularJS and ReactJS_ Finding the Best Framework for your Next Pro...JPLoft Solutions
 
Twelve Factor - Designing for Change
Twelve Factor - Designing for ChangeTwelve Factor - Designing for Change
Twelve Factor - Designing for ChangeEric Wyles
 
Practical Thin Server Architecture With Dojo Sapo Codebits 2008
Practical Thin Server Architecture With Dojo Sapo Codebits 2008Practical Thin Server Architecture With Dojo Sapo Codebits 2008
Practical Thin Server Architecture With Dojo Sapo Codebits 2008codebits
 
JavaScript Frameworks Popularity
JavaScript Frameworks PopularityJavaScript Frameworks Popularity
JavaScript Frameworks PopularityAlbiorix Technology
 
Building Reactive webapp with React/Flux
Building Reactive webapp with React/FluxBuilding Reactive webapp with React/Flux
Building Reactive webapp with React/FluxKeuller Magalhães
 
www.webre24h.com - An ajax tool for online modeling
www.webre24h.com - An ajax tool for online modelingwww.webre24h.com - An ajax tool for online modeling
www.webre24h.com - An ajax tool for online modelingwebre24h
 
An Introduction To Model  View  Controller In XPages
An Introduction To Model  View  Controller In XPagesAn Introduction To Model  View  Controller In XPages
An Introduction To Model  View  Controller In XPagesUlrich Krause
 

Similaire à Introduction to MVC in Flex and HydraMVC (20)

Design Based Dev
Design Based DevDesign Based Dev
Design Based Dev
 
Software Engineering 2014
Software Engineering 2014Software Engineering 2014
Software Engineering 2014
 
React Js vs Node Js_ Which Framework to Choose for Your Next Web Application
React Js vs Node Js_ Which Framework to Choose for Your Next Web ApplicationReact Js vs Node Js_ Which Framework to Choose for Your Next Web Application
React Js vs Node Js_ Which Framework to Choose for Your Next Web Application
 
MVC & CodeIgniter
MVC & CodeIgniterMVC & CodeIgniter
MVC & CodeIgniter
 
Selecting the Best Javascript Web Framework
Selecting the Best Javascript Web FrameworkSelecting the Best Javascript Web Framework
Selecting the Best Javascript Web Framework
 
MWLUG 2015 - An Introduction to MVC
MWLUG 2015 - An Introduction to MVCMWLUG 2015 - An Introduction to MVC
MWLUG 2015 - An Introduction to MVC
 
Feature Development with jQuery
Feature Development with jQueryFeature Development with jQuery
Feature Development with jQuery
 
Wecreate
WecreateWecreate
Wecreate
 
Vue Or React - Which One is the Best_.pptx
Vue Or React - Which One is the Best_.pptxVue Or React - Which One is the Best_.pptx
Vue Or React - Which One is the Best_.pptx
 
Comparing AngularJS and ReactJS_ Finding the Best Framework for your Next Pro...
Comparing AngularJS and ReactJS_ Finding the Best Framework for your Next Pro...Comparing AngularJS and ReactJS_ Finding the Best Framework for your Next Pro...
Comparing AngularJS and ReactJS_ Finding the Best Framework for your Next Pro...
 
Twelve Factor - Designing for Change
Twelve Factor - Designing for ChangeTwelve Factor - Designing for Change
Twelve Factor - Designing for Change
 
Practical Thin Server Architecture With Dojo Sapo Codebits 2008
Practical Thin Server Architecture With Dojo Sapo Codebits 2008Practical Thin Server Architecture With Dojo Sapo Codebits 2008
Practical Thin Server Architecture With Dojo Sapo Codebits 2008
 
JavaScript Frameworks Popularity
JavaScript Frameworks PopularityJavaScript Frameworks Popularity
JavaScript Frameworks Popularity
 
qadeer intern report.pdf
qadeer intern report.pdfqadeer intern report.pdf
qadeer intern report.pdf
 
Building Reactive webapp with React/Flux
Building Reactive webapp with React/FluxBuilding Reactive webapp with React/Flux
Building Reactive webapp with React/Flux
 
MERN PPT
MERN PPTMERN PPT
MERN PPT
 
www.webre24h.com - An ajax tool for online modeling
www.webre24h.com - An ajax tool for online modelingwww.webre24h.com - An ajax tool for online modeling
www.webre24h.com - An ajax tool for online modeling
 
An Introduction To Model  View  Controller In XPages
An Introduction To Model  View  Controller In XPagesAn Introduction To Model  View  Controller In XPages
An Introduction To Model  View  Controller In XPages
 
Ps02 cint24 mvc in php
Ps02 cint24 mvc in phpPs02 cint24 mvc in php
Ps02 cint24 mvc in php
 
NEXT.JS
NEXT.JSNEXT.JS
NEXT.JS
 

Dernier

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 

Dernier (20)

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 

Introduction to MVC in Flex and HydraMVC

  • 1. Deconstructing Flex How to build a rich, modular, scalable RIA (without going insane) by Francis Lukesh, andCulture // 05-07-2009
  • 2. What is an application? • An application is a recursive concert of purpose, design, and science. • Purpose: Product of a conversation between the Client and the Designer • Design: Product of a conversation between the Designer and Architect • Science: Product of a conversation between Architect and Engineer • Architecture is design; engineering is how to achieve that design.
  • 3. What is an application? » Designer • The Designer answers the question of Purpose: “What does this component need to do?” • Success: “The component effortlessly and pleasantly fulfills its purpose.”
  • 4. What is an application? » Architect • The Architect answers the question of Design: “What is the best way to structure classes, data, and interface to achieve this purpose?” • Success: “The code and data facilitate the interaction specified by the Designer, while finding the correct balance of scalability and performance.”
  • 5. What is an application? » Engineer • The Engineer answers the question of Science: “What synthesis of patterns, invention, and innovation make the most logical sense to implement?” • Success: “Can it be developed quickly? Does it work? Can it be maintained easily? Does it perform well? Does it scale well? Does it change well?”
  • 6. The basic parts of an RIA • User Interface • Application Logic • Data • Communication Protocol
  • 7. The basic parts of an RIA • Architecture and engineering must be applied to each component as well as the overall application at each level of the development process.
  • 8. Why should I care? • Managers: Understand how Flex and Flash interact in the context of the entire application. • Designers: Understand what happens behind the UI, and learn to think in 4D. • Developers: Knowledge is power.
  • 9. Common Flex Myths • It’s prescriptive • It’s fast • It’s easy • It looks good • It looks bad
  • 10.
  • 11. What is the Flex SDK? • A set of Actionscript classes built for the Flash runtime. • A compiler that takes structured MXML and creates corresponding Actionscript. • NOT an application framework.
  • 12. Challenges vs. conventional page- based web development. • Asynchronous • Compiled (vs. scripting environments like PHP) • Requires (more) Resource Awareness
  • 13. Closing the Gap • Implement frameworks that allow you to separate concerns. • Implement any additional patterns that solve a known isolatable concern. • Recognize opportunity for invention and innovation.
  • 14. What is MVC? • MVC is a way of structuring three common fundamental concerns, Model, View, and Controller • It is not strictly a “design pattern”, as its implementation varies; it is a principle of software design. • Can be applied throughout the application in various ways. • The moment an application becomes more complex to the developer than a logical assembly of components, it’s time to refactor.
  • 15. Model: The actual time 2009:05:07 17:30:45 View: How the time is presented Controller: Actions that happen User selects User sets time display mode Time is updated from server
  • 16. MVC in Flex • Ultimately, Flex is a view layer tool, and connects a user to the application. • A Flex application is a composition of simple views. • Restated: The moment a Flex application becomes more complex to the developer than logical assembly of simple views, it’s time to refactor.
  • 17. MVC in Flex » Procedurally • Decompose your interface by: • Separating concerns • Defining states • Define Testable scenarios
  • 18. MVC in Flex » Procedurally • Define the actors by asking: • What does this triad need to do? • What is my view? • What actions can the user take? • How does the view need to respond to changes in its data? • Where does the component store its data? • Translate into an MVC implementation.
  • 19. MVC in Flex » Practically » Creating the View • Create the MXML components • Skinning • Adding interactivity
  • 20. MVC in Flex » Practically » Creating the Model • Storing and managing data • Storing application state • Interacting with data • SOAP • AMF • JSON • Custom XML structures
  • 21. MVC in Flex » Practically » Creating the Controller • How does the View interact with the user? • How does the View interact with the data?
  • 22. The need for frameworks becomes evident.
  • 23. Available Frameworks MVC IoC • HydraMVC • Swiz • PureMVC • Mate • Cairngorm • Prana (now Swing) • Model / Glue • Parsley
  • 24. PureMVC Advantages: • Language Agnostic • Promotes writing encapsulated code • Open and lightweight • Very hands-on (no “PFM”)
  • 25. PureMVC Disadvantages: • Mission of product requires no leveraging of Flex-specific functionality (only AS3-ported patterns, i.e. Notifier) • Extremely verbose • Difficult to debug • No magic at all!
  • 26. Introducing HydraMVC • A rewrite of PureMVC (MultiCore) • The mission of Hydra is to extend beyond an MVC to an end-to-end, prescriptive development methodology for Flex.
  • 27. Deconstructing a HydraMVC implementation
  • 28. Simple HydraMVC component: Hydra Time Demo
  • 29. Simple HydraMVC component: Hello World Demo
  • 30. Simple HydraMVC component: FlexGrowl • Define the basic view • Define interactions and name them as Notifications • Create proxies that maintain the state and store the data for the view • Create controller commands that wire up application logic • Add interactivity for the mediator • Profit! ...from encapsulated components.
  • 31. Future of HydraMVC • Inversion of Control implementation • Plugins • Debugging console via De MonsterDebugger • Unit testing • Documentation
  • 32. Q&A