>
> Interesting thought experiment, but why? Explain why you need to avoid
> using 'new' when instantiating objects in controllers.
>
If you use 'new', you need to include the Model's file/class. I thought it
would be better to include all these files not in controllers but in
helpers. Why? Hm, i think it is cleaner and maybe you can include them in an
extra file all together? Hm...
Bill Karwin wrote:
>
> Proxy is a fine pattern, but why not use a Factory to generate model
> objects instead? Explain your choice of design pattern.
>
Well, i think a ZF ActionHelper is almost a proxy but using a factory is
also a good way here.
I made little changes in the sequence diagram. I do not use
$this->_helps['this'] anymore. I decide to create the helper as
My_Helper_ModelHelper and use it in controllers with $this->_helps['model'].
http://www.nabble.com/file/p18987889/zf_model_sequence_diagram.zip
zf_model_sequence_diagram.zip
http://www.nabble.com/file/p18987889/zf_model_class_diagram.zip
zf_model_class_diagram.zip
Greets,
David
--
View this message in context: http://www.nabble.com/Integration-of-Models-tp18985795p18987889.html
Sent from the Zend MVC mailing list archive at Nabble.com.
没有评论:
发表评论