Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Flash with Drupal
 DrupalCon 2009 – Washington DC




                                   Travis Tidwell
                  ...
Agenda
•   Why Flash and Drupal?
•   How Flash and Drupal Communicate
•   Web Services in Drupal
•   Asynchronous Programm...
Why Flash with Drupal?
Why Flash with Drupal?
• Flash is like …
Why Flash with Drupal?
• Flash is like … my wife
Why Flash with Drupal?
• Flash is like … my wife
  – It’s pretty.
Why Flash with Drupal?
• Flash is like … my wife
  – It’s pretty.
  – What you see is what you get.
Why Flash with Drupal?
• Flash is like … my wife
  – It’s pretty.
  – What you see is what you get. (WYSIWYG)
Why Flash with Drupal?
• Flash is like … my wife
  – It’s pretty.
  – What you see is what you get. (WYSIWYG)
• Drupal is ...
Why Flash with Drupal?
• Flash is like … my wife
  – It’s pretty.
  – What you see is what you get. (WYSIWYG)
• Drupal is ...
Why Flash with Drupal?
• Flash is like … my wife
  – It’s pretty.
  – What you see is what you get. (WYSIWYG)
• Drupal is ...
Why Flash with Drupal?
• Flash is like … my wife
  – It’s pretty.
  – What you see is what you get. (WYSIWYG)
• Drupal is ...
Why Flash with Drupal?
• Flash is like … my wife
  – It’s pretty.
  – What you see is what you get. (WYSIWYG)
• Drupal is ...
Combine Beauty with Power and you
              get…
Combine Beauty with Power and you
              get…
Combine Beauty with Power and you
              get…
