Creating Software that Saves Lives - PowerPoint PPT Presentation

1 / 22
About This Presentation
Title:

Creating Software that Saves Lives

Description:

... http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/media/Video .html ... Flash Players contain an ActionScript Virtual Machine (AVM) ... – PowerPoint PPT presentation

Number of Views:73
Avg rating:3.0/5.0
Slides: 23
Provided by: platinums
Category:

less

Transcript and Presenter's Notes

Title: Creating Software that Saves Lives


1
Creating Software that Saves Lives
  • Introduction to Adobe Flex 3.0
  • Brian Mitchell

February 18, 2008 PS Reston
2
What is Flex?
  • Group of technologies that produce SWF (Shockwave
    file) binaries, a.k.a Flash movies
  • Tag based XML programming language MXML
  • ActionScript 3.0 scripting language
  • Flex Builder IDE
  • mxmlc compiler debugger
  • Develop Rich Internet Applications, instead of
    traditional page based web applications
  • Direct manipulation (drag drop) behavior
  • Client side state management

3
Why Flex?
  • Flex 3 Beta 3 is open source under Mozilla Public
    License
  • Free SDK with command line compiler and debugger
  • Support for AIR (formerly the Apollo project)
  • UI Components are amazing!
  • Excellent standard components
  • Open source libraries like flexlib are great
  • Large community of Flex developers
  • Excellent documentation from Adobe

4
ActionScript 3.0
  • ECMA-4 compliant
  • Object oriented
  • Packages
  • Classes
  • Inheritance
  • Interfaces
  • Strong and weak typing
  • Online API
  • http//livedocs.adobe.com/flex/201/langref/index.h
    tml

5
ActionScript 3.0 II
  • "/
  • package
  • import flash.media.Video
  • import flash.net.NetStream
  • import flash.net.NetConnection
  • public class Example
  • public function doSomething( event Event )
    void
  • var urlString homeMovie.flv"
  • var videoVideo new Video(widthint500,
    heightint350)
  • var streamNetStream new NetStream(new
    NetConnection())
  • video.attachNetStream(stream)
  • video.play(url)
  • addChild(video)

6
Compilation
  • mxmlc compiler
  • Stage one
  • Parse MXML into ActionScript classes
  • Compile ActionScript into bytecode
  • Insert bytecode into a binary SWF file
  • Stage two (just-in-time compilation)
  • Flash Players contain an ActionScript Virtual
    Machine (AVM). At runtime, the AVM turns the
    bytecode into machine language code that the
    particular OS can interpret.

7
Compilation II
  • Compilation can be done from
  • Command line
  • Ant script
  • Flex Builder IDE
  • Web compiler (part of LiveCycle Data Services ES)
  • Like JSP compilation model, pages are compiled
    when first requested, then cached
  • mxmlc --show-actionscript-warningstrue
  • c/myDir/firstProgram.mxml

8
Build tools
  • Free SDK includes
  • mxmlc command line compiler
  • Debugger
  • Component class library
  • Documentation
  • Flex Builder 3.0 (Beta) includes
  • Eclipse based IDE
  • SDK
  • Debugger
  • Design view
  • Flex Builder 2 is 250, no pricing on latest
    version yet

9
Data
  • HTTP session is unnecessary! As Flex creates an
    RIA, you keep state on the client.
  • Asychronous
  • Remote object invocation (access Java POJO)
  • Web service
  • HTTP GET/POST
  • Callback required to give client the response
    data
  • User can continue working while request is
    processed
  • HTTPService (make GET POST requests)
  • WebService (access a web service)
  • services?wsdl" showBusyCursor"true"/

10
Data exchange protocols SOAP
  • SOAP?
  • You can use it, but passing XML is not as
    efficient as using binary exchange. Adobe claims
    it is 10 times slower. http//labs.adobe.com/techn
    ologies/blazeds/

11
Data exchange protocols AMF
  • Action Media Format (AMF) data protocol
  • Binary data exchange over HTTP
  • Default protocol behind , which
    is used to access data using remote object
    invocation
  • Now open source!
  • Goal is to provide AMF for all platforms

12
Remote Object Invocation
  • Add Java classes to Flex app classpath
  • WEB-INF/classes
  • WEB-INF/lib
  • Integrates with J2EE security
  • Class by class exposure to Flex via deployment
    descriptors
  • Asynchronous method call
  • Callback handler
  • Fault-handling

13
Remote Object Invocation II
  • Example
  • faultfault(arg)" resultresult(arg)" /
  • Fault handling is done by callback handler
    fault(arg), where arg is the error. It can
    handle Java exceptions and network failures.
  • Successful results are processed by callback
    handler result(arg)
  • remoting-config.xml

  • com.me.myService
    application

14
Blaze DS
  • What provides access to Java objects?
  • Blaze DS
  • Taken from LiveCycle Data Services ES, the final
    release will be open source under the LGPL v3
    license
  • Release Candidate became available 2.1.08
  • Offers remoting and messaging capabilities
  • LiveCycle Data Services ES
  • Rather expensive
  • Provides remoting and messaging capabilities,
    data synchronization between client and server,
    publish/subscribe messaging, and PDF creation

15
Flex vs. Flash
  • Flash is a great tool for developing videos,
    animations, or any small application that is well
    suited to be developed on a timeline, or by
    layering visual elements
  • Flash requires the 700 IDE
  • Flex is a web application developers approach to
    creating web applications
  • Flex development can be free

16
Flash IDE
17
Cairngorm MVC framework
  • Open source implementation of MVC design patterns
    from J2EE and .NET
  • Singleton
  • Service to Worker
  • ModelLocator
  • Front Controller
  • etcetera
  • Written in ActionScript 3.0
  • Not yet for Flex 3
  • http//labs.adobe.com/wiki/index.php/Cairngorm

18
Thirty-minute Flex test-drive for Java developers
  • http//www.adobe.com/devnet/flex/articles/java_tes
    tdrive.html
  • A couple tips for the installation
  • Set JAVA_HOME environment variable to, for
    example C\Program Files\Java\jdk1.5.0_11
  • Do not include the \bin directory on the path!
  • Your root directory may be C\Documents and
    Settings, but for simplicity, place the
    fds-tomcat directory in your C\ drive.
  • A class not found exception is thrown for the
    word and because the pathname is not quoted.

19
Adobe AIR
  • http//labs.adobe.com/technologies/air/
  • Adobe Integrated Runtime (AIR) is a
    cross-operating system runtime being developed by
    Adobe that allows developers to leverage their
    existing web development skills (Flash, Flex,
    HTML, JavaScript, Ajax) to build and deploy rich
    Internet applications (RIAs) to the desktop.

20
Capital Area Flex User Group
  • http//www.dc-flex.org/
  • Meetings usually held at AboutWeb in Rockville,
    MD
  • Next meeting
  • Wednesday, March 05 2008 600pm - 900pm
  • 6177 Executive Blvd, Rockville MD 20852

21
Resources
  • Flex Developer Center
  • http//www.adobe.com/devnet/flex/
  • Adobe Flex 3 Language Reference
  • http//livedocs.adobe.com/labs/flex3/langref/
  • Flex Component Explorer
  • http//www.adobe.com/devnet/flex/samples/code_expl
    orer/
  • FlexLib
  • http//code.google.com/p/flexlib/
  • www.flex.org

22
Thank You!
www.PlatinumSolutions.com
Write a Comment
User Comments (0)
About PowerShow.com