SlideShare a Scribd company logo
1 of 28
MATE: A Flex Framework
“Extreme Makeover”
Our Agenda
• Introductions
• What Is MATE?
• Why Use MATE?
• Take A Look At The Original App -
  ClipSafe
• It’s Time for an “Extreme Makeover!”
• Extending MATE
• Summary
Introductions
Me: Theo Rushin, Jr.
 (rushint@yahoo.com)
    Senior Web Application Developer/Trainer
    @ NicheClick Media

 Application Developer and Trainer Since
                                       ’85
        ColdFusion Developer Since ’99
              Flash Developer Since ’99
               Flex Developer Since ’05
What Is MATE?
• MATE is a tag based, event driven
  framework for Flex development.
• It is pronounced – “mah-teh”
• It helps you build applications that
  promote loosely coupled components.
• There is very good documentation,
  examples, diagrams, and presentations to
  help you get started and learn more.
Why Use MATE?
• MATE helps you create applications that are
  highly decoupled.
• MATE helps you organize and encapsulate the
  code and the various components.
• A very easy framework to understand with
  plenty of documentation and examples.
• Communication throughout an application built
  using MATE use standard or custom Flash
  event.
• Tag-based NOT Actionscript-based.
• Very easy to extend.
Take a look at the
          original app
• ClipSafe!
• It’s a simple Flex/AIR application.
• Take a snapshot of what's on your
  desktop (Prnt-Scrn).
• ClipSafe saves the snapshot into a folder
  on your PC.
• Application architecture? One MXML file
  containing ALL code.
• Not very scalable, extensible, nor
Take a look at the
original app (cont.)
Time for an “Extreme
    Makeover!”
Time for an “Extreme
            Makeover!”
Setting up Your Environment
• Not unlike many other frameworks, the MATE
  framework enables the developer to build
  loosely coupled applications. Separating the
  application’s views from the service layer and
  from the business logic results in an application
  that is scalable, reusable, and easier to
  understand.
• Even a small application that implements the
  MATE framework will consist of various smaller
  custom classes.
Time for an “Extreme
            Makeover!”
Setting up Your Environment (cont.)
Time for an “Extreme
         Makeover!”
Adding the MATE library
• ASFusion currently makes available two
  compiled libraries for download (as of this
  writing)
   – Version 0.7.7 for Flex 3
   – Version 0.7.7 for Flex 2
• You can also download and browse the
  source via SVN
                http://mate-
Time for an “Extreme
           Makeover!”
Adding the MATE library (cont.)
• Add the compiled MATE (swc) to your project.
  For smaller applications this can be placed into
  your lib folder.
• From the main menu select Project >
  Properties.
• Select Flex Build Path from the left-hand menu
  in the Properties dialog box.
• Select the Library Path tab.
• Click on the Add SWC button.
• Browse to the folder containing the .swc file
Time for an “Extreme
          Makeover!”
Create a Config Class
• It not necessary for you to create a
  Config class in order to build an
  application using MATE.
• I do so only for this demo app to
  demonstrate the passing of values into
  the ClipSafeManager class (more on this
  class later).
• It’s a simple custom class defining two
  constants and their values.
Time for an “Extreme
         Makeover!”
Converting the View
• Strip out the view and place it into it’s own
  custom component.
• Place the custom view component into
  the views folder.
• Define a script block that will import the
  required classes, declare public variables,
  and define functions to support the view.
Time for an “Extreme
          Makeover!” –
Dispatching Events from the View
 using dispatchEvent()
This is the standard way of dispatching a
 standard and custom events.

NOTE:
• The dispatched event must have its
  bubbling setting as “true”
                    AND
Time for an “Extreme
          Makeover!” –
Dispatching Events from the View
  using <Dispatcher …>
This tag can be used to dispatch an event
from anywhere in the application. Using this
tag guarantees that the event will be
received by ALL registered listeners.
• Use the generator attribute to specify the
  event class that should be dispatched.
• Use the type attribute to specify the type
  of event.
Time for an “Extreme
          Makeover!”
Defining the Event Map
• MATE is an event-based framework that
  revolves around what is known as an
  Event Map. The Event Map file is an
  MXML component extended from the
  EventMap class.
• An event map defines, among other
  things, one or more event handlers for the
  application. The <Event Handlers …> tag
  is used to listen to events dispatched by
Time for an “Extreme
          Makeover!”
