in PHP

An overview of ZendAMF

This week I attended the Zend/PHP Conference where we officially announced the addition of AMF into the Zend Framework. I thought it would helpful to give an overview of what this means to Flash developers, especially those who are not familiar with Zend.

What is Zend?
Zend is a company that develops a wide array of solutions for PHP developers. They make Zend Studio, which is an Eclipse-based IDE for doing PHP development. We also announced that we are working with Zend so developers will be able to install the Flex 3 Eclipse plug-in into Zend Studio for tight integration. The Zend Framework is a combination of an MVC framework in addition to a wide variety of utilities for doing everything from connecting to Flickr to database interaction. I just started using the Zend MVC framework for gotoAndLearn and so far I like it a lot. There is a little bit of a learning curve if you are not completely familiar with MVC concepts.

What is ZendAMF?
ZendAMF is essentially the addition of AMF support into the Zend Framework. You do not have to use the MVC framework to use the new AMF features. The workflow is very similar to the one used in AMFPHP. This is no accident, as both implementations are being done by Wade Arnold. Essentially you create a PHP class with methods that can be called directly from Flash or Flex. Take a look at my tutorials on AMFPHP for more on how to do this. I’ll let you know when the first stable release of ZendAMF hits the streets. It should only be a matter of days now.

So what about AMFPHP?
Wade will continue to run this project but using ZendAMF will be the only method that will be officially supported by both Adobe and Zend. This means that it will be thoroughly tested and potentially more reliable than AMFPHP. Again, the difficulty level of working with either is about the same. Look for a tutorial on ZendAMF very soon.


Write a Comment



  1. I wouldn’t be surprised if Microsoft does something similar with Silverlight since we just did it. I could set my watch by it. One thing they won’t be likely doing however is coming up with some original ideas of their own.

  2. I think this is great news and a huge congrats to Wade who took over the AMFPHP project after Patrick left.

    My only concern is that Wade’s commitment to ZendAMF will stall AMFPHP even further.

  3. As one of the earlier contributors to amfphp, I welcome this. I wouldn’t be too concerned about stalling amfphp development, if there is a need someone will take over as Patrick and Wade have shown.

    Ultimately with the addition of amf to the zend framework you will have superior functionality and efficiencies. Remember this is only because Adobe has opened up the format and is agreeable to these arrangements. Big props to them.

  4. I don’t think you’ll need AMFPHP anymore. You should be able to drop Zend_AMF into a project and not worry about the rest of the Zend Framework. Wade has said that AMFEXT support will be coming in the next couple of months too. A bit of extra quality control on the Zend_AMF code, as well as dropping PHP4 support, will be a good thing IMO.

  5. Yesterday I attended the Chicago AUG to learn about BlazeDS with Michael Labriola. How does ZendAMF compare/differ/work with BlazeDS. From my understanding BlazeDS acts like “bus” that interacts with various languages. So can I use something like ZendAMF as an adapter with BlazeDS? Sorry if this is a bit off topic but I am just trying to get a better grasp of the whole server side aspect of Flex.

  6. @Justin I agree with Darren that AMFPHP will be used much less with Zend_AMF out there. It will be a more reliable implementation of AMF and you do not need to use any of the other Zend features to use it.

    @Romkdehaan The biggest difference is that Blaze DS requires a Java server to run on. There is no connection or integration between Blaze and Zend_AMF. If you have a Java server and want to use AMF, then Blaze DS is the answer. If you are using PHP for your application and want to use AMF then Zend_AMF will be what you want.

  7. Someone mentioned Silverlight here.. If you’re looking for a universal connectivity between PHP and rich clients including Flex, Flash and Silverlight, WebORB for PHP provides it today. Here’s the link:

    The implementations works with both standard PHP and Zend Core. In addition to basic remoting, management console, service browser and code generators the product support full-blown data management as well as messaging.

  8. @Darren Any idea if Wade mentioned if AMFEXT will be required? I know a buddy who uses CakePHP a lot is pretty upset that the new CakeAMF requires AMFEXT and that limits it usage on projects w/ clients who can’t afford a VPS that allows custom PHP installs.

  9. I’m little unclear as to the work flow that this will require, will development need to be done through Flex Builder to use it? Or does it operate independent of the environment, and therefore accessible to Flash IDE, Flash Develop, or FDT?

  10. This seems interesteing! *spells*

    I’ve been using Zend Studio for all my php work and it will be great to be able see it integrated with Flex.

    On another note flas cs4 out for beta soon no?

    Lots of good news, thank you lee! :P

  11. @Mark Yes it is free.

    @Tyler No this will work everywhere and isn’t at all tied to Flex Builder. It’s basically the same as AMFPHP in that you connect to a gateway and then call methods.

  12. Thanks for clarifying Lee. I find Adobe announcements surrounding the Flex Platform awfully confusing, it seems to me that “Flex” gets used a lot where “Action Script” is more accurate. Thanks again!

  13. Hey Lee,

    off topic, but do you (or anyone) know if there’s an AIR Actionscript 3 Reference Doc installer for Flash CS3?

    Much appreciated if you know

  14. ZendAMF?
    Is’t can work with flash player 10?

    I try to used amfphp to connect with flash player10, it no work, so maybe zendAMF can connect with flash player10

  15. Some concerns about ZendAMF….

    one question about ZendAMF and the integration of Flex (AS3) with PHP5.
    What is the sense of definining Value Objects in PHP and perform all the explicit class mapping with AS3 classes, when type checking is not enforced anyways?

    Example: I create a Contact object in PHP, add some non-member variables and send it via ZendAMF to Flex. There it will still be recognised as a valid Contact object.

    In addition, the setClassMapping method does not care if the Flex and PHP Object actually looks alike.

    Is there a function, which checks if an object really only defines member defined in the class (PHP and AS3)?

    Otherwise I dont understand the whole concept of binding the classes, when I am anyways able to send whatever I want an the serialized object will comply (whatsoever it contains) as a valid object.


  16. I ditto Martin’s concern. The great thing about Flex data services are the class mapping. If an object changes in the UI, the same object changes on the back end. This is really important in a real time, multi user application. Can this be done in PHP?

  17. @John I am in the process of developing a plugin for CakePHP which uses ZendAmf for serializing and de-serializing of data. It doesn’t require AMFEXT however I’m looking forward to Wade integrating it!

    “Any idea if Wade mentioned if AMFEXT will be required? I know a buddy who uses CakePHP a lot is pretty upset that the new CakeAMF requires AMFEXT and that limits it usage on projects w/ clients who can’t afford a VPS that allows custom PHP installs.”

  18. Zend AMF over Https? Any thoughts? I am using the secureAMF Channel in Flex, but dont get results. Can anyone share his experiences?