Which PHP library to choose to handle AMF communication?
I'm looking for a PHP library to handle AMF communication with a Flash client app. My server will be running PHP 5.3.5 and a cakePHP app.
I tried the cakeAMF, cakeAMFPHP and Cpamf cake plugins but they all are pretty old and not updated anymore. Also I'm encountering a plethora of issues integrating them开发者_运维知识库 in cakePHP 1.3 on PHP 5.3.5
So I'm now turning to the next players in line : WebORB, sabreAMF and Zend AMF.
Have you tested them already, and if so, which one would you suggest ?
I haven't tried integrating any of those with CakePHP, but I've worked with the old AMFPHP, ZendAMF, and WebORB, and ZendAMF is easily the best choice for integrating into an existing app. As far as I understand it, the author of AMFPHP created ZendAMF, so it should be the fastest and most correct AMF implementation available for PHP.
I've done the same thing you did with a Symfony app, and I used the old AMFPHP for that. It turned out okay in the end, but there were some issues to deal with because AMFPHP wasn't really designed for that. Plus, a bunch of stuff has been fixed in ZendAMF that's kind of broken in AMFPHP.
I migrated the cakephp 1.3 with amfphp to cakephp 2.0, seems to work. I'm willing to make it available on github if there is any interest
There is a fast and reliable PHP AMF3 extension to try out:
http://neoxic.me/php-amf3/
It allows two native functions amf3_encode() and amf3_decode() to be employed instead of bringing in a relatively large framework.
精彩评论