Defining Event Handlers
• The <EventHandlers …> tag is used to
  define one or more handlers that are
  executed whenever a specified event
  type occurs.

 The event type can be either a standard
             Flex/Flash event
                   OR
Time for an “Extreme
          Makeover!”
Create the Custom Event Classes
• You create the custom events that same
  way you always have (have you?)
• ClipSafeEvent is the event that will be
  triggered when the Start/Stop button is
  clicked from the view.
• CapturePixEvent is the event that will be
  triggered when the application detects
  that a an image has been captured.
Time for an “Extreme
          Makeover!”
Create the Value Object (vo) class
• This class will be used in the
  CapturePixEvent class allowing us to
  pass the snapshot information along with
  the event.
Time for an “Extreme
          Makeover!”
Using the ObjectBuilder tag
• The <ObjectBuilder …> tag is used to create
  an object instance. The type of object is
  specified in the generator attribute of this tag.
  Arguments can be passed to the constructor of
  the class by using the constructorArguments
  attribute of this class. This attribute expects an
  array of values.
• You can specify whether the object will be
  cached or not by using the cache attribute. By
  specifying “true” as the value of this attribute
Time for an “Extreme
          Makeover!” -
Creating a an Application Manager
  ClipSafeManager
• This is the business layer of the
  application.
• Your application may have one or more of
  these type of classes.
• This class will contain methods that are
  called from the MainEventMap
  component.
Time for an “Extreme
          Makeover!”
Using the MethodInvoker tag
• The <Method Invoker …> tag is used to create
  an object instance of the class specified in the
  generator attribute (unless cache is set to
  “true” in a previous ObjectBuilder tag). Then it
  will execute the method specified in the method
  attribute.
• Arguments can be passed via the arguments
  attribute. The arguments attribute expects an
  array of values.
Time for an “Extreme
         Makeover!”
Using PropertyInjectors
• These tags are also defined in the
  MainEventMap component.
• The PropertyInjector tag is placed within the
  Injectors tag block.
• They are used to inject property values from a
  specified source into a specified target.
• The target class is specified in the target
  attribute of the Injectors tag.
• The target property, source class, and source,
  property are specified in the PropertyInjector
Extending MATE
• It is very easy to create your own
  extensions to the MATE framework.
• MATE extensions are custom classes
  that extend the AbstractServiceInvoker
  class and implement the IAction class.
• Extenting from the
  AbstractServiceInvoker class will give
  your custom extension access to inner
  result and fault handlers.
• Implementing the IAction class allows
Extending MATE
              (cont.) to override
• Your custom extension needs
  the run method and script it to do what
  you want it to do when.
• You need to specify what event will
  trigger your resultHandlers execution and
  who is dispatching that event.
• Use the createInnerHandlers method
  defined by the AbstractServiceInvoker
  class to define your result and fault
  handlers.
Summary
Download - Learn -
    Participate!
    ASFusion Web site:
    http://mate.asfusion.com/
MATE Flex Framework: An "Extreme Makeover

More Related Content

What's hot

Peering Inside the Black Box: A Case for Observability
Peering Inside the Black Box: A Case for ObservabilityPeering Inside the Black Box: A Case for Observability
Peering Inside the Black Box: A Case for ObservabilityVMware Tanzu
 
Angular elements - embed your angular components EVERYWHERE
Angular elements - embed your angular components EVERYWHEREAngular elements - embed your angular components EVERYWHERE
Angular elements - embed your angular components EVERYWHERENadav Mary
 
Spring Native and Spring AOT
Spring Native and Spring AOTSpring Native and Spring AOT
Spring Native and Spring AOTVMware Tanzu
 
Spring Boot & Actuators
Spring Boot & ActuatorsSpring Boot & Actuators
Spring Boot & ActuatorsVMware Tanzu
 
Angular 2 for Java Developers
Angular 2 for Java DevelopersAngular 2 for Java Developers
Angular 2 for Java DevelopersYakov Fain
 
Micronaut: A new way to build microservices
Micronaut: A new way to build microservicesMicronaut: A new way to build microservices
Micronaut: A new way to build microservicesLuram Archanjo
 
AngularJS Beginner Day One
AngularJS Beginner Day OneAngularJS Beginner Day One
AngularJS Beginner Day OneTroy Miles
 
