AS3 OOP MVC with PHP
Posted
by Pepe Sanchez
on Stack Overflow
See other posts from Stack Overflow
or by Pepe Sanchez
Published on 2010-04-09T00:51:34Z
Indexed on
2010/04/09
0:53 UTC
Read the original article
Hit count: 800
Im new to ActionScript and Flex 3... im trying to develop an MVC 100% OOP application with Flex 3 using MXML,AS3 and PHP.
M (PHP) V (MXML) C (AS3)
The 3 layers i choose for my development. I have 10 AS3 classes that are object related between them and some inherit or implement interfaces.
The only problem here is how to interact 100% OOP with my model. In this case my model has to be a PHP Class that needs to be called from AS3 (the controller).
For example the AS3 class : Patient have a method called Save:
public function Save(data:Array) : void
{
/* PHP call - model layer */
}
I want to create an instance of my PHP Patient Model class that connects to the DB and insert the data array into it.
What should i use ? how can i also return a variable to AS3 ? What happen to as3 if there is a cached Exception in PHP ?
Thanks in advanced :)
© Stack Overflow or respective owner