SlideShare une entreprise Scribd logo
1  sur  40
Spring ActionScript ChristopheHerreman
Agenda What is Spring ActionScript The IoC container Configuration MVC Architecture Demo Q&A
What is Spring ActionScript(1/2) Inversion of Control (IoC) forActionScript 3.0 Flash/Flex/AIR/Pure AS3 IoC container Tailoredarchitectures (noprescriptivestructure)
What is Spring ActionScript(2/2) Started as anin-houselibrary Formerlyknown as the Pranaframework Incubated as a Spring Extension project Upcoming release 1.0 (1.0RC1) AS3Commons: Lang, Logging, Reflect, …
The IoC Container (1/2) = Object Factory Creates and assembles objects Centralizeddependency management Spring AS: configuration via XML or MXML
The IoC Container (2/2) Object (bean): object managed and/orcreatedby the container Object Factory: factorythatcreates and managesobjects factory.getObject(“myObject”) Object Definition: blueprintforan object Application Context: smarter Object Factory
Configuration(1/9) MXML Configuration // AppContext.mxml file, compiledinto the application <Objects> 	<app:ApplicationModelid=“appModel” /> 	<app:ApplicationControllerid=“appController” 		applicationModel=“{appModel}”/> </Objects>
Configuration(2/9) MXML Configuration: loading var context:MXMLApplicationContext = newMXMLApplicationContext(); context.addConfig(AppContext); context.addEventListener(Event.COMPLETE, context_completeHandler); context.load(); function context_completeHandler(event:Event):void { varappModel:ApplicationModel = context.getObject(“appModel”); varappController:ApplicationController = 					  		context.getObject(“appController”); }
Configuration(3/9) MXML Configuration: alternativeapproach // AppContext.mxml file, compiledinto the application <Objects> 	<Object id=“appModel” clazz=“{ApplicationModel}”/> 	<Object id=“appController” clazz=“{ApplicationController}”> 			<Property name=“applicationModel” ref=“appModel”/> 	</Object> </objects>
Configuration(4/9) MXML Configuration: pros Editor support Simple to use
Configuration(5/9) MXML Configuration: cons Compiledinto the application Explicitdeclaration: limited to singletons, noexternalreferences, no prototypes -> use Spring AS MXML dialect
Configuration(6/9) XML Configuration // externalcontext.xml, loadedonapplicationstartup <objects> 	<object id=“appModel” class=“com.domain.app.ApplicationModel”/> 	<object id=“appController” class=“com.domain.app.ApplicationController”> 			<property name=“applicationModel” ref=“appModel”/> 	</object> </objects>
Configuration(7/9) XML Configuration: loading var context:XMLApplicationContext = newXMLApplicationContext(); context.addConfigLocation(“context.xml”); context.addEventListener(Event.COMPLETE, context_completeHandler); context.load(); function context_completeHandler(event:Event):void { 	var appModel:ApplicationModel = context.getObject(“appModel”); 	var appController:ApplicationController = 					  		context.getObject(“appController”); }
Configuration(8/9) XML Configuration: pros Richer dialect than MXML config Usablefornon-Flexprojects No need to recompile (in some cases) Familiar to Spring Java users
Configuration(9/9) XML Configuration: cons Classes need to becompiledinto the app, noclassloading (!) No editor support, only XSD
MVC Architecture(1/3) No realprescriptivearchitecture Do youreallyneedone? Rollyourownbecauseone does NOT fit all Many MVC architectures out there: Cairngorm (2), PureMVC, Mate, … … Spring AS wants to support them (seeextensions)
MVC Architecture(2/3) Spring AS MVC ingredients Operation API  Event Bus Autowiring Recommendations Presentation Model (Fowler) LayeredArchitecture (DDD – Evans)
MVC Architecture(3/3) LayeredArchitecture (DDD – Evans)
The Operation API (1/7) Asynchronousbehavior in Flash Player: loadingexternal resources, RMI, sqlite, Webservices, HTTPServices, … No threading API Many different APIs: AsyncToken, Responders, Callbacks, Events… we need a unifiedapproach!
The Operation API (2/7) Problem: a user repository (or service) interface IUserRepository { functiongetUser(id:int): ??? } What does the getUsermethod return? AsyncToken (Flex/RemoteObject), User (In memory), void (events)
The Operation API (3/7) Spring AS solution: return anIOperation interface IUserRepository { functiongetUser(id:int):IOperation; } Cannowbeused in anyActionScript 3 context and easilymockedfortesting
The Operation API (4/7) In Spring AS, an “operation” is used to indicateanasynchronousexecution IOperation interface with “complete” and “error” events IProgressOperationwith “progress” event OperationQueuebundlesoperations (a compositeoperation)
The Operation API (5/7) Defininganoperation: public classGetUserOperationextendsAbstractOperation { functionGetUserOperation(remoteObject:RemoteObject, id:String) { vartoken:AsyncToken = remoteObject.getUser(id); token.addResponder(newResponder(resultHandler, faultHandler)); 	} 	private functionresultHandler(event:ResultEvent):void { dispatchCompleteEvent(User(event.result)); 	} 	private functionfaultHandler(event:FaultEvent):void { dispatchErrorEvent(event.fault); 	} }
The Operation API (6/7) Usage: varoperation:IOperation = newGetUserOperation(remoteObject, 13); operation.addCompleteListener(function(event:OperationEvent):void { var user:User = event.result; }); operation.addErrorListener(function(event:OperationEvent):void { Alert.show(event.error, “Error”); });
The Operation API (7/7) A progressoperation: varoperation:IOperation = newSomeProgressOperation(param1, param2); operation.addCompleteListener(function(event:OperationEvent):void { }); operation.addErrorListener(function(event:OperationEvent):void { }); operation.addProgressListener(function(event:OperationEvent):void { 	var op:IProgressOperation = IProgressOperation(event.operation); trace(“Progress:” + op.progress + “, total: “ + op.total); });
The Event Bus (1/4) Publish/subscribeevent system Usedforglobalapplicationevents Promotesloosecoupling Works withstandard Flash Events; noneed to subclass Spring AS base classes
The Event Bus (2/4) Listening/subscribing to events: // listen for all events EventBus.addListener(listener:IEventBusListener); functiononEvent(event:Event):void { } // listen forspecificevents EventBus.addEventListener(“anEvent”, handler); functionhandler(event:Event):void { }
The Event Bus (3/4) Dispatching/publishingevents: // dispatchstandardevent EventBus.dispatchEvent(newEvent(“someEvent”)); // dispatchcustomevent classUserEventextendsEvent { 	...  } EventBus.dispatchEvent(newUserEvent(UserEvent.DELETE, user));
The Event Bus (4/4) Routing events: <object id="routeEventsProcessor" class="org.springextensions.actionscript.ioc.factory.config.RouteEventsMetaDataPostProcessor"/> [RouteEvents] Public classMyClass {} or… [RouteEvents(events=“eventA,eventB”)] Public classMyClass {}
Autowiring(1/2) Auto DependencyInjection via metadata Autowireby type, name, constructor, autodetect Works forobjectsmanagedby the container and for view components Be careful: magic happens, noexplicitconfiguration
Autowiring(2/2) Annotate a propertywith [Autowired] classUserController { 	[Autowired] 	public var userRepository:IUserRepository; } [Autowired(name=“myObject“, property=“prop”)]
The Container (1/5) Object references <object id=“me” class=“Person”/> <object id=“john” class=“Person”> 	<property name=“buddy" ref=“me“ /> </object>
The Container (2/5) PropertyPlaceholderConfigurerer Loadsexternalproperties Properties: (server.properties) host=172.16.34.4 port=8081 contex-root=myapp Config: <object 	class=“org.springextensions.actionscript.ioc.factory.config.PropertyPlaceholderConfigurer”> 	<property name=“location” 	value=“server.properties”/> </object> <object id=“userRemoteObject” class=“mx.rpc.remoting.mxml.RemoteObject”> 	<property name="endpoint" 	value="http://${host}:${port}/${context-	root}/messagebroker/amf" /> </object>
The Container (3/5) Parentdefinitions / abstract definitions <object id="remoteObject" class="mx.rpc.remoting.mxml.RemoteObject" abstract="true"> 		<property name="endpoint" value="http://${host}:${port}/${context-root}/messagebroker/amf" /> 		<property name="showBusyCursor" value="true" /> </object> <object id=“userRemoteObject" parent="remoteObject"> 	<property name="destination" value=“userService" /> </object>
The Container (4/5) Object definition scopes Singleton (default): sameinstance is returnedoneachrequest Prototype: newinstance is returned <object id=“mySingleton” class=“MyClass”/> <object id=“myPrototype” class=“MyClass” scope=“prototype”/> or… <object id=“myPrototype” class=“MyClass” singleton=“false”/>
The Container (5/5) Lazyinitializedobjects Singletonsthat are notinstantiatedwhen the container starts <object id=“myLazyObject” class=“MyClass” lazy-init=“true”/>
And there is more… Module support XML namespaces (rpc, messaging, util, …) Task API Service base classes Container extensionpoints (factory post processors, object post processors, custom metadata handlers, …) Workingon: testing support, AOP, …
Summary Dependency Management Loosecoupling, type to interfaces Usewithotherframeworks Spring mentality: provide choice Promote best practices
DEMO A sample application
Thanksforyourattention! www.herrodius.com info@herrodius.com www.springactionscript.org www.as3commons.org

