By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,799 Members | 1,349 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,799 IT Pros & Developers. It's quick & easy.

Mako vs. Cheetah?

P: n/a
I always have the desire to learn one thing well instead of split my
attention between several options, so I'm trying to decide which of
these two to start learning. Are there any particular things I should
look at when deciding between them, in terms of features, for example?
Do they do all the same things?

Thanks.
Jun 27 '08 #1
Share this Question
Share on Google+
6 Replies

P: n/a
"John Salerno" <jo******@NOSPAMgmail.comwrote in message
news:48***********************@cv.net...
>I always have the desire to learn one thing well instead of split my
attention between several options, so I'm trying to decide which of these
two to start learning. Are there any particular things I should look at
when deciding between them, in terms of features, for example? Do they do
all the same things?
Is it correct to say that Mako allows you to embed Python code within HTML,
whereas Cheetah requires a certain amount of "tweaking" of Python code so
that it isn't really code you could just run independently in the
interpreter?

I'm getting that impression from what I see so far.
Jun 27 '08 #2

P: n/a
"John Salerno" <jo******@NOSPAMgmail.comwrote:
>
Is it correct to say that Mako allows you to embed Python code within HTML,
whereas Cheetah requires a certain amount of "tweaking" of Python code so
that it isn't really code you could just run independently in the
interpreter?

I'm getting that impression from what I see so far.
What gives you that impression? I'm just curious. Other than the special
characters used, my impression is that the two are far more similar than
they are different.

As I posted on one of the mailing lists this week, the most important
criteria in your choice of a templating system really is personal
preference. Personally, I really like Cheetah. I find it simple and
intuitive, with a minimum of syntax interference. However, many people
believe it violates the "separation of presentation and computation" rule
too much, and that's just fine. Others really like the TAL scheme in Zope.
For my taste, TAL just requires too much non-essential syntax; it
interferes with the reading of the page.

So, the folks who like TAL can go ahead and be productive with TAL, and
I'll keep on being productive with Cheetah.
--
Tim Roberts, ti**@probo.com
Providenza & Boekelheide, Inc.
Jun 28 '08 #3

P: n/a
Le Saturday 28 June 2008 06:30:50 Tim Roberts, vous avez écrit*:
*Others really like the TAL scheme in Zope.
For my taste, TAL just requires too much non-essential syntax; it
interferes with the reading of the page.

So, the folks who like TAL can go ahead and be productive with TAL, and
I'll keep on being productive with Cheetah.
Yes, TAL is a bit more hard and require some added learning, but tal templates
are very powerful and well structured, and they have a real advantage over
all other templating system, they are valid xhtml, thus an html editor could
modify them without breaking the logic of the template.

--
_____________

Maric Michaud
Jun 28 '08 #4

P: n/a
A small and ultra-lightweight system, with all the power of any fully
featured text-based templating system (such as mako or cheetah) and
then some (no constraints on template file names or formats,
restricted execution, automatic XSS protection, ...) that can be used
in a web context or standalone, while being also incredibly fast, is
Evoque Templating: http://evoque.gizmojo.org/

And the simplicity of the system means you can assimilate the entire
thing in a single sitting, and thereafter easily remember the few key
things to continue using it without constant re-consulting of the docs
(that, actually, are also pretty good ;-)

So yes, agree with you entirely, that shameless personal preference is
important for choosing your templating system... ;)

mario
Jun 28 '08 #5

P: n/a
Tim Roberts wrote:
"John Salerno" <jo******@NOSPAMgmail.comwrote:
>Is it correct to say that Mako allows you to embed Python code within HTML,
whereas Cheetah requires a certain amount of "tweaking" of Python code so
that it isn't really code you could just run independently in the
interpreter?

I'm getting that impression from what I see so far.

What gives you that impression? I'm just curious. Other than the special
characters used, my impression is that the two are far more similar than
they are different.
Well, that opinion was based mostly on my initial exposure to each one.
The main reason was that Cheetah seems to require a lot of $ signs, even
in the Pyton code itself, such as:

for $thing in $things: etc....

whereas with Mako you can just write straight Python code. Overall I
think I'm liking Mako better, which is fine since I want to learn Pylons
and it's the default. :)
Jun 29 '08 #6

P: n/a
Maric Michaud a écrit :
Le Saturday 28 June 2008 06:30:50 Tim Roberts, vous avez écrit :
> Others really like the TAL scheme in Zope.
For my taste, TAL just requires too much non-essential syntax; it
interferes with the reading of the page.

So, the folks who like TAL can go ahead and be productive with TAL, and
I'll keep on being productive with Cheetah.

Yes, TAL is a bit more hard and require some added learning, but tal templates
are very powerful and well structured, and they have a real advantage over
all other templating system, they are valid xhtml,
So are Kid and Genshi, and they are way less verbose than TAL.

And FWIW making Django's templating system xhtml compliant mostly
requires redefining a couple constants to replace {% %} with <?py ?and
{{ }} with ${ }.

Jul 2 '08 #7

This discussion thread is closed

Replies have been disabled for this discussion.