AMFPHP makes remoting for Flash painless and costless.

Yioit, Flash Remoting is about calling methods via RPC. You define your
service classes on the server side, and then call them on the client-side
defining call-backs for the results, then you wait for the results (if any)
- i.e: You don't consume http services or xml files directly nor you handle
xml files directly. It's different from the method you've described and on
which you have developed your php class.

Lachlan is right about the server domain logic being bypassed. The best
option is to encapsulate server side logic and create domain model objects
unless you're creating a very simple RIA.

To sum things up - AMFPHP is a Flash Remoting implementation which works on
the AMF0 protocol. Search for more info about the AMF0 protocol and you
should figure things out :)

Cheers,

Marcelo.

On 12/18/06, Lachlan Cotter <[EMAIL PROTECTED]> wrote:

  Hi Yioit,

I believe AMFPHP was originally created to work with remoting in Flash
(not Flex). The XML handling abilities of Flash are not in the same league
as Flex, so XML was a huge pain. AMFPHP definitely makes a big difference
for Flash Development.

Since Flex is so much better with XML, the benefits may not be so obvious
depending on the specifics of your project.

I agree with you that there can be a lot of overhead in creating
client-server interfaces and working out the best way to serialise data for
transfer etc. As for your comment about having to write classes in both PHP
and ActionScript: I don't see that there is any escaping this. Unless your
application is trivially simple, then you will surely want to create domain
model objects on the server to encapsulate logic and the database access.
Same goes for the Flex side.

As for the most development time efficient method for architecting the
service interface, I'm still trying to figure that out. There are several
options for both XML and AMF in PHP and also in other languages. WebORB for
Ruby on Rails is another alternative that can potentially save time once you
get over the Rails learning curve and learn how to install everything
properly (which is a significant investment).

You are correct that AMF serialised data is quicker to transfer and
marshal than the equivalent XML, but this probably only becomes an issue
when your dealing with quite large result sets.

With regard to your generalised database query over HTTP class: I'm all
for this type of time saving solution, but I think you need to address a
couple of issues to make it more widely useful. Namely, the security concern
of having a service that allows clients to effectively design their own SQL
queries to be executed on your server, and secondly the fact that this
approach seems to bypass the server side domain logic.

Cheers,
Lach


On 18/12/2006, at 6:44 PM, Yiđit Boyar wrote:

hi,
i've been developing web RIA's using PHP&mysql support for data for about
3-4 months. writing diffrent php files for every fetch type was sucking so
i've starting developing a new class communicating with my own php file to
fetch data. my class is so pre now but you may find some info about it at
http://yboyar.blogspot.com/2006/12/easyreq-http-service-class-which-
makes.html .
anyway; my question is sth diffrent. also i read a lot about AMFPHP , i
still could not understand where it helps me reduce time to build
applications since i write every class in php & actionscript.
i've downloaded AMFPHP but although i did the database setup , it still
gives error.
So, please can someone clearly explain me how AMFPHP helps time reduction
WHILE developing the application ? (or does it ?)
as much as i understood, it help reducing transferred data size in the
running time. Am I right in this point ?

thanks a lot, by the way; what do you think about the tool i develop; does
it seem helpful or useless ?


Reply via email to