Contenu connexe

Tendances (20)

Java Servlets & JSP
Java Servlets & JSPJava Servlets & JSP
Java Servlets & JSP
 
Introduction to Spring Boot
Introduction to Spring BootIntroduction to Spring Boot
Introduction to Spring Boot
 
Identifing Listeners and Filters
Identifing Listeners and FiltersIdentifing Listeners and Filters
Identifing Listeners and Filters
 
Java Servlets
Java ServletsJava Servlets
Java Servlets
 
Servlets lecture1
Servlets lecture1Servlets lecture1
Servlets lecture1
 
Jsp servlets
Jsp servletsJsp servlets
Jsp servlets
 
Java Servlets
Java ServletsJava Servlets
Java Servlets
 
Spring Framework - AOP
Spring Framework - AOPSpring Framework - AOP
Spring Framework - AOP
 
Java servlets
Java servletsJava servlets
Java servlets
 
Java Server Faces
Java Server FacesJava Server Faces
Java Server Faces
 
Javax.servlet,http packages
Javax.servlet,http packagesJavax.servlet,http packages
Javax.servlet,http packages
 
Spring 4 Web App
Spring 4 Web AppSpring 4 Web App
Spring 4 Web App
 
Web Tech Java Servlet Update1
Web Tech   Java Servlet Update1Web Tech   Java Servlet Update1
Web Tech Java Servlet Update1
 