Angular 7 Firebase5 CRUD Operations with Reactive Forms
Angular 7 Firebase5 CRUD Operations with Reactive FormsAngular 7 Firebase5 CRUD Operations with Reactive Forms
Angular 7 Firebase5 CRUD Operations with Reactive FormsDigamber Singh
 
Beginning AngularJS
Beginning AngularJSBeginning AngularJS
Beginning AngularJSTroy Miles
 
Angular 2 Migration - JHipster Meetup 6
Angular 2 Migration - JHipster Meetup 6Angular 2 Migration - JHipster Meetup 6
Angular 2 Migration - JHipster Meetup 6William Marques
 
AWS EC2 Ubuntu Instance - Step-by-Step Deployment Guide
AWS EC2 Ubuntu Instance - Step-by-Step Deployment GuideAWS EC2 Ubuntu Instance - Step-by-Step Deployment Guide
AWS EC2 Ubuntu Instance - Step-by-Step Deployment GuideRapidValue
 
Flash Platformアップデート
Flash PlatformアップデートFlash Platformアップデート
Flash PlatformアップデートMariko Nishimura
 
If Hemingway Wrote JavaDocs
If Hemingway Wrote JavaDocsIf Hemingway Wrote JavaDocs
If Hemingway Wrote JavaDocsVMware Tanzu
 
Microsoft identity platform and device authorization flow to use azure servic...
Microsoft identity platform and device authorization flow to use azure servic...Microsoft identity platform and device authorization flow to use azure servic...
Microsoft identity platform and device authorization flow to use azure servic...Sunil kumar Mohanty
 
Keyword Driven Testing
Keyword Driven TestingKeyword Driven Testing
Keyword Driven Testinganandarajta
 
Running Spring Boot Applications as GraalVM Native Images
Running Spring Boot Applications as GraalVM Native ImagesRunning Spring Boot Applications as GraalVM Native Images
Running Spring Boot Applications as GraalVM Native ImagesVMware Tanzu
 
Google cloud certified professional cloud developer practice dumps 2020
Google cloud certified professional cloud developer practice dumps 2020Google cloud certified professional cloud developer practice dumps 2020
Google cloud certified professional cloud developer practice dumps 2020SkillCertProExams
 
Containerizing ContentBox CMS
Containerizing ContentBox CMSContainerizing ContentBox CMS
Containerizing ContentBox CMSGavin Pickin
 
Maven: Managing Software Projects for Repeatable Results
Maven: Managing Software Projects for Repeatable ResultsMaven: Managing Software Projects for Repeatable Results
Maven: Managing Software Projects for Repeatable ResultsSteve Keener
 

What's hot (20)

Peering Inside the Black Box: A Case for Observability
Peering Inside the Black Box: A Case for ObservabilityPeering Inside the Black Box: A Case for Observability
Peering Inside the Black Box: A Case for Observability
 
Angular elements - embed your angular components EVERYWHERE
Angular elements - embed your angular components EVERYWHEREAngular elements - embed your angular components EVERYWHERE
Angular elements - embed your angular components EVERYWHERE
 
Spring Native and Spring AOT
Spring Native and Spring AOTSpring Native and Spring AOT
Spring Native and Spring AOT
 
Spring Boot & Actuators
Spring Boot & ActuatorsSpring Boot & Actuators
Spring Boot & Actuators
 
Angular 2 for Java Developers
Angular 2 for Java DevelopersAngular 2 for Java Developers
Angular 2 for Java Developers
 
Micronaut: A new way to build microservices
Micronaut: A new way to build microservicesMicronaut: A new way to build microservices
Micronaut: A new way to build microservices
 
AngularJS Beginner Day One
AngularJS Beginner Day OneAngularJS Beginner Day One
AngularJS Beginner Day One
 
Angular 7 Firebase5 CRUD Operations with Reactive Forms
Angular 7 Firebase5 CRUD Operations with Reactive FormsAngular 7 Firebase5 CRUD Operations with Reactive Forms
Angular 7 Firebase5 CRUD Operations with Reactive Forms
 
Beginning AngularJS
Beginning AngularJSBeginning AngularJS
Beginning AngularJS
 
Angular 2 Migration - JHipster Meetup 6
Angular 2 Migration - JHipster Meetup 6Angular 2 Migration - JHipster Meetup 6
Angular 2 Migration - JHipster Meetup 6
 
