[BangPypers] Getting the know-how of UI effects using HTML etc..

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

Thanks,
Vishal

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
> someone
> > could explain...the need for Templating vs Creating HTML on the fly like
> we
> > did in CGI scripts.
> > Why would there be a need for Templating...if we can create similar HTML
> on
> > 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.
>
> [..]
>
> --
> ~noufal
> _______________________________________________
> BangPypers mailing list
> BangPypers at python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>



-- 
"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...
URL: <http://mail.python.org/pipermail/bangpypers/attachments/20090413/1c945920/attachment.htm>


More information about the BangPypers mailing list