November 22, 2009

Building iPhone Applications with Flash CS5 (RIA Unleashed: Boston 2009)

Ryan Stewart (Using Mike Chambers' Slides)

What did Adobe announce:
Adobe Flash CS5 can create native stand-alone iPhone Applications
Flash Player 10.1 that is smartphone enabled (see keynote)
Did not announce Flash Player for Safari Mobile on iPhone.

Flash based iPhone applications exist today

LLVM (Low Level Virtual Machine) previous used in Alchemy
* Open source compiler with optimizations for any input language
* Capable of generating machine code for various targets
Front-end (SWF/ABC) -> LLVM -> Back-end (ARM)

Just like building an .air but with the descriptor capturing additional iPhone .app properties.

Flash Pro CS5 -> SWF, app.xml, app:/resources & Apple Certificates -> ADT -> .ipa

ADT does ahead of time (AoT) complication. Can't do JIT so you need to bundle code in, compiles ABC byte code from SWF and then pass through LLVM

Can use Flash Player 10.1 and Adobe AIR 2.0 APIs to get access to:
* MultiTouch
* Screen Orientation
* Media Library
* Accelerometer
* Geo-Location
* Cut, Copy, Paste
* Native rtextinput
* tel:, mailto: maps:, video:
* AMF, Flash remoting, RTMP

Can't do these
* Keyboard events outside of textfields
* Rollover or Hover
* ActionScript 1 or 2
* Loading SWF with ActionScript
* LocalConnection
* PixelBender
* H.264 and Speex codecs
* Microphone / Video Camera access

Still need to go through Apple certificate process, public key request, key signing request, application provisioning, etc.

Demo of Flash CS5 iPhone development process.

This allows you to build iPhone applications on Windows.

Current application use software rendering, latest releases are using GPU which will be part of the first public release.

Lots of tips and tricks for getting Flash based applications to perform well on an iPhone.

iPhone isn't like a Mac G5, much less power and performance so you need to think about your application development differently.

Device fonts for input fields, Helvetica is default.

Primary input is a finger (less accurate than mouse, larger hit area, no modifier keys, obscures the screen) 44x44 pixel recommended hit area size.

Text Input is the only component that launches virtual keyboard (get undo, magnifying glass, cut/copy/paste all work)

Resources
* bit.ly/arnoiphone
* bit.ly/mobilehig

Code Optimizations
* Improve performance and memory on desktop
* Some are AOT specific
* Test and profile in Flash Builder
* Grant Skinner Testing harness bit.ly/as3performance
* Reuse Instances
* Cleanup unused event listeners (especially ENTER_FRAME and Timers)
* Event dispatching can get expensive (use callbacks instead)
* Disable unused mouse events (don't use mouse_move use interval checks instead) or use mouse_down/mouse_up instead

Lots more information at www.mikechambers.com

Tags: flash iphone riaunleashedboston2009

November 22, 2009

Keynote (RIA Unleashed: Boston 2009)

Ryan Steward

Three trends being focused on right now:
Rich Internet Application which Adobe have been doing for a long time.
Cloud Computing is coming to the forefront. Have your data available anywhere. SoA is becoming the norm. Clean separation between front-end and back-end.
Desktop and Devices making the experience available everywhere.

All rolled into contextual applications. Applications where and how your users want them.

finetune.com example of contextual applications. Explore with the traditional browser, then use desktop specific application, iPhone version, and Wii specific version.

Take advantage of device specific features.
Move data and state between contexts.

New runtime support:

Flash Player 10.1 geared for smart phones. Approximate 60% memory reduction with no code changes. Better battery performance.

AIR 2.0 extending ability to leverage native code. Native installer and application support.

Code an application in Flash CS5 and run it natively on iPhone.

New tooling support:

Flash Catalyst is all about designer having more control over UI without touching Flex.

Flex 4 is all about separating logic and look. Components based on states and skinParts.

Demo of Flash Catalyst.

Adam Lehman

New IDE for ColdFusion development called ColdFusion Builder also Eclipse based. CFML support for: code assist, insight, debugging, and ORM insight. Also have code assist for: HTML, DOM, CSS, JavaScript, AJAX (jQuery, ExtJS, etc.), and SQL. Code snippets, log viewer, AIR 2.0 Support. IDE can be extended through CFML extensions. CFScript allows tag-less components. Additional ORM support for CFCs based on Hibernate with CFML languages but still have access to low level settings. Expanded access to ColdFusion services for PDF, charting, document services, etc. all exposed through a SOAP & AMF interface with granular security control.

New CF SWC that will give AS3 / MXML libraries for accessing these functions like: , , , etc. Flash Remoting is 9 times faster in the latest versions. Now has full BlazeDS integration.

ColdFusion 9 has many PDF enhancements. Headers, footers, optimize, extract text and images, and converting Word to PDF. Has support for working with spreadsheets.

Demo of ColdFusion.

Ryan Steward

New Flash Builder adds data centric design features, better refactoring, performance optimizations, network monitor, and many others.

Demo of Flash Builder.

For people at the conference you have access to AIR 2.0 bits.

Tags: air coldfusion flash flex iphone riaunleashedboston2009