200 likes | 227 Views
Flex & Java. Agenda. Flex overview (AS3 VM, Flex Framework, State management) Basic integration methods (Webservice invocation, REST invocation) Comfortable integration methods (RPC, Messaging, Event Driven Architecture) Demo Making the configuration easy (Spring Actionscript) Demo
E N D
Agenda • Flex overview(AS3 VM, Flex Framework, State management) • Basic integration methods(Webservice invocation, REST invocation) • Comfortable integration methods(RPC, Messaging, Event Driven Architecture) • Demo • Making the configuration easy(Spring Actionscript) • Demo • Opensource tools for life(WebOrb, GraniteDS, AMFPhp, BlazeDS • Q&A
Flex overview • http://www.adobe.com/devnet/actionscript/articles/atp_ria_guide.html
Flex Controls http://zdrojak.root.cz/clanky/flex-4-zaciname/ • 1) Player events are dispatched – This includes events dispatched by the Timer, Mouse, ENTER_FRAMEs, URLLoader, etc… • 2) User code is executed – Any code listening to events dispatched by step 1 are executed at this stage. • 3) RENDER event is dispatched – This special event is dispatched when the user calls stage.invalidate() during normal user code operation. • 4) Final user code is executed – User code listening specifically for step 3 is executed at this point. • 5) Player renders changes to the display list.
Flex libs • AS3 Data Structures For Game Developers (AS3DS)http://lab.polygonal.de/ds/ • AS3 commonshttp://code.google.com/p/as3-commons/ • AS3 signalshttp://github.com/robertpenner/as3-signals • AS3 cryptohttp://code.google.com/p/as3crypto/ • FlexMojos (Maven plugin)http://code.google.com/p/flex-mojos/ • Papervision 3Dhttp://blog.papervision3d.org/ • Away3Dhttp://away3d.com/ • Five3Dhttp://five3d.mathieu-badimon.com/
Flex overview / demo setup Client side • Flash Builder 4 • Flex 4 SDK • Flash Player 10 • Spring ActionScript • FlexMojos 3 Maven extension Server side • Tomcat 6 server • Java WTP • Spring 3 • Spring Flex extension • Adobe BlazeDS 4
Basic integration methodsHTTPService • <mx:HTTPService • Properties • concurrency="multiple|single|last“ • contentType="application/x-www-form-urlencoded|application/xml" • destination="DefaultHTTP" • id="No default.” • method="GET|POST|HEAD|OPTIONS|PUT|TRACE|DELETE" • resultFormat="object|array|xml|e4x|flashvars|text“ • showBusyCursor="false|true“ • makeObjectsBindable="false|true" • url="No default." • useProxy="false|true" • xmlEncode="No default." • xmlDecode="No default." • Events • fault="No default." • result="No default." />
Basic integration methodsWebservice • <mx:WebService • Properties • concurrency="multiple|single|last" • destination="No default." • id="No default." • serviceName="No default." • showBusyCursor="false|true" • makeObjectsBindable="false|true" • useProxy="false|true" • wsdl="No default." • Events • fault="No default." • result="No default." /> • <mx:operation • Properties • concurrency="multiple|single|last" • name=No default, required. • resultFormat="object|xml|e4x" • makeObjectsBindable="false|true" • Events • fault=No default. • result=No default. />
Comfortable integration methods RemoteObject • <mx:RemoteObject • Properties • concurrency="multiple|single|last" • destination="No default." • id="No default." • endpoint="No default." • showBusyCursor="false|true" • source="No default." (currently, Adobe ColdFusion only) • makeObjectsBindable="false|true" • Events • fault="No default." • result="No default." /> • <mx:method • Properties • concurrency="multiple|single|last" • name="No default, required." • makeObjectsBindable="false|true" • Events • fault="No default." • result="No default." />
Comfortable integration methods Publish/Subscribe • <mx:Consumer • Properties • resubscribeAttempts="5“ • resubscribeInterval="5000" • selector="No default." • timestamp="No default." /> • <mx:Producer • Properties • defaultHeaders="No default." />
WebOrbhttp://www.themidnightcoders.com/products/weborb-for-java/overview.htmlWebOrbhttp://www.themidnightcoders.com/products/weborb-for-java/overview.html • GraniteDShttp://www.graniteds.org/ • AMFPhphttp://amfphp.sourceforge.net/ • BlazeDShttp://opensource.adobe.com/wiki/display/blazeds/BlazeDS/
Backup slides • Tamarin is the code name used for Adobe’s virtual machines that • implement ActionScript 3 (AS3) [1], a flavor of ECMAScript [11]. • JavaScript is also a flavor of ECMAScript, however AS3 supports • multiple constructs that JavaScript does not, such as optional static • typing, packages, classes, and early binding.