[BangPypers] Getting the know-how of UI effects using HTML etc..
vsapre80 at gmail.com
Mon Apr 13 10:53:35 CEST 2009
OK..so its about making sure that The View is totally separate from the
Controller, and yet the View should contain programmable elements...which
get filled up at run time.
Which is possible also by having straight HTML printing....but gets complex
as the number of such conditional print statements increases overtime.
But in that case...are there still instances when one would need 'print'
based HTML generation.
>From what it seems, if the amount of markup is small then printing it is
probably good. But when lots of customization to each page is
needed...templating would be the way to go.
On Mon, Apr 13, 2009 at 11:08 AM, Noufal Ibrahim <noufal at gmail.com> wrote:
> On Mon, Apr 13, 2009 at 10:51 AM, Vishal <vsapre80 at gmail.com> wrote:
> > To take this question further....It seems it would help everyone if
> > could explain...the need for Templating vs Creating HTML on the fly like
> > did in CGI scripts.
> > Why would there be a need for Templating...if we can create similar HTML
> > the fly...by simply using print statements and raw strings that can be
> > stored in the python file or using modules like HTMLTags.py or HTMLgen.
> Your dichotomy is not exactly accurate. People initially using print
> statements directly print strings. Then they put these strings in
> files which can be substituted. Then they find that they're
> cutting/pasting into multiple files so they introduce some facility to
> include other strings. Then they find that they don't want to change
> all the content but just some parts so they introduce some
> substitution tricks. Then they want valid XHTML even if their
> application tries to mess up so they separate form and content. This
> goes on and you get a templating language. It's really a gradual
> change rather than a 'direct HTML' vs. 'templates'.
> I for one find it very convenient to use a templating system (I mostly
> use clearsilver). It's easy to modify my layout without touching my
> actual code.
> BangPypers mailing list
> BangPypers at python.org
"So say...Day by day, in every way, I am getting better, better and better
"A Strong and Positive attitude creates more miracles than anything else.
Because...Life is 10% how you make it, and 90% how you take it"
"Diamond is another piece of coal that did well under pressure”
"Happiness keeps u Sweet, Trials keep u Strong,
Sorrow keeps u Human, Failure Keeps u Humble,
Success keeps u Glowing, But only God Keeps u Going.....Keep Going....."
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the BangPypers