bubblboy,
* "Template engine must be fast" is not the point of my opinion.
Tenjin is not only so fast but also very powerful (for example,
layout template, partial template, capturing, preprocessing,
and so on).
I introduced Tenjin to show *another option* to web.py users.
Some want more speed or features, and some doesn't.
It is good thing that there are several options to choice.
I think *choosability* is important.
* Benchmark program is included in distribution of Tenjin.
You can try it at any time.
Currently, this benchmark program supports Tenjin, Cheetah,
Django, Myghty, and Kid.
Mako, Templetor, and Genshi will be supported in the next
release of Tenjin.
* You may feel that Tenjin syntax is not beautiful, but there
are reasons for Tenjin's syntax.
For examle,
$for item in items: # Templetor
will break HTML design but
<?py for item in items: ?> # Tenjin
doesn't break HTML design because '<?py ?>' (it is named
Processing Instructions) is a part of HTML.
This is discussed in above.
You should show your HTML template by web browser and
would found that Tenjin's template is more beautiful than
Templetor or other template engine.
#In addition, I think '<?py ?>' is enough simple.
* I don't aim Tenjin to be the default template engine of web.py.
My aim is to provide the other option for web.py users.
It is you to determine what option to select.
I have no right to force you.
All I can do is to provide options.
--
makoto kuwata
On 2007-10-22, 1:53 am, bubblboy <[EMAIL PROTECTED]> wrote:
>
> Alright, I have a few comments on this thread (including some of the
> replies). Let me start with the fundamental one:
>
> In above e-mail you claim a lot of things concerning "speed". The way I
> learned it; every, and I mean *every* such claim must be backed up by a
> /significant/ amount of data to be at the very least credible. "About
> ten times faster than Templetor" does not tell me anything, not anything
> at all. I could write a specific PHP script that was optimized to be
> dealt with cleanly be the Zend engine, write a crappy C equivalent that
> is far from efficient and claim that "PHP is about as fast as C".
>
> I do not know about the others on this mailing list, but when I read
> these kind of things I want to know more:
> - how did you test this?
> - how did you benchmark? what program did you use for benchmarking?
> - how often did you test this? (this is probably the most important one)
> - which templates did you compare?
> - what other programs were running while you ran the tests?
> - what are the /exact/ results of your tests?
>
> Those are just a few things that come to mind. Basically, if the tests
> are not reproducible the results are worth pretty much nothing.
>
> Anyhow, assuming that it truly is ten times faster than templetor, on
> average. This leaves the issue that Tzury pointed out; its syntax. When
> he said "the zen of python" he referred to Tim Peters' "The Zen of
> Python" [1] (this has become some sort of an unspoken python rule over
> the years). At least, that's what I assume he was talking about... One
> of the important points mentioned in the zen of python is the first one;
> "beautiful is better than ugly". I hate to include subjective arguments
> in discussions like these but I have to say this: Tenjin's syntax is
> just ugly. <?py, ?>, $, {, #, it all clutters the template. It makes it
> hard to read and (most importantly) harder to distinguish the template
> language from the actual HTML (or whatever you are writing). While I
> agree that there are advantages to such a syntax you must keep in mind
> that simplicity is probably the most important thing about web.py; it's
> what it is all about. You simply can not take simplicity away from the
> web.py without killing it. At least, that is how I see it.
>
> This makes me wonder if maybe it is possible to merge the two...? If
> Tenjin really is faster, how about incorporating some if its logic,
> where possible, into the templetor engine, while keeping templetor's
> syntax? That could produce interesting results :)
>
> Anyway, I hope I have not offended you too much in saying this. I would
> love to hear your thoughts on the matter.
>
> Thanks for taking the time to tell us about Tenjin and doing the
> benchmarks and the comparisons.
>
> Greetings,
>
> b^4
>
> P.S.: What Anand meant by allowing untrusted users to write templates
> was that with templetor you can create a "template sandbox", preventing
> people from accessing restricted areas and calling prohibited
> procedures. Enforcing resource-limitation is still up to the programmer
> (for example: make a thread, start it, wait a number of seconds and if
> it's not done kill it). There is a difference between a simple DOS and
> an actual security vulnerability that allows remote exploitation of a
> system.
>
> P.P.S.: Anand, Tzury, I have been so bold to make some, perhaps
> erroneous, assumptions about what you were trying to say; please forgive
> me if I mistakenly misinterpreted your messages.
>
> [1]http://www.python.org/doc/Humor.html#zen
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web.py" 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/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---