I would first consider creating some protected methods within that controller to isolate some of your more repeated code. On first glance, a method creating $params, might make sense.

In general, I dont think your controller is out of the ordinary, nor would I say it is especially long. I don't really subscribe to the thick/thin controller idea necessarily. I think the controller should have as much code as it needs to fulfill its ultimate job..

Which is: The Controller should interact with the environment in such a way to instantiate the proper models, views, and other consumables (like a form) in order to complete a request. It shouldnt do anything "business" logic wise, nor should it do anything that would be considered UI or presentation specific.

-ralph

Ryan Chan wrote:
Hello,

On Mon, Sep 21, 2009 at 9:55 PM, Matthew Weier O'Phinney
<matt...@zend.com> wrote:
If it is repetitive presentation logic you could sub-class the
Zend_Controller_Action or create action helpers if the repeating logic are
"cross cutting concerns". Keep in mind the saying is "fat model thin
controller" not just "thin controller"

For example, do you think the following code is a "thick controller"?
and difficult to manage?

http://howachen.googlepages.com/test.php


For me, it is.
It would be better to manage if each action is in a separate PHP class
file, isn't?

Reply via email to