views:

957

answers:

4

I am a newbie to Flex 3 and Flash remoting and I can't decide which technique to use for frontend/backend communication.

I started of with XML, but it seems overhead to construct all XMLs in PHP, parse them in Flex, and for sending back data constructing again XMLs in Flex and then parsing them in PHP.

That's why I found AMFPHP, which seems great in the way that I can directly access classes/objects in PHP and modify them. Seems much cleaner. For example doing updates on data in the database, I just call a set method with defined attributes.

Then I also found WebORP.

Would are the greatest disadvantages of AMFPHP? Any recommendations?

Thx a lot, Martin

A: 

I don't know anything about WebORP but AMFPHP will definitely work better for you than the xml. AMF is a binary transport and is MUCH faster than transferring all of that ascii text and parsing it all out. Plus it will allow you to work directly with your PHP class files.

I really can't think of any disadvantages ;)

About the only time that xml makes more sense is if you are writing a service that is going to be used (consumed) by multiple different languages and you need the least common denominator.

Ryan Guill
In the end I went for ZendAMF, because it seems to better supported than AMFPHP and WebORB. Thanks, seems reasonable to use a binarytransport protocoll
A: 

Hey Martin,

WebORB is also a very good choice but they are mainly focused on .NET (that's what I'm using it for) so you would have to compare AMFPHP, ZendAMF and WebORB. WebORB has a lot of other features like messaging, pdf support, msmq support, ... but I don't know what of these things are supported in PHP.

Lieven Cardoen
A: 

I used AMFPHP for a small project where there was pretty much a designer and myself, that was fine, it's really quick and easy. I used WebORB for a middle sized project that involved ~4 Flex developers; it worked fine, and I felt that the approach could handle a fairly large group (we used Cairngorm on the Flex side, btw).

I felt that WebORB was more complete, though the class marshalling on the PHP end was a tad hard to debug. (Ie. If in Flex you prepared an object, and the AS3 class definition had drifted slightly from the PHP class definition, this was hard to interpret from errors. Synchronising these should be automated, don't know if this is possible yet.)

Mead