On Adobe Flex and dynamic websites

I still get a lot of searches and hits on my “Mytube” page as well as some inquires by mail…which tells me two things. One is that people still do not fully understand how to fully use flex and the other is that RIAs are pretty popular these days.

To help people who come searching for this, let me shine some light on the matter. I’ll do so in the form of bullet points to speed up the process.

  • flex is really cool. It will allow you a lot of flexibility(no pun) to write rich clients that run in the browser in a cross platform manner.
  • flex is a client side technology. Remember that. So the entire thing runs on the user’s browser.
  • To make your flex app serve dynamic data or generally have a dynamic nature, you need to use some server side technology and communicate with the client.
  • The server side technology can be as simple as a single php script or as complex as a full blow Django based website.(or some other framework)
  • The server side technology used will be responsible for dealing with things like database queries and user authentication and so on…
  • For communication between the flex client and the server side tech, you can use several methods depending on your needs and the complexity required of the app.
  • The communication methods can be simple one way xml documents from the server to the client or using something more complex like the different amf frameworks for interop(or flash remoting or something like the flex data services…but the latter used to be a commercial offering and i prefer the approaches that i describe here).
  • The MyTube tutorial uses the simpler one way xml documents where the TurboGears web app sends the needed xml to the flex UI. It takes care of turning the dataset in the database to xml.
  • In general, i recommend using one of the amf frameworks for your particular server technology(so for php use amfphp, for python use pyamf, for Django you can use DjangoAMF….)
  • The amf frameworks will allow you much better interop between clients and servers because they allow both to speak the same language, mainly the Action Message Format was which open source’d by Adobe a few weeks ago.
  • The amf frameworks will allow you to send native flash data to the server side tech without needing to worry about some common data format(not to mention that it would allow for more complex data handling)

So there you go…i hope this information will help. I’ll try to publish some more tutorials and some more information when i can. And as usual, for anything more shoot me an email.

Please note that although i wrote that tutorial using TurboGears, i no longer use TurboGears nor do i recommend it to my clients. I didn’t like where the project was heading and the way it was being developed and so i switched to Django which is absolutely amazing and has a great community behind it. I have been using it for about a year now and i fully recommend it. Ofcourse to be fair, you should make up your own mind about this, but i already have.