Peiris
asked on
Zend Framework objects vs arrays
Hi
I am working on a project that is written in Zend Framework. In that, the entire objects being given to views. For example
then within the view, it pull the necessary info from the object.
My question is, is this is a good practice in general ? I think passing only necessary info using array or individual variables to views is more efficient than completely duplicating the object in the memory. But, I might be wrong, because processing to get the info what we need only within the view might be expensive. I just want to know what is the best practice for this.
Any suggestions and reading materials (links) will be greatly appreciate it.
Thanks
Peiris
I am working on a project that is written in Zend Framework. In that, the entire objects being given to views. For example
$Object = new ClassName();
$this->view->data = $Object;
then within the view, it pull the necessary info from the object.
My question is, is this is a good practice in general ? I think passing only necessary info using array or individual variables to views is more efficient than completely duplicating the object in the memory. But, I might be wrong, because processing to get the info what we need only within the view might be expensive. I just want to know what is the best practice for this.
Any suggestions and reading materials (links) will be greatly appreciate it.
Thanks
Peiris
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER