Drupal And Flash Platform hybrid applications

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Favorites, Groups & Events

    Drupal And Flash Platform hybrid applications - Presentation Transcript

    1. Drupal and Flash Platformhybrid applications
      Pacific North West Drupal Summit
      10/24/2009
      Josh Kopel
    2. Hybrid application
      Drupal provides a powerful way to source and manage data for SWF applications
      Flash player provides a “rich” environment for advanced interactions
      Multi-touch
      Desktop migration (Air)
      iPhone (!)
    3. Flashgood or evil?
    4. Flashgood or evil?
    5. Why call it SWF
      “Flash platform”
      Anything that compiles to the SWF format for playback within the Flash Player
      Flash
      Flex
      Flash has often meant animation. We are talking about true applications.
    6. Quick demo
    7. Overview of SWF Drupal
      Drupal
      Browser
      Services Module
      HTML Page
      Server Module
      Flash Player
      Un/serialization
      AS3 Application Code
      Auth. Module
      Un/Serialization
      Classes
      Service (Module)
    8. Services means
      Reusable data (SWF or AJAX)
      Provide the same “site” to multiple client technologies
      Data is available at either end in the same format via serialization
      Objects
      Arrays
      Number types
      Strings
    9. The Drupal side
      Services module
      Authentication module(s)
      Service module(s)
      Server module(s)
      External (un)serialize code (i.e. AMFPHP)
    10. The Drupal side
      Drupal
      Services Module
      Server Module
      Un/serialization
      Auth. Module
      Service (Module)
    11. Services Module An API for remote applications
      Provides end point for service calls
      Wraps server and service modules in a standard API
      Supports multiple authentication methods*
      *We can hazoauth?
    12. Services Module core services
      system
      system.connect
      file
      file.get
      file.getNodeFiles
      menu
      menu.get
      node
      node.get
      node.view
      node.save
      node.delete
      search
      search.nodes
      search.content
      search.users
      taxonomy
      taxonomy.saveTerm
      taxonomy.saveVocabulary
      taxonomy.getTree
      taxonomy.selectNodes
      views
      views.get
      views.export
      views.import
    13. Server modules
      Provide wrappers for specific languages or serialization methods
      AMF (Adobe Message Format)
      XMLRPC
      JSON
      REST
      SOAP
      etc.
    14. Custom service modules
      Provide access to any Drupal function
      Provide SIMPLER access to nodes
      Parse the data on the server side
      Only send the data needed by the flash app
    15. Authentication
      API Keys
      Make a unique key based upon an application name and domain
      SWF must pass the hashed key back in order to authenticate
      Key must be embedded in or passed to Flash player
    16. Authentication
      Session based
      Use standard Drupal HTML login
      Pull session ID into SWF
      via javascript using flash.external.ExternalInterface
      Via PHP using custom PHP
      Use existing session for service calls
    17. Authentication
      Session based
      Use system.connect() to return an anonymous session ID
      Pass that back on any service call (logged in as anonymous)
      Or call user.login with a username/password + session ID
      Embedded
      Requested
      Receive a authenticated session ID
    18. The SWF side
      All calls brokered by the browser
      Restricted by player security sandbox (learn about crossdomain.xml)
      Receive startup parameters from flashVars
      Manipulate DOM through externalInterface
    19. The SWF side
      Browser
      HTML Page (DOM)
      Flash Player
      AS3 Application Code
      Un/Serialization
      Classes
      Flash
      Vars
      JS
    20. Development methodology
      AS3 is “stateful”, asynchonous, & event driven
      learn the language and use a good framework
      pureMVC
      robotlegs
      Existing open source classes are available for almost any protocol
    21. Review authentication needs
      Do you need to save data or register users?
      Can you request a username/password?
      In html
      In SWF
    22. Review protocol choices
      AMFPHP
      Binary protocol means it is fast and compact
      Not “human readable”
      Adobe specific (natively parsed)
      XML
      Text based protocol can get verbose
      Easier to debug
      JSON
      Text based protocol can get verbose
      Can be easily consumed by AJAX or other services
    23. Debugging
      Get the debug player (www.adobe.com/support/flashplayer/downloads.html)
      Charles Proxy (charlesproxy.com)
      LiveHTTPHeaders (livehttpheaders.mozdev.org/)
      Flash Tracer for FF (www.sephiroth.it/firefox/flashtracer/)
    24. Serialization classes
      AMFPHP – nl.dpdk.services.gephyrcomplete “high level” Drupal connection class using AMFPHP
      AMFPHP – com.kylebrekke.amfphp
      XMLRPC – com.mattism.http.xmlrpchttp://danielmclaren.net/2007/08/03/xmlrpc-for-actionscript-30-free-library
      JSON – as3corlib http://code.google.com/p/as3corelib/
    25. IDEs and compilers
      Adobe Flash Professional CS4 (if you need timeline/library)
      Adobe Flash Builder™ 4
      Other Adobe products
      Flex SDK complier
      FlashDevelop (my favorite)
      Eclipse-ant-Flex SDK
      Komodo (with plugins)
    26. Other resources
      Essential ActionScript 3.0 by Colin Moock
      Flash with Drupal by Travis Tidwell
      OpenSource Flash http://osflash.org/

    + Josh KopelJosh Kopel, 1 month ago

    custom

    248 views, 0 favs, 1 embeds more stats

    An overview of building applications using Drupal a more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 248
      • 244 on SlideShare
      • 4 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 3
    Most viewed embeds
    • 4 views on http://pnwdrupalsummit.org

    more

    All embeds
    • 4 views on http://pnwdrupalsummit.org

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories