Zend Amf Class based Lazy loading. How do you want it ?
October 16th, 2008
In AMFPHP you were able to specifiy a services directory and a VO directory. The main reason that I remember that we created a VO directory was so that the service browser did not look into that directory. Does anyone have a reason why they would want a different directory for services and VO’s? Respond quick as I am leaning towards just having a services directory!


A vote here for services directory only, thanks Wade!
+1 for a services directory only.
In other matters, it would be great if there was a way of specifying which properties of mapped classes are included, without using a custom iterator. Sometimes I don’t want all of the public properties of my PHP object to be declared in my AS class.
I’d prefer a folder for services and one for vo’s.
Will give projects a cleaner structure.
My 2 cents
+1 for a services directory only.
What about VO mapping?
@Matt : just declare your PHP variable private
In the other way, you can look into Transient tag.
@Wade : I am all for simplicity I just want to be free to put my DTOs anywhere I want
(I usually have folders /dto /business /command and so on)
Wade –
speaking of services, will there be a service browser for Zend AMF? That really is a great feature in AMFPHP.
services only
In the few times I’ve used AMFPHP, I never created enough VOs to warrent special attention.
Just a services directory sounds fine to me.
@Adnan: Doesn’t help if you’re using object overloading and implementing IteratorAggregate, as Doctrine does. I was after a way of restricting the properties included *without* having to restrict them on the PHP object. The specific use case I have in mind is using active record objects as data transfer objects. I don’t always want every column from the DB to be exposed in AS, even if I do want it in the PHP object.
@Matt Kane what if we put something in the DocBlock and checked if that was set? Suggestions for a word?
@returnValue or something?
Can we have the option of setting a VO directory that defaults to the services directory? I would like to use the same VO objects I use in my web application as I do in the AMF services.
I can only add flexibility and not hurt anything if the default is the services folder.
$server->setServicesDirectory(‘services’);
$server->setVODirectory(‘application/models/’);
@John I hope to bring the same service browser from AMFPHP into a universal remoting project.
@wade – I heartily second Jacob’s suggestion re an option to set a separate VO directory.
Lazy loading based on your feeback has been added:
http://wadearnold.com/blog/?p=103
Please please