Servlets
ServletsServlets
Servlets
 
WEB TECHNOLOGIES Servlet
WEB TECHNOLOGIES ServletWEB TECHNOLOGIES Servlet
WEB TECHNOLOGIES Servlet
 
Advanced Java
Advanced JavaAdvanced Java
Advanced Java
 
Next stop: Spring 4
Next stop: Spring 4Next stop: Spring 4
Next stop: Spring 4
 
Java Servlet
Java Servlet Java Servlet
Java Servlet
 
Chapter 3 servlet & jsp
Chapter 3 servlet & jspChapter 3 servlet & jsp
Chapter 3 servlet & jsp
 
Knowledge Sharing : Java Servlet
Knowledge Sharing : Java ServletKnowledge Sharing : Java Servlet
Knowledge Sharing : Java Servlet
 

En vedette

Rails, Postgres, Angular, and Bootstrap: The Power Stack
Rails, Postgres, Angular, and Bootstrap: The Power StackRails, Postgres, Angular, and Bootstrap: The Power Stack
Rails, Postgres, Angular, and Bootstrap: The Power StackDavid Copeland
 
Spring Mvc,Java, Spring
Spring Mvc,Java, SpringSpring Mvc,Java, Spring
Spring Mvc,Java, Springifnu bima
 
Enterprise Java Web Application Frameworks Sample Stack Implementation
Enterprise Java Web Application Frameworks   Sample Stack ImplementationEnterprise Java Web Application Frameworks   Sample Stack Implementation
Enterprise Java Web Application Frameworks Sample Stack ImplementationMert Çalışkan
 
Comparative analysis of java script framework
Comparative analysis of java script frameworkComparative analysis of java script framework
Comparative analysis of java script frameworkNishant Kumar
 
The Full Stack Java Developer - Josh Long
The Full Stack Java Developer - Josh LongThe Full Stack Java Developer - Josh Long
The Full Stack Java Developer - Josh Longploibl
 
Modular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJSModular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJSGunnar Hillert
 
AngularJS - Architecture decisions in a large project 
AngularJS - Architecture decisionsin a large project AngularJS - Architecture decisionsin a large project 
AngularJS - Architecture decisions in a large project Elad Hirsch
 
Creating applications with Grails, Angular JS and Spring Security
Creating applications with Grails, Angular JS and Spring SecurityCreating applications with Grails, Angular JS and Spring Security
Creating applications with Grails, Angular JS and Spring SecurityAlvaro Sanchez-Mariscal
 
Scaling AngularJS: Enterprise SOA on the MEAN Stack (Responsive Web & Mobile)
Scaling AngularJS: Enterprise SOA on the MEAN Stack (Responsive Web & Mobile)Scaling AngularJS: Enterprise SOA on the MEAN Stack (Responsive Web & Mobile)
Scaling AngularJS: Enterprise SOA on the MEAN Stack (Responsive Web & Mobile)Movel
 

En vedette (11)

Rails, Postgres, Angular, and Bootstrap: The Power Stack
Rails, Postgres, Angular, and Bootstrap: The Power StackRails, Postgres, Angular, and Bootstrap: The Power Stack
Rails, Postgres, Angular, and Bootstrap: The Power Stack
 
Angular Seminar-js
Angular Seminar-jsAngular Seminar-js
Angular Seminar-js
 
Spring Mvc,Java, Spring
Spring Mvc,Java, SpringSpring Mvc,Java, Spring
Spring Mvc,Java, Spring
 
Enterprise Java Web Application Frameworks Sample Stack Implementation
Enterprise Java Web Application Frameworks   Sample Stack ImplementationEnterprise Java Web Application Frameworks   Sample Stack Implementation
Enterprise Java Web Application Frameworks Sample Stack Implementation
 
Comparative analysis of java script framework
Comparative analysis of java script frameworkComparative analysis of java script framework
Comparative analysis of java script framework
 
JavaScript MVC Frameworks: Backbone, Ember and Angular JS
JavaScript MVC Frameworks: Backbone, Ember and Angular JSJavaScript MVC Frameworks: Backbone, Ember and Angular JS
JavaScript MVC Frameworks: Backbone, Ember and Angular JS
 
The Full Stack Java Developer - Josh Long
The Full Stack Java Developer - Josh LongThe Full Stack Java Developer - Josh Long
The Full Stack Java Developer - Josh Long
 
Modular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJSModular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJS
 
