On Feb 18, 10:53 pm, carlo <[email protected]> wrote:
> discussion has shifted on helpers that I love but I do not suggest
> them working in team with designers. Helpers can fail on readability:
> try 4-5 annidated helpers each with 3-4 properties.

It's the same as trying a 4-5 dimensional dict/list with 3-4 elements
each. You don't want to be doing that either.

> -  a clean separation between markup and logic is advisable or you
> fall in java servlets or php

Been there, done that for quite a while, I agree with what you say
above, but do not consider helpers markup.

> - the "everything in controllers" style easily leads to messy code
> (see example above)

Yes, helpers, just as almost any other pattern, can be abused. You
don't use helpers to generate static html or complete pages/gigantic
forms from it - I agree that the example you give is an example how
NOT to use helpers (unless you're MDP ;) - but not as an example
helpers should not be used in controllers. You should use it to handle/
prepare dynamic data, in small, understandable chunks, if it's static -
> it's a view. If it's complex -> it needs to be broken up and
assembled in the view. Don't be afraid to manipulate helper objects
from a view !

You could just the same way return a string containing markup or raw
javascript which would be just as bad, but that does not mean
returning variables breaks MVC, but that you misuse the mechanism.

> - one of the best solution at the moment is Tim Farrell's (see link
> above)

Glad you like it, but can we vote ? :)

There, promised not to respond, but still had to :) Must ...
resist ... :)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" 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/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to