AWS EC2 Ubuntu Instance - Step-by-Step Deployment Guide
AWS EC2 Ubuntu Instance - Step-by-Step Deployment GuideAWS EC2 Ubuntu Instance - Step-by-Step Deployment Guide
AWS EC2 Ubuntu Instance - Step-by-Step Deployment Guide
 
Flash Platformアップデート
Flash PlatformアップデートFlash Platformアップデート
Flash Platformアップデート
 
If Hemingway Wrote JavaDocs
If Hemingway Wrote JavaDocsIf Hemingway Wrote JavaDocs
If Hemingway Wrote JavaDocs
 
Microsoft identity platform and device authorization flow to use azure servic...
Microsoft identity platform and device authorization flow to use azure servic...Microsoft identity platform and device authorization flow to use azure servic...
Microsoft identity platform and device authorization flow to use azure servic...
 
Keyword Driven Testing
Keyword Driven TestingKeyword Driven Testing
Keyword Driven Testing
 
code-camp-meteor
code-camp-meteorcode-camp-meteor
code-camp-meteor
 
Running Spring Boot Applications as GraalVM Native Images
Running Spring Boot Applications as GraalVM Native ImagesRunning Spring Boot Applications as GraalVM Native Images
Running Spring Boot Applications as GraalVM Native Images
 
Google cloud certified professional cloud developer practice dumps 2020
Google cloud certified professional cloud developer practice dumps 2020Google cloud certified professional cloud developer practice dumps 2020
Google cloud certified professional cloud developer practice dumps 2020
 
Containerizing ContentBox CMS
Containerizing ContentBox CMSContainerizing ContentBox CMS
Containerizing ContentBox CMS
 
Maven: Managing Software Projects for Repeatable Results
Maven: Managing Software Projects for Repeatable ResultsMaven: Managing Software Projects for Repeatable Results
Maven: Managing Software Projects for Repeatable Results
 

Viewers also liked

DMMS Short Presentation
DMMS Short PresentationDMMS Short Presentation
DMMS Short Presentationbuschko
 
Le nouveau républicain 1
Le nouveau républicain 1Le nouveau républicain 1
Le nouveau républicain 1sesostris
 
การคัดลอกลายภาพโดยโปรแกรม Flash cs5 1
การคัดลอกลายภาพโดยโปรแกรม Flash cs5  1การคัดลอกลายภาพโดยโปรแกรม Flash cs5  1
การคัดลอกลายภาพโดยโปรแกรม Flash cs5 1kanjana312845
 
Acc4501 problem1
Acc4501 problem1Acc4501 problem1
Acc4501 problem1Adi Ali
 

Viewers also liked (7)

DMMS Short Presentation
DMMS Short PresentationDMMS Short Presentation
DMMS Short Presentation
 
stasera1
stasera1stasera1
stasera1
 
Le nouveau républicain 1
Le nouveau républicain 1Le nouveau républicain 1
Le nouveau républicain 1
 
Chapter3
Chapter3Chapter3
Chapter3
 
การคัดลอกลายภาพโดยโปรแกรม Flash cs5 1
การคัดลอกลายภาพโดยโปรแกรม Flash cs5  1การคัดลอกลายภาพโดยโปรแกรม Flash cs5  1
การคัดลอกลายภาพโดยโปรแกรม Flash cs5 1
 
Zinn keynote
Zinn keynoteZinn keynote
Zinn keynote
 
Acc4501 problem1
Acc4501 problem1Acc4501 problem1
Acc4501 problem1
 

Similar to MATE Flex Framework: An "Extreme Makeover

Aura Framework Overview
Aura Framework OverviewAura Framework Overview
Aura Framework Overviewrajdeep
 
Moving from AS3 to Flex - advantages, hazards, traps
Moving from AS3 to Flex - advantages, hazards, trapsMoving from AS3 to Flex - advantages, hazards, traps
Moving from AS3 to Flex - advantages, hazards, trapsFlorian Weil
 
Introduction to Visual Basic 6.0
Introduction to Visual Basic 6.0Introduction to Visual Basic 6.0
Introduction to Visual Basic 6.0DivyaR219113
 
Maven 2 features
Maven 2 featuresMaven 2 features
Maven 2 featuresAngel Ruiz
 
Qtp 9.2 examples
Qtp 9.2 examplesQtp 9.2 examples
Qtp 9.2 examplesmedsherb
 