AngularJS - Architecture decisions in a large project 
AngularJS - Architecture decisionsin a large project AngularJS - Architecture decisionsin a large project 
AngularJS - Architecture decisions in a large project 
 
Creating applications with Grails, Angular JS and Spring Security
Creating applications with Grails, Angular JS and Spring SecurityCreating applications with Grails, Angular JS and Spring Security
Creating applications with Grails, Angular JS and Spring Security
 
Scaling AngularJS: Enterprise SOA on the MEAN Stack (Responsive Web & Mobile)
Scaling AngularJS: Enterprise SOA on the MEAN Stack (Responsive Web & Mobile)Scaling AngularJS: Enterprise SOA on the MEAN Stack (Responsive Web & Mobile)
Scaling AngularJS: Enterprise SOA on the MEAN Stack (Responsive Web & Mobile)
 

Similaire à Christophe Spring Actionscript Flex Java Exchange

Introduction to Actionscript3
Introduction to Actionscript3Introduction to Actionscript3
Introduction to Actionscript3Yoss Cohen
 
Writing a massive javascript app
Writing a massive javascript appWriting a massive javascript app
Writing a massive javascript appJustin Park
 
Microservices with Netflix OSS & Spring Cloud - Arnaud Cogoluègnes
 Microservices with Netflix OSS & Spring Cloud - Arnaud Cogoluègnes Microservices with Netflix OSS & Spring Cloud - Arnaud Cogoluègnes
Microservices with Netflix OSS & Spring Cloud - Arnaud Cogoluègnesdistributed matters
 
Microservices with Netflix OSS and Spring Cloud
Microservices with Netflix OSS and Spring CloudMicroservices with Netflix OSS and Spring Cloud
Microservices with Netflix OSS and Spring Cloudacogoluegnes
 
Spark Streaming Recipes and "Exactly Once" Semantics Revised
Spark Streaming Recipes and "Exactly Once" Semantics RevisedSpark Streaming Recipes and "Exactly Once" Semantics Revised
Spark Streaming Recipes and "Exactly Once" Semantics RevisedMichael Spector
 
Microservices with Netflix OSS and Spring Cloud - Dev Day Orange
Microservices with Netflix OSS and Spring Cloud -  Dev Day OrangeMicroservices with Netflix OSS and Spring Cloud -  Dev Day Orange
Microservices with Netflix OSS and Spring Cloud - Dev Day Orangeacogoluegnes
 
Jdk Tools For Performance Diagnostics
Jdk Tools For Performance DiagnosticsJdk Tools For Performance Diagnostics
Jdk Tools For Performance DiagnosticsDror Bereznitsky
 
Developing iPhone and iPad apps that leverage Windows Azure
Developing iPhone and iPad apps that leverage Windows AzureDeveloping iPhone and iPad apps that leverage Windows Azure
Developing iPhone and iPad apps that leverage Windows AzureSimon Guest
 
Maxim Salnikov - Service Worker: taking the best from the past experience for...
Maxim Salnikov - Service Worker: taking the best from the past experience for...Maxim Salnikov - Service Worker: taking the best from the past experience for...
Maxim Salnikov - Service Worker: taking the best from the past experience for...Codemotion
 
Angular performance slides
Angular performance slidesAngular performance slides
Angular performance slidesDavid Barreto
 
