On Apr 4, 1:48 pm, Jonathan Vanasco <[email protected]> wrote:
> I could be wrong, but this looks just like the stuff that i'd put into
> a helper library to keep my controllers a bit cleaner...
>
> (task_id,status) = h.newtask('add')
>
> helpers/tasks.py
> def newtask( method ):
>      t= task().bigtask().

While the controller is cleaner, does that really make it more
readable?  From a maintainability standpoint, would someone new to the
code be able to see what that action was doing reasonably quickly?

At that point, you don't really know what newtask does unless you end
up writing a more descriptive function name, or, pass the class within
the parameter, and the action... and the parameters...   :)

While the controller at that point would have 4-5 lines of code before
the response, considering that action is only used once and it isn't
duplicating code used elsewhere, all I would really be doing is moving
code from one place to another.  I realize this is a philosophical
discussion and that everyone may have different opinions, but, it is
good to hear different viewpoints.

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to