Empower every Azure Function to achieve more!!
Empower every Azure Function to achieve more!!Empower every Azure Function to achieve more!!
Empower every Azure Function to achieve more!!Massimo Bonanni
 
Lightning Components Explained
Lightning Components ExplainedLightning Components Explained
Lightning Components ExplainedAtul Gupta(8X)
 
Necto 16 training 20 component mode &amp; java script
Necto 16 training 20   component mode &amp; java scriptNecto 16 training 20   component mode &amp; java script
Necto 16 training 20 component mode &amp; java scriptPanorama Software
 
PRG 421 Education Specialist / snaptutorial.com
PRG 421 Education Specialist / snaptutorial.comPRG 421 Education Specialist / snaptutorial.com
PRG 421 Education Specialist / snaptutorial.comMcdonaldRyan108
 
Eclipse IDE, 2019.09, Java Development
Eclipse IDE, 2019.09, Java Development Eclipse IDE, 2019.09, Java Development
Eclipse IDE, 2019.09, Java Development Pei-Hsuan Hsieh
 
Talk 1: Google App Engine Development: Java, Data Models, and other things yo...
Talk 1: Google App Engine Development: Java, Data Models, and other things yo...Talk 1: Google App Engine Development: Java, Data Models, and other things yo...
Talk 1: Google App Engine Development: Java, Data Models, and other things yo...Singapore Google Technology User Group
 
27 - Panorama Necto 14 component mode & java script - visualization & data di...
27 - Panorama Necto 14 component mode & java script - visualization & data di...27 - Panorama Necto 14 component mode & java script - visualization & data di...
27 - Panorama Necto 14 component mode & java script - visualization & data di...Panorama Software
 
Single Sourcing RAP and RCP - Desktop and web clients from a single code base
Single Sourcing RAP and RCP - Desktop and web clients from a single code baseSingle Sourcing RAP and RCP - Desktop and web clients from a single code base
Single Sourcing RAP and RCP - Desktop and web clients from a single code baseRalf Sternberg
 
Flex Daily Solutions @ FITC 2008
Flex Daily Solutions @ FITC 2008Flex Daily Solutions @ FITC 2008
Flex Daily Solutions @ FITC 2008marcocasario
 
Introduction to Palm's Mojo SDK
Introduction to Palm's Mojo SDKIntroduction to Palm's Mojo SDK
Introduction to Palm's Mojo SDKBrendan Lim
 
PVS-Studio in the Clouds: Azure DevOps
PVS-Studio in the Clouds: Azure DevOpsPVS-Studio in the Clouds: Azure DevOps
PVS-Studio in the Clouds: Azure DevOpsAndrey Karpov
 

Similar to MATE Flex Framework: An "Extreme Makeover (20)

Aura Framework Overview
Aura Framework OverviewAura Framework Overview
Aura Framework Overview
 
Moving from AS3 to Flex - advantages, hazards, traps
Moving from AS3 to Flex - advantages, hazards, trapsMoving from AS3 to Flex - advantages, hazards, traps
Moving from AS3 to Flex - advantages, hazards, traps
 
Exploring Maven SVN GIT
Exploring Maven SVN GITExploring Maven SVN GIT
Exploring Maven SVN GIT
 
Introduction to Visual Basic 6.0
Introduction to Visual Basic 6.0Introduction to Visual Basic 6.0
Introduction to Visual Basic 6.0
 
Maven 2 features
Maven 2 featuresMaven 2 features
Maven 2 features
 
Qtp 9.2 examples
Qtp 9.2 examplesQtp 9.2 examples
Qtp 9.2 examples
 
Empower every Azure Function to achieve more!!
Empower every Azure Function to achieve more!!Empower every Azure Function to achieve more!!
Empower every Azure Function to achieve more!!
 
Lightning Components Explained
Lightning Components ExplainedLightning Components Explained
Lightning Components Explained
 
Necto 16 training 20 component mode &amp; java script
Necto 16 training 20   component mode &amp; java scriptNecto 16 training 20   component mode &amp; java script
Necto 16 training 20 component mode &amp; java script
 
PRG 421 Education Specialist / snaptutorial.com
PRG 421 Education Specialist / snaptutorial.comPRG 421 Education Specialist / snaptutorial.com
PRG 421 Education Specialist / snaptutorial.com
 
Eclipse IDE, 2019.09, Java Development
Eclipse IDE, 2019.09, Java Development Eclipse IDE, 2019.09, Java Development
Eclipse IDE, 2019.09, Java Development
 