How Flash and Drupal communicate
How Flash and Drupal communicate
• Remote Function Calls (RPC)
  – Uses XML to call a remote function
  – AMF ( ActionScri...
How Flash and Drupal communicate
• Remote Function Calls (RPC)
  – Uses XML to call a remote function
  – AMF ( ActionScri...
How Flash and Drupal communicate
• Remote Function Calls (RPC)
  – Uses XML to call a remote function
  – AMF ( ActionScri...
How Flash and Drupal communicate
• Remote Function Calls (RPC)
  – Uses XML to call a remote function
  – AMF ( ActionScri...
How Drupal handles Flash RPC…
How Drupal handles Flash RPC…
• Services Module
How Drupal handles Flash RPC…
• Services Module
• AMFPHP Module
How Drupal handles Flash RPC…
• Services Module
• AMFPHP Module
• AMFPHP ( http://www.amfphp.org )
How Drupal handles Flash RPC…
How Drupal handles Flash RPC…
• Services module comes with “external” API’s
  so that Flash can get Drupal data.
How Drupal handles Flash RPC…
• Services module comes with “external” API’s
  so that Flash can get Drupal data.
  – node....
Connecting to Drupal
• Flash must first establish a connection with
  Drupal.
• Drupal manages the Flash connection using
...
Session Handling
Session Handling
• Flash calls “system.connect”
Session Handling
• Flash calls “system.connect”
• Drupal returns a valid Session ID to Flash
Session Handling
• Flash calls “system.connect”
• Drupal returns a valid Session ID to Flash
• Flash stores the session ID...
On the Flash Side…
On the Flash Side…
• Uses NetConnection to connect to flash
On the Flash Side…
• Uses NetConnection to connect to flash




• Create responder to handle callbacks
On the Flash Side…
• Uses NetConnection to connect to flash




• Create responder to handle callbacks


• Make the Servic...
Drupals response is handled using
        callback functions
Asynchronous Programming
Asynchronous Programming
• Flash triggers actions based on events ( Event
  Driven )
• Events move the system along
Asynchronous Programming
• Flash triggers actions based on events ( Event
  Driven )
• Events move the system along
Asynchronous Programming
• Flash triggers actions based on events ( Event
  Driven )
• Events move the system along
      ...
Asynchronous Programming
• Flash triggers actions based on events ( Event
  Driven )
• Events move the system along
      ...
Asynchronous Programming
• Flash triggers actions based on events ( Event
  Driven )
• Events move the system along
      ...
Asynchronous Programming
• Flash triggers actions based on events ( Event
  Driven )
• Events move the system along
      ...
Let’s build something!
Let’s build something!
Meet my wife…
Let’s build something!
Meet my wife…
Let’s build something!
Meet my wife…            She is Flash…
Let’s build something!
Meet me…
Let’s build something!
Meet me…
Let’s build something!
Meet me…                  I am Drupal…
Demo Time!
For more information…
• “Flash with Drupal” Book
  – Author: Travis Tidwell (me)
  – Packt Publishing
  – Due July this ye...
Questions?
Upcoming SlideShare
Loading in …5
×

Drupalcon 2009 Flash and Drupal

6,102 views

Published on

Travis Tidwell presents at DrupalconDC 2009

Published in: Design, Technology

Drupalcon 2009 Flash and Drupal

  1. 1. Flash with Drupal DrupalCon 2009 – Washington DC Travis Tidwell travist@tmtdigital.com TMT Digital
  2. 2. Agenda • Why Flash and Drupal? • How Flash and Drupal Communicate • Web Services in Drupal • Asynchronous Programming • Building a real Flash application for Drupal
  3. 3. Why Flash with Drupal?
  4. 4. Why Flash with Drupal? • Flash is like …
  5. 5. Why Flash with Drupal? • Flash is like … my wife
  6. 6. Why Flash with Drupal? • Flash is like … my wife – It’s pretty.
  7. 7. Why Flash with Drupal? • Flash is like … my wife – It’s pretty. – What you see is what you get.
  8. 8. Why Flash with Drupal? • Flash is like … my wife – It’s pretty. – What you see is what you get. (WYSIWYG)
  9. 9. Why Flash with Drupal? • Flash is like … my wife – It’s pretty. – What you see is what you get. (WYSIWYG) • Drupal is like …
  10. 10. Why Flash with Drupal? • Flash is like … my wife – It’s pretty. – What you see is what you get. (WYSIWYG) • Drupal is like … me!
  11. 11. Why Flash with Drupal? • Flash is like … my wife – It’s pretty. – What you see is what you get. (WYSIWYG) • Drupal is like … me! – It’s nerdy.
  12. 12. Why Flash with Drupal? • Flash is like … my wife – It’s pretty. – What you see is what you get. (WYSIWYG) • Drupal is like … me! – It’s nerdy. – Complicated
  13. 13. Why Flash with Drupal? • Flash is like … my wife – It’s pretty. – What you see is what you get. (WYSIWYG) • Drupal is like … me! – It’s nerdy. – Complicated – but totally awesome!
  14. 14. Combine Beauty with Power and you get…
  15. 15. Combine Beauty with Power and you get…
  16. 16. Combine Beauty with Power and you get…
  17. 17. How Flash and Drupal communicate
  18. 18. How Flash and Drupal communicate • Remote Function Calls (RPC) – Uses XML to call a remote function – AMF ( ActionScript Message Format )
  19. 19. How Flash and Drupal communicate • Remote Function Calls (RPC) – Uses XML to call a remote function – AMF ( ActionScript Message Format )
  20. 20. How Flash and Drupal communicate • Remote Function Calls (RPC) – Uses XML to call a remote function – AMF ( ActionScript Message Format ) <function>getHello</function>
  21. 21. How Flash and Drupal communicate • Remote Function Calls (RPC) – Uses XML to call a remote function – AMF ( ActionScript Message Format ) <function>getHello</function> “Hello World!”
  22. 22. How Drupal handles Flash RPC…
  23. 23. How Drupal handles Flash RPC… • Services Module
  24. 24. How Drupal handles Flash RPC… • Services Module • AMFPHP Module
  25. 25. How Drupal handles Flash RPC… • Services Module • AMFPHP Module • AMFPHP ( http://www.amfphp.org )
  26. 26. How Drupal handles Flash RPC…
  27. 27. How Drupal handles Flash RPC… • Services module comes with “external” API’s so that Flash can get Drupal data.
  28. 28. How Drupal handles Flash RPC… • Services module comes with “external” API’s so that Flash can get Drupal data. – node.get – node.save – views.get – etc…
  29. 29. Connecting to Drupal • Flash must first establish a connection with Drupal. • Drupal manages the Flash connection using Session ID’s
  30. 30. Session Handling
  31. 31. Session Handling • Flash calls “system.connect”
  32. 32. Session Handling • Flash calls “system.connect” • Drupal returns a valid Session ID to Flash
  33. 33. Session Handling • Flash calls “system.connect” • Drupal returns a valid Session ID to Flash • Flash stores the session ID, then uses it for all other calls to Drupal.
  34. 34. On the Flash Side…
  35. 35. On the Flash Side… • Uses NetConnection to connect to flash
  36. 36. On the Flash Side… • Uses NetConnection to connect to flash • Create responder to handle callbacks
  37. 37. On the Flash Side… • Uses NetConnection to connect to flash • Create responder to handle callbacks • Make the Service Call
  38. 38. Drupals response is handled using callback functions
  39. 39. Asynchronous Programming
  40. 40. Asynchronous Programming • Flash triggers actions based on events ( Event Driven ) • Events move the system along
  41. 41. Asynchronous Programming • Flash triggers actions based on events ( Event Driven ) • Events move the system along
  42. 42. Asynchronous Programming • Flash triggers actions based on events ( Event Driven ) • Events move the system along Register for event
  43. 43. Asynchronous Programming • Flash triggers actions based on events ( Event Driven ) • Events move the system along Register for event Make the call…
  44. 44. Asynchronous Programming • Flash triggers actions based on events ( Event Driven ) • Events move the system along Register for event Make the call… Twiddle your thumbs…
  45. 45. Asynchronous Programming • Flash triggers actions based on events ( Event Driven ) • Events move the system along Register for event Make the call… Twiddle your thumbs… An event! Let’s do something!
  46. 46. Let’s build something!
  47. 47. Let’s build something! Meet my wife…
  48. 48. Let’s build something! Meet my wife…
  49. 49. Let’s build something! Meet my wife… She is Flash…
  50. 50. Let’s build something! Meet me…
  51. 51. Let’s build something! Meet me…
  52. 52. Let’s build something! Meet me… I am Drupal…
  53. 53. Demo Time!
  54. 54. For more information… • “Flash with Drupal” Book – Author: Travis Tidwell (me) – Packt Publishing – Due July this year • Topics covered • Build a Flash recipe viewer • Build a media player using Nodes and Views • Build a Flash Five Star voter • A bunch of other good stuff…
  55. 55. Questions?

×