:-)

> 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.

with helpers you get a clear advantage: you can easily get rid of them
if you want, sometimes more difficult with lists.

>
> > -  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.

what about an unnecessary layer of code?

>
> > - 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 !

what I wanted to prove is that mainstream web2py examples and even the
book seem to promote a coding style which easily can lead to the above
example. Forms with 4 fields and 2 tables are good, but if you have 10
fields and 10 table datasource?

> 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.

About MVC we do not agree.
I share this line:

http://groups.google.it/group/web2py/browse_thread/thread/4cd0a75de54f32aa/6312be3940d30fa4?lnk=gst&q=mvc#6312be3940d30fa4

http://groups.google.it/group/web2py/msg/c096da7eb69c4d64

and other Billf tries to free from forms in controllers.

> > - one of the best solution at the moment is Tim Farrell's (see link
> > above)
>
> Glad you like it, but can we vote ? :)

yes you can, it is explicit in the topic question mark :)

> There, promised not to respond, but still had to :) Must ...
> resist ... :)


I will give you the last word, I promise :)

carlo
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to