Building richwebapplicationsusingasp
Building richwebapplicationsusingaspBuilding richwebapplicationsusingasp
Building richwebapplicationsusingasp
 
Google Cloud Platform
Google Cloud Platform Google Cloud Platform
Google Cloud Platform
 
Talk 1: Google App Engine Development: Java, Data Models, and other things yo...
Talk 1: Google App Engine Development: Java, Data Models, and other things yo...Talk 1: Google App Engine Development: Java, Data Models, and other things yo...
Talk 1: Google App Engine Development: Java, Data Models, and other things yo...
 
27 - Panorama Necto 14 component mode & java script - visualization & data di...
27 - Panorama Necto 14 component mode & java script - visualization & data di...27 - Panorama Necto 14 component mode & java script - visualization & data di...
27 - Panorama Necto 14 component mode & java script - visualization & data di...
 
Single Sourcing RAP and RCP - Desktop and web clients from a single code base
Single Sourcing RAP and RCP - Desktop and web clients from a single code baseSingle Sourcing RAP and RCP - Desktop and web clients from a single code base
Single Sourcing RAP and RCP - Desktop and web clients from a single code base
 
Flex Daily Solutions @ FITC 2008
Flex Daily Solutions @ FITC 2008Flex Daily Solutions @ FITC 2008
Flex Daily Solutions @ FITC 2008
 
Introduction to Palm's Mojo SDK
Introduction to Palm's Mojo SDKIntroduction to Palm's Mojo SDK
Introduction to Palm's Mojo SDK
 
Os Haase
Os HaaseOs Haase
Os Haase
 
PVS-Studio in the Clouds: Azure DevOps
PVS-Studio in the Clouds: Azure DevOpsPVS-Studio in the Clouds: Azure DevOps
PVS-Studio in the Clouds: Azure DevOps
 

Recently uploaded

Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
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
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
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
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
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
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
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
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
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
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 

Recently uploaded (20)

Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
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
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
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
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
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
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
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
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 

