First of all, thanks to Massimo and the community for providing an
impressive framework to work with.
Being a Zope developer (and back-end python programmer) for the past
10 years (and soon to web2py convert) , I'd like to share one of the
issues that I have struggled since the early days of DTML.
Please, please do not mix presentation and logic in the controller,
things such a THEAD(TR(TD('<hello>')),_class='myclass',_id=0) from
"controller.py" tends to be very attractive to the novice programmer,
but other than for debugging or testing purposes, IMHO should be
avoided, nailed its practice into an iron coffin and throw it in the
deepest sea.
On the other side of the spectrum, adding python logic into the view
(again IMHO should also be avoided like the plague) Consider the
following:
>From myview.html:
{{def foobaz():}}
<h1>This is the baz</h1>
{{return}}
Let me tell you why, at least in the "enterprise" realm this would
become a big problem: You will eventually have to work with a team
(yes, a team of programmers, business analysts, database designers and
user interface monkeys), you want to give the UI guys the "cleanest"
html code for the to play with and mock-up, you know, to keep the
"biz" side happy, etc, what's the point in giving the UI guy (which
may not know python at all) a hello.html with only a {{=respone.glob}}
statement on it?, or on the other hand, you have the purist "python
guy" in the IT dungeon lair and all of the sudden you provide him with
pseudo-html embedded in functions in which he was expecting take care
of logic issues in the code.. see my point?
Please do not get me wrong, I honestly like web2py *a lot*, I just
don't want to see it becoming a nuisance programming-wise instead of a
solid framework tool to introduce in my company. Thanks you all and
keep up the excellent work.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---