iPhone development from a Java perspective (Jazoon '09)
iPhone development from a Java perspective (Jazoon '09)iPhone development from a Java perspective (Jazoon '09)
iPhone development from a Java perspective (Jazoon '09)Netcetera
 
Cloud 2010
Cloud 2010Cloud 2010
Cloud 2010steccami
 
Fltk S60 Introduction
Fltk S60 IntroductionFltk S60 Introduction
Fltk S60 Introductionguest5c161
 
Sprint Portlet MVC Seminar
Sprint Portlet MVC SeminarSprint Portlet MVC Seminar
Sprint Portlet MVC SeminarJohn Lewis
 
Meteor Meet-up San Diego December 2014
Meteor Meet-up San Diego December 2014Meteor Meet-up San Diego December 2014
Meteor Meet-up San Diego December 2014Lou Sacco
 
JavaScript Engines and Event Loop
JavaScript Engines and Event Loop JavaScript Engines and Event Loop
JavaScript Engines and Event Loop Tapan B.K.
 
Swiss army knife Spring
Swiss army knife SpringSwiss army knife Spring
Swiss army knife SpringMario Fusco
 

Similaire à Christophe Spring Actionscript Flex Java Exchange (20)

Spring Actionscript at Devoxx
Spring Actionscript at DevoxxSpring Actionscript at Devoxx
Spring Actionscript at Devoxx
 
Introduction to Actionscript3
Introduction to Actionscript3Introduction to Actionscript3
Introduction to Actionscript3
 
Signal Framework
Signal FrameworkSignal Framework
Signal Framework
 
Writing a massive javascript app
Writing a massive javascript appWriting a massive javascript app
Writing a massive javascript app
 
Microservices with Netflix OSS & Spring Cloud - Arnaud Cogoluègnes
 Microservices with Netflix OSS & Spring Cloud - Arnaud Cogoluègnes Microservices with Netflix OSS & Spring Cloud - Arnaud Cogoluègnes
Microservices with Netflix OSS & Spring Cloud - Arnaud Cogoluègnes
 
Microservices with Netflix OSS and Spring Cloud
Microservices with Netflix OSS and Spring CloudMicroservices with Netflix OSS and Spring Cloud
Microservices with Netflix OSS and Spring Cloud
 
Spark Streaming Recipes and "Exactly Once" Semantics Revised
Spark Streaming Recipes and "Exactly Once" Semantics RevisedSpark Streaming Recipes and "Exactly Once" Semantics Revised
Spark Streaming Recipes and "Exactly Once" Semantics Revised
 
Microservices with Netflix OSS and Spring Cloud - Dev Day Orange
Microservices with Netflix OSS and Spring Cloud -  Dev Day OrangeMicroservices with Netflix OSS and Spring Cloud -  Dev Day Orange
Microservices with Netflix OSS and Spring Cloud - Dev Day Orange
 
Jdk Tools For Performance Diagnostics
Jdk Tools For Performance DiagnosticsJdk Tools For Performance Diagnostics
Jdk Tools For Performance Diagnostics
 
Developing iPhone and iPad apps that leverage Windows Azure
Developing iPhone and iPad apps that leverage Windows AzureDeveloping iPhone and iPad apps that leverage Windows Azure
Developing iPhone and iPad apps that leverage Windows Azure
 
Maxim Salnikov - Service Worker: taking the best from the past experience for...
Maxim Salnikov - Service Worker: taking the best from the past experience for...Maxim Salnikov - Service Worker: taking the best from the past experience for...
Maxim Salnikov - Service Worker: taking the best from the past experience for...
 
Angular performance slides
Angular performance slidesAngular performance slides
Angular performance slides
 
iPhone development from a Java perspective (Jazoon '09)
iPhone development from a Java perspective (Jazoon '09)iPhone development from a Java perspective (Jazoon '09)
iPhone development from a Java perspective (Jazoon '09)
 
Cloud 2010
Cloud 2010Cloud 2010
Cloud 2010
 
Fltk S60 Introduction
Fltk S60 IntroductionFltk S60 Introduction
Fltk S60 Introduction
 
Sprint Portlet MVC Seminar
Sprint Portlet MVC SeminarSprint Portlet MVC Seminar
Sprint Portlet MVC Seminar
 
Meteor Meet-up San Diego December 2014
Meteor Meet-up San Diego December 2014Meteor Meet-up San Diego December 2014
Meteor Meet-up San Diego December 2014
 
JavaScript Engines and Event Loop
JavaScript Engines and Event Loop JavaScript Engines and Event Loop
JavaScript Engines and Event Loop
 
iiwas2009
iiwas2009iiwas2009
iiwas2009
 
Swiss army knife Spring
Swiss army knife SpringSwiss army knife Spring
Swiss army knife Spring
 

Plus de Skills Matter

5 things cucumber is bad at by Richard Lawrence
5 things cucumber is bad at by Richard Lawrence5 things cucumber is bad at by Richard Lawrence
5 things cucumber is bad at by Richard LawrenceSkills Matter
 
Patterns for slick database applications
Patterns for slick database applicationsPatterns for slick database applications
Patterns for slick database applicationsSkills Matter
 
Scala e xchange 2013 haoyi li on metascala a tiny diy jvm
Scala e xchange 2013 haoyi li on metascala a tiny diy jvmScala e xchange 2013 haoyi li on metascala a tiny diy jvm
Scala e xchange 2013 haoyi li on metascala a tiny diy jvmSkills Matter
 
Oscar reiken jr on our success at manheim
Oscar reiken jr on our success at manheimOscar reiken jr on our success at manheim
Oscar reiken jr on our success at manheimSkills Matter
 
Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...
Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...
Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...Skills Matter
 
Cukeup nyc ian dees on elixir, erlang, and cucumberl
Cukeup nyc ian dees on elixir, erlang, and cucumberlCukeup nyc ian dees on elixir, erlang, and cucumberl
Cukeup nyc ian dees on elixir, erlang, and cucumberlSkills Matter
 
Cukeup nyc peter bell on getting started with cucumber.js
Cukeup nyc peter bell on getting started with cucumber.jsCukeup nyc peter bell on getting started with cucumber.js
Cukeup nyc peter bell on getting started with cucumber.jsSkills Matter
 
Agile testing & bdd e xchange nyc 2013 jeffrey davidson & lav pathak & sam ho...
Agile testing & bdd e xchange nyc 2013 jeffrey davidson & lav pathak & sam ho...Agile testing & bdd e xchange nyc 2013 jeffrey davidson & lav pathak & sam ho...
Agile testing & bdd e xchange nyc 2013 jeffrey davidson & lav pathak & sam ho...Skills Matter
 
Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...
Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...
Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...Skills Matter
 
Progressive f# tutorials nyc don syme on keynote f# in the open source world
Progressive f# tutorials nyc don syme on keynote f# in the open source worldProgressive f# tutorials nyc don syme on keynote f# in the open source world
Progressive f# tutorials nyc don syme on keynote f# in the open source worldSkills Matter
 
Agile testing & bdd e xchange nyc 2013 gojko adzic on bond villain guide to s...
Agile testing & bdd e xchange nyc 2013 gojko adzic on bond villain guide to s...Agile testing & bdd e xchange nyc 2013 gojko adzic on bond villain guide to s...
Agile testing & bdd e xchange nyc 2013 gojko adzic on bond villain guide to s...Skills Matter
 
Dmitry mozorov on code quotations code as-data for f#
Dmitry mozorov on code quotations code as-data for f#Dmitry mozorov on code quotations code as-data for f#
Dmitry mozorov on code quotations code as-data for f#Skills Matter
 
A poet's guide_to_acceptance_testing
A poet's guide_to_acceptance_testingA poet's guide_to_acceptance_testing
A poet's guide_to_acceptance_testingSkills Matter
 
Russ miles-cloudfoundry-deep-dive
Russ miles-cloudfoundry-deep-diveRuss miles-cloudfoundry-deep-dive
Russ miles-cloudfoundry-deep-diveSkills Matter
 
Simon Peyton Jones: Managing parallelism
Simon Peyton Jones: Managing parallelismSimon Peyton Jones: Managing parallelism
Simon Peyton Jones: Managing parallelismSkills Matter
 
I went to_a_communications_workshop_and_they_t
I went to_a_communications_workshop_and_they_tI went to_a_communications_workshop_and_they_t
I went to_a_communications_workshop_and_they_tSkills Matter
 

Plus de Skills Matter (20)

5 things cucumber is bad at by Richard Lawrence
5 things cucumber is bad at by Richard Lawrence5 things cucumber is bad at by Richard Lawrence
5 things cucumber is bad at by Richard Lawrence
 
Patterns for slick database applications
Patterns for slick database applicationsPatterns for slick database applications
Patterns for slick database applications
 
Scala e xchange 2013 haoyi li on metascala a tiny diy jvm
Scala e xchange 2013 haoyi li on metascala a tiny diy jvmScala e xchange 2013 haoyi li on metascala a tiny diy jvm
Scala e xchange 2013 haoyi li on metascala a tiny diy jvm
 
Oscar reiken jr on our success at manheim
Oscar reiken jr on our success at manheimOscar reiken jr on our success at manheim
Oscar reiken jr on our success at manheim
 
Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...
Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...
Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...
 
Cukeup nyc ian dees on elixir, erlang, and cucumberl
Cukeup nyc ian dees on elixir, erlang, and cucumberlCukeup nyc ian dees on elixir, erlang, and cucumberl
Cukeup nyc ian dees on elixir, erlang, and cucumberl
 
Cukeup nyc peter bell on getting started with cucumber.js
Cukeup nyc peter bell on getting started with cucumber.jsCukeup nyc peter bell on getting started with cucumber.js
Cukeup nyc peter bell on getting started with cucumber.js
 
Agile testing & bdd e xchange nyc 2013 jeffrey davidson & lav pathak & sam ho...
Agile testing & bdd e xchange nyc 2013 jeffrey davidson & lav pathak & sam ho...Agile testing & bdd e xchange nyc 2013 jeffrey davidson & lav pathak & sam ho...
Agile testing & bdd e xchange nyc 2013 jeffrey davidson & lav pathak & sam ho...
 
Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...
Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...
Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...
 
Progressive f# tutorials nyc don syme on keynote f# in the open source world
Progressive f# tutorials nyc don syme on keynote f# in the open source worldProgressive f# tutorials nyc don syme on keynote f# in the open source world
Progressive f# tutorials nyc don syme on keynote f# in the open source world
 
Agile testing & bdd e xchange nyc 2013 gojko adzic on bond villain guide to s...
Agile testing & bdd e xchange nyc 2013 gojko adzic on bond villain guide to s...Agile testing & bdd e xchange nyc 2013 gojko adzic on bond villain guide to s...
Agile testing & bdd e xchange nyc 2013 gojko adzic on bond villain guide to s...
 
Dmitry mozorov on code quotations code as-data for f#
Dmitry mozorov on code quotations code as-data for f#Dmitry mozorov on code quotations code as-data for f#
Dmitry mozorov on code quotations code as-data for f#
 
A poet's guide_to_acceptance_testing
A poet's guide_to_acceptance_testingA poet's guide_to_acceptance_testing
A poet's guide_to_acceptance_testing
 
Russ miles-cloudfoundry-deep-dive
Russ miles-cloudfoundry-deep-diveRuss miles-cloudfoundry-deep-dive
Russ miles-cloudfoundry-deep-dive
 
Serendipity-neo4j
Serendipity-neo4jSerendipity-neo4j
Serendipity-neo4j
 
Simon Peyton Jones: Managing parallelism
Simon Peyton Jones: Managing parallelismSimon Peyton Jones: Managing parallelism
Simon Peyton Jones: Managing parallelism
 
Plug 20110217
Plug   20110217Plug   20110217
Plug 20110217
 
Lug presentation
Lug presentationLug presentation
Lug presentation
 
I went to_a_communications_workshop_and_they_t
I went to_a_communications_workshop_and_they_tI went to_a_communications_workshop_and_they_t
I went to_a_communications_workshop_and_they_t
 
Plug saiku
Plug   saikuPlug   saiku
Plug saiku
 

Dernier

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
 
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
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
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
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
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
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
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
 
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
 
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
 

Dernier (20)

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
 
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
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
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
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
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
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
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
 
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
 

Christophe Spring Actionscript Flex Java Exchange

  • 2. Agenda What is Spring ActionScript The IoC container Configuration MVC Architecture Demo Q&A
  • 3. What is Spring ActionScript(1/2) Inversion of Control (IoC) forActionScript 3.0 Flash/Flex/AIR/Pure AS3 IoC container Tailoredarchitectures (noprescriptivestructure)
  • 4. What is Spring ActionScript(2/2) Started as anin-houselibrary Formerlyknown as the Pranaframework Incubated as a Spring Extension project Upcoming release 1.0 (1.0RC1) AS3Commons: Lang, Logging, Reflect, …
  • 5. The IoC Container (1/2) = Object Factory Creates and assembles objects Centralizeddependency management Spring AS: configuration via XML or MXML
  • 6. The IoC Container (2/2) Object (bean): object managed and/orcreatedby the container Object Factory: factorythatcreates and managesobjects factory.getObject(“myObject”) Object Definition: blueprintforan object Application Context: smarter Object Factory
  • 7. Configuration(1/9) MXML Configuration // AppContext.mxml file, compiledinto the application <Objects> <app:ApplicationModelid=“appModel” /> <app:ApplicationControllerid=“appController” applicationModel=“{appModel}”/> </Objects>
  • 8. Configuration(2/9) MXML Configuration: loading var context:MXMLApplicationContext = newMXMLApplicationContext(); context.addConfig(AppContext); context.addEventListener(Event.COMPLETE, context_completeHandler); context.load(); function context_completeHandler(event:Event):void { varappModel:ApplicationModel = context.getObject(“appModel”); varappController:ApplicationController = context.getObject(“appController”); }
  • 9. Configuration(3/9) MXML Configuration: alternativeapproach // AppContext.mxml file, compiledinto the application <Objects> <Object id=“appModel” clazz=“{ApplicationModel}”/> <Object id=“appController” clazz=“{ApplicationController}”> <Property name=“applicationModel” ref=“appModel”/> </Object> </objects>
  • 10. Configuration(4/9) MXML Configuration: pros Editor support Simple to use
  • 11. Configuration(5/9) MXML Configuration: cons Compiledinto the application Explicitdeclaration: limited to singletons, noexternalreferences, no prototypes -> use Spring AS MXML dialect
  • 12. Configuration(6/9) XML Configuration // externalcontext.xml, loadedonapplicationstartup <objects> <object id=“appModel” class=“com.domain.app.ApplicationModel”/> <object id=“appController” class=“com.domain.app.ApplicationController”> <property name=“applicationModel” ref=“appModel”/> </object> </objects>
  • 13. Configuration(7/9) XML Configuration: loading var context:XMLApplicationContext = newXMLApplicationContext(); context.addConfigLocation(“context.xml”); context.addEventListener(Event.COMPLETE, context_completeHandler); context.load(); function context_completeHandler(event:Event):void { var appModel:ApplicationModel = context.getObject(“appModel”); var appController:ApplicationController = context.getObject(“appController”); }
  • 14. Configuration(8/9) XML Configuration: pros Richer dialect than MXML config Usablefornon-Flexprojects No need to recompile (in some cases) Familiar to Spring Java users
  • 15. Configuration(9/9) XML Configuration: cons Classes need to becompiledinto the app, noclassloading (!) No editor support, only XSD
  • 16. MVC Architecture(1/3) No realprescriptivearchitecture Do youreallyneedone? Rollyourownbecauseone does NOT fit all Many MVC architectures out there: Cairngorm (2), PureMVC, Mate, … … Spring AS wants to support them (seeextensions)
  • 17. MVC Architecture(2/3) Spring AS MVC ingredients Operation API Event Bus Autowiring Recommendations Presentation Model (Fowler) LayeredArchitecture (DDD – Evans)
  • 19. The Operation API (1/7) Asynchronousbehavior in Flash Player: loadingexternal resources, RMI, sqlite, Webservices, HTTPServices, … No threading API Many different APIs: AsyncToken, Responders, Callbacks, Events… we need a unifiedapproach!
  • 20. The Operation API (2/7) Problem: a user repository (or service) interface IUserRepository { functiongetUser(id:int): ??? } What does the getUsermethod return? AsyncToken (Flex/RemoteObject), User (In memory), void (events)
  • 21. The Operation API (3/7) Spring AS solution: return anIOperation interface IUserRepository { functiongetUser(id:int):IOperation; } Cannowbeused in anyActionScript 3 context and easilymockedfortesting
  • 22. The Operation API (4/7) In Spring AS, an “operation” is used to indicateanasynchronousexecution IOperation interface with “complete” and “error” events IProgressOperationwith “progress” event OperationQueuebundlesoperations (a compositeoperation)
  • 23. The Operation API (5/7) Defininganoperation: public classGetUserOperationextendsAbstractOperation { functionGetUserOperation(remoteObject:RemoteObject, id:String) { vartoken:AsyncToken = remoteObject.getUser(id); token.addResponder(newResponder(resultHandler, faultHandler)); } private functionresultHandler(event:ResultEvent):void { dispatchCompleteEvent(User(event.result)); } private functionfaultHandler(event:FaultEvent):void { dispatchErrorEvent(event.fault); } }
  • 24. The Operation API (6/7) Usage: varoperation:IOperation = newGetUserOperation(remoteObject, 13); operation.addCompleteListener(function(event:OperationEvent):void { var user:User = event.result; }); operation.addErrorListener(function(event:OperationEvent):void { Alert.show(event.error, “Error”); });
  • 25. The Operation API (7/7) A progressoperation: varoperation:IOperation = newSomeProgressOperation(param1, param2); operation.addCompleteListener(function(event:OperationEvent):void { }); operation.addErrorListener(function(event:OperationEvent):void { }); operation.addProgressListener(function(event:OperationEvent):void { var op:IProgressOperation = IProgressOperation(event.operation); trace(“Progress:” + op.progress + “, total: “ + op.total); });
  • 26. The Event Bus (1/4) Publish/subscribeevent system Usedforglobalapplicationevents Promotesloosecoupling Works withstandard Flash Events; noneed to subclass Spring AS base classes
  • 27. The Event Bus (2/4) Listening/subscribing to events: // listen for all events EventBus.addListener(listener:IEventBusListener); functiononEvent(event:Event):void { } // listen forspecificevents EventBus.addEventListener(“anEvent”, handler); functionhandler(event:Event):void { }
  • 28. The Event Bus (3/4) Dispatching/publishingevents: // dispatchstandardevent EventBus.dispatchEvent(newEvent(“someEvent”)); // dispatchcustomevent classUserEventextendsEvent { ... } EventBus.dispatchEvent(newUserEvent(UserEvent.DELETE, user));
  • 29. The Event Bus (4/4) Routing events: <object id="routeEventsProcessor" class="org.springextensions.actionscript.ioc.factory.config.RouteEventsMetaDataPostProcessor"/> [RouteEvents] Public classMyClass {} or… [RouteEvents(events=“eventA,eventB”)] Public classMyClass {}
  • 30. Autowiring(1/2) Auto DependencyInjection via metadata Autowireby type, name, constructor, autodetect Works forobjectsmanagedby the container and for view components Be careful: magic happens, noexplicitconfiguration
  • 31. Autowiring(2/2) Annotate a propertywith [Autowired] classUserController { [Autowired] public var userRepository:IUserRepository; } [Autowired(name=“myObject“, property=“prop”)]
  • 32. The Container (1/5) Object references <object id=“me” class=“Person”/> <object id=“john” class=“Person”> <property name=“buddy" ref=“me“ /> </object>
  • 33. The Container (2/5) PropertyPlaceholderConfigurerer Loadsexternalproperties Properties: (server.properties) host=172.16.34.4 port=8081 contex-root=myapp Config: <object class=“org.springextensions.actionscript.ioc.factory.config.PropertyPlaceholderConfigurer”> <property name=“location” value=“server.properties”/> </object> <object id=“userRemoteObject” class=“mx.rpc.remoting.mxml.RemoteObject”> <property name="endpoint" value="http://${host}:${port}/${context- root}/messagebroker/amf" /> </object>
  • 34. The Container (3/5) Parentdefinitions / abstract definitions <object id="remoteObject" class="mx.rpc.remoting.mxml.RemoteObject" abstract="true"> <property name="endpoint" value="http://${host}:${port}/${context-root}/messagebroker/amf" /> <property name="showBusyCursor" value="true" /> </object> <object id=“userRemoteObject" parent="remoteObject"> <property name="destination" value=“userService" /> </object>
  • 35. The Container (4/5) Object definition scopes Singleton (default): sameinstance is returnedoneachrequest Prototype: newinstance is returned <object id=“mySingleton” class=“MyClass”/> <object id=“myPrototype” class=“MyClass” scope=“prototype”/> or… <object id=“myPrototype” class=“MyClass” singleton=“false”/>
  • 36. The Container (5/5) Lazyinitializedobjects Singletonsthat are notinstantiatedwhen the container starts <object id=“myLazyObject” class=“MyClass” lazy-init=“true”/>
  • 37. And there is more… Module support XML namespaces (rpc, messaging, util, …) Task API Service base classes Container extensionpoints (factory post processors, object post processors, custom metadata handlers, …) Workingon: testing support, AOP, …
  • 38. Summary Dependency Management Loosecoupling, type to interfaces Usewithotherframeworks Spring mentality: provide choice Promote best practices
  • 39. DEMO A sample application
  • 40. Thanksforyourattention! www.herrodius.com info@herrodius.com www.springactionscript.org www.as3commons.org