Hello All,
just for fun I have been messing around with AMFPHP and I have hit a design problem and I was just wondering if anyone had any input?
I have been using AMFPHP to make calls to a PHP script like so: -
public function dbconnect(host:String,user:String,pass:String):void {
trace("Sending Data to AMFPHP");
// Send the data to the remote server.
responder = new Responder(dbResult, onFault);
connection.call("dbtest.dbconnect",responder,host,user,pass);
}
This calls the method “dbconnect” in my PHP script and returns data in a responder method: -
private function dbResult(result:Object):void {
returndata = String(result);
trace(returndata);
}
Anyhow I was looking into making and Database Query Tool so I am going to be making calls to the database via the PHP script depending on what the user selects on the Flash stage.
I was just wondering if its better to use one Responder method to return every call and have that triggered by a custom event or something?
Or use a Responder for every different call to the PHP script?
Any thoughts on a better design?
Thanks in advance