SlideShare a Scribd company logo
Structuring Flex applications with the Swiz frameworkSpreker:  Jamie Craane
AgendaPresentationpatternsSwizQ&A
PresentationPatternsAutonomous viewPresentation ModelCode BehindModel View PresenterModel View ControllerAnd many more…
Autonomous viewView
Code BehindViewMXMLCode-behindEventhandlersData Model
Model View PresenterUses contract to read/write view dataViewPresenterRead/writemodelModel
Presentation ModelViewPresentationmodelModel
Model View ControllerResponds to user eventsViewControllerUpdatesmodelModelNotifies view
Structuring your flex application with swiz
MVCViewModelServicedisplayupdateupdatemediatorupdateinvokesinvokesinvokesController
Model: Representing StateRepresentsclient state
[Bindable] : dispatcheseventon state changesessionuserpersonListtaskListselectedPerson
View: Presentation and InteractionViewModelReferencespersonlisttaskdetailsNotifiesPresents model to the user
Responds to model changes, ({} databinding)
Responds to user actions, (Declarativeeventhandling)
MostlyMXMLController: ExposeActionsUser-initiatedactions
Invokes services
Updates modelViewControllercallServiceInvokeModelUpdates
Service: EncapsulatesbackendsServicesPersonServiceTaskServicePersonServiceMockService callsremotedestinations
HttpServiceorRemoteObject (ie. BlazeDS)
Returns anASyncToken
Logical place forstubsMediators: update viewUser-initiatedactionsUpdates viewUpdates model (ifneeded)MediatorInterfaceViewcallViewUpdatesModelUpdates
SwizMicro architecture and Dependency Injection framework
MircoArchitectureFramework“Enables, but not restricts, in the implementation of an application following any given architecture”
Swiz in a nutshellDependency InjectionEvent MediationUtilitiesServiceHelperGlobal exception handlerAnd more…MetaData processors
DependencyInjection 1How can a given object obtain a reference to another object?
DependencyInjection 2Object AObject BDepends on
DependencyInjection 3Object ADI frameworkObject BObject AObject BApplicationContext
Dependencyinjection 4[Inject]public var userController:UserController;<?xml version="1.0" encoding="utf-8"?><swiz:BeanProvider	<controller:UserController/></swiz:BeanProvider>
Dependencyinjection 5Typically inject by typeSpecify Bean ID if necessaryWorks with interfaces and inheritance
WhyDependencyInjection?Removes dependencies on concrete implementationsNo ServiceLocatorEasy to see dependencies
EventMediationdispatcher.dispatchEvent(new TaskEvent(TaskEvent.SAVE_TASK_SUCCESS, true));[Mediate(event="TaskEvent.SAVE_TASK_SUCCESS")]publicfunction saveTaskSuccess():void {  this.closeTaskDetailsWindow();  taskController.retrieveTasks();}

More Related Content

PPTX
Trustparency Mobile Architecture
PDF
Clean VIP (Clean Swift) architecture
PPTX
Introduction to Custom Development in Microsoft Dynamics CRM 2015
PPT
3 Tier Animation
PPS
How a three-tier web application works
PPTX
OpenB Web Engine - Conceptual overview
PPTX
SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...
PPTX
Model view controller (mvc)
Trustparency Mobile Architecture
Clean VIP (Clean Swift) architecture
Introduction to Custom Development in Microsoft Dynamics CRM 2015
3 Tier Animation
How a three-tier web application works
OpenB Web Engine - Conceptual overview
SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...
Model view controller (mvc)

What's hot (20)

ODP
What is MVC?
PPT
Microsoft Biz Talk Server
PPTX
Angular introduction basic
PPTX
Single page application 03
PDF
Web Service
DOCX
Interview Questions For Microsoft Dynamics CRM
PPT
Session vi(user control)
PPTX
MVVM In Use
PPTX
Mvc fundamental
PPT
ASP.NET 4 and AJAX
PPTX
Using WatiN in Sharepoint
PPTX
Plugins 101 In Microsoft Dynamics CRM 2015
PDF
Principles of MVC for Rails Developers
PPTX
MVC architecture by Mohd.Awais on 18th Aug, 2017
PPTX
Computer training classes for pega
PPTX
Trigon Flexismart Screenshots (Website)
PPTX
Getting Started With the TFS Object Model
PDF
MVC Architecture
What is MVC?
Microsoft Biz Talk Server
Angular introduction basic
Single page application 03
Web Service
Interview Questions For Microsoft Dynamics CRM
Session vi(user control)
MVVM In Use
Mvc fundamental
ASP.NET 4 and AJAX
Using WatiN in Sharepoint
Plugins 101 In Microsoft Dynamics CRM 2015
Principles of MVC for Rails Developers
MVC architecture by Mohd.Awais on 18th Aug, 2017
Computer training classes for pega
Trigon Flexismart Screenshots (Website)
Getting Started With the TFS Object Model
MVC Architecture
Ad

