The most important thing is that, with the addition of JSON, I can now see Ajax developers using Amfphp too. It's now possible to use the same service in JS and Flash/Flex. That's going to a real boon for sites that use a combination of JS and Flash/Flex too.
Thanks to Patrick, Amfphp is going from strength to strength and I'm looking forward to contributing to the project a bit more over the coming weeks myself.
If you haven't seen it yet, check out Amfphp 1.9 Beta.
The Amfphp 1.9 Beta article by Aral Balkan, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Noncommercial 2.0 UK: England License.
I wouldn’t like to make any bad comments about amfphp, but have strong reasons why amfphp sucks. For one thing, it is stated at http://www.amfphp.org/amfphprocks.html , that “amfphp is faster than XML or LoadVars”. It is absolutely wrong. Also, in the same url, it is pointed out, “You cannot just pass a “string” from Flash to PHP, or PHP to Flash… you have to send a URL encoded string. ” Ooo yea, I did it, but it didn’t make any difference in terms of performance.
Last year, I read almost all online tutorials, and also read O’Reilly’s Flash Remoting book. Then I developed all my RIA projects with amfphp whenever we needed backend scripting. The only reason I had to use amfphp was because of my manager at work. He was so interested in seeing the source codes developed using classes etc. As a result, he would be able reuse the code again without recoding it; It turned out that the only good thing about amfphp was when the binary data had to proccessed. I believe, this truth could save my time if I knew it before.
Ozgur-
Nah, it just rocks.
it is stated at http://www.amfphp.org/amfphprocks.html ,
“Further advantages of Remoting
You cannot just pass a “string” from Flash to PHP, or PHP to Flash… you have to send a URL encoded string. So you have to add a little code on both ends to handle that. What if you need to send arrays? Objects? DataSets? You have to write serialization/deserialization for complex, non-primitive types to send over the wire via URL encoded strings. But why would you want to write your own classes when Remoting already does all this stuff very well?”
The solution the person at amfphp offered about handling complex data types is very inefficient. Why would I handle complex data types by writing serialization/deserialization for non-primitive types to send over the wire via URL encoded strings?
There is an easier way to handle complex data types. it is to create an “array full of objects” at the front end to store complex data types . It increases the performance, and it decreases the coding time. Therefore, amfphp sucks.
You can easily pass strings from Flash to PHP using amfphp. As well as arrays, and it rocks the house. You need to get aquainted with your resolver and PHP DOM.
hi,
if it is the task to pass strings from Flash to PHP, then use LoadVars or XML; even amfphp site suggest it at http://www.amfphp.org/amfphprocks.html
Hi Ozgur,
There is more to consider about a given workflow than raw processing time. The real advantage to remoting is in removing the serialization/deserialization/data massaging code from your application. Less code == less that can go wrong == less risk, etc. It’s also less dev time and you can concentrate on actually building the business logic instead of plumbing.
Beyond that, Patrick’s written a very nice article clear ing the FUD on Amfphp’s speed versus JSON and XML.
I don’t understand your argument against Amfphp but that’s all right: There are many ways to skin a cat and if something works better for you, of course you should use that.
If it is of any interest I have made a small and simple tutorial on how to connect actionscript 3 whit AMFPHP 1.9 you can find it on my blog at http://flashorbit.com/?page_id=53
Hi Morten,
Thanks for sharing!
HEY, Excuse me, but i´m interesting in the AMFPHP and i like to try. But the server 5etedmi is down. thanks.
Hi, Out there are many tutorials on “AMFPHP how to get data from PHP”. But what is with “how to get data with 1.9 AMFPHP from “CS3 to database”??