Next Generation Flash Development with Flex Speaker: Mike Chambers / Kevin Hoyt 2006-03-06 -------------- Note takers: Gabe Hollombe (gabe@avantbard.com) is in light green -------------- right now all this is in public beta: labs.macromedia.com for free download final release: late spring, early summer Flash Player 8.5 + Flex Framework - Flex Builder is the IDE, built on ecclipse - design view, code hinting, debugging - Flex framework - class lib - compilation utils - etc - Flex Enterprise Services is the server for doing real time data pushing, data sync, etc - Framework and SDK will be free - what is flash? - virtual machine runtime environment - cross platform - 97% of people can view some level/version of Flash content - player penetration - 12 to 18 months to get 80% penetration - player 8 has a steeper adoption rate; about 50% in the next month or two, probably 80% around october 2006 - why the increase in penetration speed these days? - new content capabilities (rendering improvements, etc) = earlier adoption from content devs - auto-updating capabilities in the flash browser control but wasnt the best experience in the past; player 8 content can prompt user to update their player if needed. better user experience, will remember where you were if restart is needed - actionscript 3 is 100% ecma standard - w3c dom level 3 event model support - e4x xml support - http, soap, xmp-rpc protocol support - active open source community - osflash.org - adobe-published swf spec, javascript integration kit (player 8 or greater + js communication), actionscript 3 APIs FLASH PLAYER 8.5 - new virtual machine - actionscript 3 - big performance improvements - originally since flash was an animation delivery platform, they had trouble giving big perf enhancements - rewrite of the flash vm yielded lots of improvements - 8fps vs 40fps in example shown - ecmascript standard - regular expressions - runtime error checking - new virtual machine details - developed from scratch for maximum speed and minimal memory consumption - new vm exists alongside old vm; new vm plays new content only, old content passed to old vm (no backward-compatability = greater ability for performance enhancements) - entirely new bytecoad instruction set - for now, jit compiler in new vm only compiles if it detects code will be resued, else the code runs interpreted - new APIs include - ability to read/manipulate and send raw binary data sockets - introspection FLEX BUILDER 2.0 - built on ecclipse - two versions - standalone (smaller footprint, doesnt have java dev stuff, etc) - plugin (install into your existing ecclipse install if you have it) - why ecclipse? - open source ide platform - nice to leverage it, devs are used to it, bug fixes faster, etc - initial release on windows, mac later - now demoing basic ecclipse/flexbuilder features - breakpoints, variable/scope inspection - QUESTION: can you set next line of execution when runtime is paused at a breakpoint? ANSWER: no - so, basic ide, not some advanced stuff like right-click set next line of execution like in VisualStudio - remote editing not possible yet - remote debugging of an instance of flashplayer 8.5 running a swf _is_ possible ACTIONSCRIPT 3 - class based, single inheritance - no private constructors (he didnt explain why but said it was for some reasons, blah blah) - things can be public, private, protected, internal - static, strongly typed language - new type * = "any time" is more explicit way of accepting any type of value as a function argument E4X - ecma standard for manipulating xml - XML is a core data type in new actionscript - very easy to work with xml in actionscript: employees.employee[0].name // gets name of first employee employees.employee.@id // gets all ids employees.employee(@id==2).name //get name of emp with id 2 - it's not xpath (this is simpler but not as expressive), but he says there are xpath implementations available (not sure if macromedia provides one) FLEX FRAMEWORK - MXML is the View component, for UI Layout / Controls (like aspx) - application logic should stay in the Actionscript - MXML gets compiled into an Actionscript class - demoing building a simple mp3 player - canvas control is like panel in asp.net (behaves like a html div) - can skin everything with CSS (yay) - now explaining/demoing stateful programming - idea of states is built into the framework - simple two state app: photo search - search state: simple ui with just a search box, change to results state on find submit - results state: search again ui, but also view search results ui - in dhtml terms, visually speaking, it basically acts like hiding one div and showing another - can add effects to transition between states or to fire upon events that each element can trigger FLEX ENTERPRISE SERVICES - all about data services - wrapping existing business logic to expose data as xml is more work - xml is verbose and can impose performance limitations - flex ent services solution is object serialization - object serialization used with what they call remote objects - targeted at a java infrastructure, looking to do a .NET targeting in the future as well - common flex apps are data composit apps that draw data from multi sources, like visual dashboards - messaging infrastructure - shows a code example where a consumer subscribes to messages sent to an element - showing an example comparison flex implemetation of fastr vs the dhtml implementation - dhtml version - browser memory consumtion - client difference management - flex version - cross browser - gets notification events when people load their images, so it's fair wrt timing the image loads for each player - took him a week to learn/implement - alas, it requires flash player 8.5 - not such a good comparison; whatever - demoing an example of sending data to client - has a chart up that is waiting for messages - all messaging uses JavaMessagingServices (jms) - starts pushing msgs, they get to the cart instantly (he's on localhost, but he says it's fast over the net, too (sub second response times)) - traditionally, you make a few trips to the server - get data list - get specific record details - submit changes - change conflict notification if needed - refresh data list - new big feature is called Data Services - allows you to maintain syncronization between multiple clients - if you use their collection api, you can abstract the data from the operations on the data - going by very quick here, but it's done without lots of code, which is neat, i guess, of course we're not seeing the xml that maps this collection api to the objects on the server - for LOTS of data, it does implicit paging, so it's not pulling all that data off the bat