Viewers also liked (8)

PPTX
Marco conceptual
PDF
Claves para elaborar un plan de sucesión. anticiparse al futuro y retener el ...
PPTX
Charla Final Plan De SucesióN
PDF
Taller: Planes de Sucesión - 18 de junio - San José, Costa Rica
PPTX
Planes de sucesión 1
PPT
Succession Planning
PDF
Cómo hacer un plan de sucesión en la empresa: anticiparse al futuro
PDF
Planificar la sucesión en la empresa familiar
Marco conceptual
Claves para elaborar un plan de sucesión. anticiparse al futuro y retener el ...
Charla Final Plan De SucesióN
Taller: Planes de Sucesión - 18 de junio - San José, Costa Rica
Planes de sucesión 1
Succession Planning
Cómo hacer un plan de sucesión en la empresa: anticiparse al futuro
Planificar la sucesión en la empresa familiar
Ad

Similar to Structuring your flex application with swiz (20)

PPT
MVC Pattern. Flex implementation of MVC
PPTX
Applying Code Customizations to Magento 2
PDF
Spring Framework-II
PDF
Mobile architectures
PPTX
Building an enterprise app in silverlight 4 and NHibernate
PPTX
Jsf presentation
PDF
Portable Class Libraries and MVVM
PPTX
Stephen Kennedy Silverlight 3 Deep Dive
PDF
MVC Web Application
PPT
PPT
MVC
PPTX
8-9-10. ASP_updated8-9-10. ASP_updated8-9-10. ASP_updated
PDF
A4 from rad to mvc
PDF
Component Based UI Architecture - Alex Moldovan
PPTX
J2EE pattern 5
PPTX
Model view controller (mvc)
PPTX
AngularJs Workshop SDP December 28th 2014
PPT
Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...
PDF
Dot net training bangalore
PPTX
MVC Pattern. Flex implementation of MVC
Applying Code Customizations to Magento 2
Spring Framework-II
Mobile architectures
Building an enterprise app in silverlight 4 and NHibernate
Jsf presentation
Portable Class Libraries and MVVM
Stephen Kennedy Silverlight 3 Deep Dive
MVC Web Application
MVC
8-9-10. ASP_updated8-9-10. ASP_updated8-9-10. ASP_updated
A4 from rad to mvc
Component Based UI Architecture - Alex Moldovan
J2EE pattern 5
Model view controller (mvc)
AngularJs Workshop SDP December 28th 2014
Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...
Dot net training bangalore

Recently uploaded (20)

PDF
project resource management chapter-09.pdf
PPTX
A Presentation on Touch Screen Technology
PDF
A novel scalable deep ensemble learning framework for big data classification...
PDF
Heart disease approach using modified random forest and particle swarm optimi...
PDF
Hybrid model detection and classification of lung cancer
PDF
Web App vs Mobile App What Should You Build First.pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PPTX
Tartificialntelligence_presentation.pptx
PDF
DP Operators-handbook-extract for the Mautical Institute
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Mushroom cultivation and it's methods.pdf
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
Approach and Philosophy of On baking technology
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Getting Started with Data Integration: FME Form 101
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
August Patch Tuesday
project resource management chapter-09.pdf
A Presentation on Touch Screen Technology
A novel scalable deep ensemble learning framework for big data classification...
Heart disease approach using modified random forest and particle swarm optimi...
Hybrid model detection and classification of lung cancer
Web App vs Mobile App What Should You Build First.pdf
Programs and apps: productivity, graphics, security and other tools
Accuracy of neural networks in brain wave diagnosis of schizophrenia
Tartificialntelligence_presentation.pptx
DP Operators-handbook-extract for the Mautical Institute
A comparative study of natural language inference in Swahili using monolingua...
Encapsulation_ Review paper, used for researhc scholars
Mushroom cultivation and it's methods.pdf
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Approach and Philosophy of On baking technology
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Getting Started with Data Integration: FME Form 101
Assigned Numbers - 2025 - Bluetooth® Document
A comparative analysis of optical character recognition models for extracting...
August Patch Tuesday

Structuring your flex application with swiz