MATE Flex Framework: An "Extreme Makeover

  • 1. MATE: A Flex Framework “Extreme Makeover”
  • 2. Our Agenda • Introductions • What Is MATE? • Why Use MATE? • Take A Look At The Original App - ClipSafe • It’s Time for an “Extreme Makeover!” • Extending MATE • Summary
  • 3. Introductions Me: Theo Rushin, Jr. (rushint@yahoo.com) Senior Web Application Developer/Trainer @ NicheClick Media Application Developer and Trainer Since ’85 ColdFusion Developer Since ’99 Flash Developer Since ’99 Flex Developer Since ’05
  • 4. What Is MATE? • MATE is a tag based, event driven framework for Flex development. • It is pronounced – “mah-teh” • It helps you build applications that promote loosely coupled components. • There is very good documentation, examples, diagrams, and presentations to help you get started and learn more.
  • 5. Why Use MATE? • MATE helps you create applications that are highly decoupled. • MATE helps you organize and encapsulate the code and the various components. • A very easy framework to understand with plenty of documentation and examples. • Communication throughout an application built using MATE use standard or custom Flash event. • Tag-based NOT Actionscript-based. • Very easy to extend.
  • 6. Take a look at the original app • ClipSafe! • It’s a simple Flex/AIR application. • Take a snapshot of what's on your desktop (Prnt-Scrn). • ClipSafe saves the snapshot into a folder on your PC. • Application architecture? One MXML file containing ALL code. • Not very scalable, extensible, nor
  • 7. Take a look at the original app (cont.)
  • 8. Time for an “Extreme Makeover!”
  • 9. Time for an “Extreme Makeover!” Setting up Your Environment • Not unlike many other frameworks, the MATE framework enables the developer to build loosely coupled applications. Separating the application’s views from the service layer and from the business logic results in an application that is scalable, reusable, and easier to understand. • Even a small application that implements the MATE framework will consist of various smaller custom classes.
  • 10. Time for an “Extreme Makeover!” Setting up Your Environment (cont.)
  • 11. Time for an “Extreme Makeover!” Adding the MATE library • ASFusion currently makes available two compiled libraries for download (as of this writing) – Version 0.7.7 for Flex 3 – Version 0.7.7 for Flex 2 • You can also download and browse the source via SVN http://mate-
  • 12. Time for an “Extreme Makeover!” Adding the MATE library (cont.) • Add the compiled MATE (swc) to your project. For smaller applications this can be placed into your lib folder. • From the main menu select Project > Properties. • Select Flex Build Path from the left-hand menu in the Properties dialog box. • Select the Library Path tab. • Click on the Add SWC button. • Browse to the folder containing the .swc file
  • 13. Time for an “Extreme Makeover!” Create a Config Class • It not necessary for you to create a Config class in order to build an application using MATE. • I do so only for this demo app to demonstrate the passing of values into the ClipSafeManager class (more on this class later). • It’s a simple custom class defining two constants and their values.
  • 14. Time for an “Extreme Makeover!” Converting the View • Strip out the view and place it into it’s own custom component. • Place the custom view component into the views folder. • Define a script block that will import the required classes, declare public variables, and define functions to support the view.
  • 15. Time for an “Extreme Makeover!” – Dispatching Events from the View using dispatchEvent() This is the standard way of dispatching a standard and custom events. NOTE: • The dispatched event must have its bubbling setting as “true” AND
  • 16. Time for an “Extreme Makeover!” – Dispatching Events from the View using <Dispatcher …> This tag can be used to dispatch an event from anywhere in the application. Using this tag guarantees that the event will be received by ALL registered listeners. • Use the generator attribute to specify the event class that should be dispatched. • Use the type attribute to specify the type of event.
  • 17. Time for an “Extreme Makeover!” Defining the Event Map • MATE is an event-based framework that revolves around what is known as an Event Map. The Event Map file is an MXML component extended from the EventMap class. • An event map defines, among other things, one or more event handlers for the application. The <Event Handlers …> tag is used to listen to events dispatched by
  • 18. Time for an “Extreme Makeover!” Defining Event Handlers • The <EventHandlers …> tag is used to define one or more handlers that are executed whenever a specified event type occurs. The event type can be either a standard Flex/Flash event OR
  • 19. Time for an “Extreme Makeover!” Create the Custom Event Classes • You create the custom events that same way you always have (have you?) • ClipSafeEvent is the event that will be triggered when the Start/Stop button is clicked from the view. • CapturePixEvent is the event that will be triggered when the application detects that a an image has been captured.
  • 20. Time for an “Extreme Makeover!” Create the Value Object (vo) class • This class will be used in the CapturePixEvent class allowing us to pass the snapshot information along with the event.
  • 21. Time for an “Extreme Makeover!” Using the ObjectBuilder tag • The <ObjectBuilder …> tag is used to create an object instance. The type of object is specified in the generator attribute of this tag. Arguments can be passed to the constructor of the class by using the constructorArguments attribute of this class. This attribute expects an array of values. • You can specify whether the object will be cached or not by using the cache attribute. By specifying “true” as the value of this attribute
  • 22. Time for an “Extreme Makeover!” - Creating a an Application Manager ClipSafeManager • This is the business layer of the application. • Your application may have one or more of these type of classes. • This class will contain methods that are called from the MainEventMap component.
  • 23. Time for an “Extreme Makeover!” Using the MethodInvoker tag • The <Method Invoker …> tag is used to create an object instance of the class specified in the generator attribute (unless cache is set to “true” in a previous ObjectBuilder tag). Then it will execute the method specified in the method attribute. • Arguments can be passed via the arguments attribute. The arguments attribute expects an array of values.
  • 24. Time for an “Extreme Makeover!” Using PropertyInjectors • These tags are also defined in the MainEventMap component. • The PropertyInjector tag is placed within the Injectors tag block. • They are used to inject property values from a specified source into a specified target. • The target class is specified in the target attribute of the Injectors tag. • The target property, source class, and source, property are specified in the PropertyInjector
  • 25. Extending MATE • It is very easy to create your own extensions to the MATE framework. • MATE extensions are custom classes that extend the AbstractServiceInvoker class and implement the IAction class. • Extenting from the AbstractServiceInvoker class will give your custom extension access to inner result and fault handlers. • Implementing the IAction class allows
  • 26. Extending MATE (cont.) to override • Your custom extension needs the run method and script it to do what you want it to do when. • You need to specify what event will trigger your resultHandlers execution and who is dispatching that event. • Use the createInnerHandlers method defined by the AbstractServiceInvoker class to define your result and fault handlers.
  • 27. Summary Download - Learn - Participate! ASFusion Web site: http://mate.asfusion.com/