"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "docs/users_guide/comparisons.rst" between
cheetah3-3.1.0.tar.gz and cheetah3-3.2.0.tar.gz

About: Cheetah3 is a template engine and code generation tool for e.g. for Web development or Java, SQL, LaTeX, form email ... (written in Python).

comparisons.rst  (cheetah3-3.1.0):comparisons.rst  (cheetah3-3.2.0)
Cheetah vs. Other Template Engines Cheetah vs. Other Template Engines
================================== ==================================
(comparisons)
This appendix compares Cheetah with various other template/emdedded This appendix compares Cheetah with various other template/emdedded
scripting languages and Internet development frameworks. As Cheetah scripting languages and Internet development frameworks. As Cheetah
is similar to Velocity at a superficial level, you may also wish to is similar to Velocity at a superficial level, you may also wish to
read comparisons between Velocity and other languages at read comparisons between Velocity and other languages at
http://jakarta.apache.org/velocity/ymtd/ymtd.html. http://jakarta.apache.org/velocity/ymtd/ymtd.html.
Which features are unique to Cheetah Which features are unique to Cheetah
------------------------------------ ------------------------------------
(comparisons.unique)
- The { block framework} (section inheritanceEtc.block) - The { block framework} (section inheritanceEtc.block)
- Cheetah's powerful yet simple { caching framework} (section - Cheetah's powerful yet simple { caching framework} (section
output.caching) output.caching)
- Cheetah's { Unified Dotted Notation} and { autocalling} - Cheetah's { Unified Dotted Notation} and { autocalling}
(sections language.namemapper.dict and (sections language.namemapper.dict and
language.namemapper.autocalling) language.namemapper.autocalling)
- Cheetah's searchList (section language.searchList) information. - Cheetah's searchList (section language.searchList) information.
skipping to change at line 47 skipping to change at line 43
- Cheetah's ability to mix PSP-style code with Cheetah Language - Cheetah's ability to mix PSP-style code with Cheetah Language
syntax (section tips.PSP) Because of Cheetah's design and Python's syntax (section tips.PSP) Because of Cheetah's design and Python's
flexibility it is relatively easy to extend Cheetah's syntax with flexibility it is relatively easy to extend Cheetah's syntax with
syntax elements from almost any other template or embedded syntax elements from almost any other template or embedded
scripting language. scripting language.
Cheetah vs. Velocity Cheetah vs. Velocity
-------------------- --------------------
(comparisons.velocity)
For a basic introduction to Velocity, visit For a basic introduction to Velocity, visit
http://jakarta.apache.org/velocity. http://jakarta.apache.org/velocity.
Velocity is a Java template engine. It's older than Cheetah, has a Velocity is a Java template engine. It's older than Cheetah, has a
larger user base, and has better examples and docs at the moment. larger user base, and has better examples and docs at the moment.
Cheetah, however, has a number of advantages over Velocity: Cheetah, however, has a number of advantages over Velocity:
- Cheetah is written in Python. Thus, it's easier to use and - Cheetah is written in Python. Thus, it's easier to use and
extend. extend.
skipping to change at line 101 skipping to change at line 95
look among its dictionary keys for 'spam'. Finding it, Cheetah will look among its dictionary keys for 'spam'. Finding it, Cheetah will
select {foofoo['spam']} as {$spam}'s value. select {foofoo['spam']} as {$spam}'s value.
- In Cheetah, the tokens that are used to signal the start of - In Cheetah, the tokens that are used to signal the start of
$placeholders and #directives are configurable. You can set them to $placeholders and #directives are configurable. You can set them to
any character sequences, not just $ and #. any character sequences, not just $ and #.
Cheetah vs. WebMacro Cheetah vs. WebMacro
-------------------- --------------------
(comparisons.webmacro)
For a basic introduction to WebMacro, visit http://webmacro.org. For a basic introduction to WebMacro, visit http://webmacro.org.
The points discussed in section comparisons.velocity also apply to The points discussed in section comparisons.velocity also apply to
the comparison between Cheetah and WebMacro. For further the comparison between Cheetah and WebMacro. For further
differences please refer to differences please refer to
http://jakarta.apache.org/velocity/differences.html. http://jakarta.apache.org/velocity/differences.html.
Cheetah vs. Zope's DTML Cheetah vs. Zope's DTML
----------------------- -----------------------
(comparisons.dtml)
For a basic introduction to DTML, visit For a basic introduction to DTML, visit
http://www.zope.org/Members/michel/ZB/DTML.dtml. http://www.zope.org/Members/michel/ZB/DTML.dtml.
- Cheetah is faster than DTML. - Cheetah is faster than DTML.
- Cheetah does not use HTML-style tags; DTML does. Thus, Cheetah - Cheetah does not use HTML-style tags; DTML does. Thus, Cheetah
tags are visible in rendered HTML output if something goes wrong. tags are visible in rendered HTML output if something goes wrong.
- DTML can only be used with ZOPE for web development; Cheetah can - DTML can only be used with ZOPE for web development; Cheetah can
be used as a standalone tool for any purpose. be used as a standalone tool for any purpose.
skipping to change at line 224 skipping to change at line 214
Some of DTML's features are being ported to Cheetah, such as Some of DTML's features are being ported to Cheetah, such as
{Cheetah.Tools.MondoReport}, which is based on the {<dtml-in>} tag. {Cheetah.Tools.MondoReport}, which is based on the {<dtml-in>} tag.
We are also planning an output filter as flexible as the We are also planning an output filter as flexible as the
{<dtml-var>} formatting options. However, neither of these are {<dtml-var>} formatting options. However, neither of these are
complete yet. complete yet.
Cheetah vs. Zope Page Templates Cheetah vs. Zope Page Templates
------------------------------- -------------------------------
(comparisons.zpt)
For a basic introduction to Zope Page Templates, please visit For a basic introduction to Zope Page Templates, please visit
http://www.zope.org/Documentation/Articles/ZPT2. http://www.zope.org/Documentation/Articles/ZPT2.
Cheetah vs. PHP's Smarty templates Cheetah vs. PHP's Smarty templates
---------------------------------- ----------------------------------
(comparisons.smarty)
PHP (http://www.php.net/) is one of the few scripting languages PHP (http://www.php.net/) is one of the few scripting languages
expressly designed for web servlets. However, it's also a expressly designed for web servlets. However, it's also a
full-fledged programming language with libraries similar to full-fledged programming language with libraries similar to
Python's and Perl's. The syntax and functions are like a cross Python's and Perl's. The syntax and functions are like a cross
between Perl and C plus some original ideas (e.g.; a single array between Perl and C plus some original ideas (e.g.; a single array
type serves as both a list and a dictionary, ``$arr[]="value";`` type serves as both a list and a dictionary, ``$arr[]="value";``
appends to an array). appends to an array).
Smarty (http://smarty.php.net/) is an advanced template engine for Smarty (http://smarty.php.net/) is an advanced template engine for
PHP. ({ Note:} this comparision is based on Smarty's on-line PHP. ({ Note:} this comparision is based on Smarty's on-line
skipping to change at line 394 skipping to change at line 380
truncate (no equivalent, user can write function) truncate (no equivalent, user can write function)
upper ($STRING.upper() ) upper ($STRING.upper() )
wordwrap ('writer' module, or a new module coming in Python 2.3) wordwrap ('writer' module, or a new module coming in Python 2.3)
Some of these modifiers could be added to the super output filter Some of these modifiers could be added to the super output filter
we want to write someday. we want to write someday.
Cheetah vs. PHPLib's Template class Cheetah vs. PHPLib's Template class
----------------------------------- -----------------------------------
(comparisons.php)
PHPLib ((http://phplib.netuse.de/) is a collection of classes for PHPLib ((http://phplib.netuse.de/) is a collection of classes for
various web objects (authentication, shopping cart, sessions, etc), various web objects (authentication, shopping cart, sessions, etc),
but what we're interested in is the {Template} object. It's much but what we're interested in is the {Template} object. It's much
more primitive than Smarty, and was based on an old Perl template more primitive than Smarty, and was based on an old Perl template
class. In fact, one of the precursors to Cheetah was based on it class. In fact, one of the precursors to Cheetah was based on it
too. Differences from Cheetah: too. Differences from Cheetah:
- Templates consist of text with {{placeholders}} in braces. - Templates consist of text with {{placeholders}} in braces.
- Instead of a searchList, there is one flat namespace. Every - Instead of a searchList, there is one flat namespace. Every
skipping to change at line 458 skipping to change at line 442
and arguably hard to read, because all blocks have identical and arguably hard to read, because all blocks have identical
syntax. Unless you choose your block names carefully and put syntax. Unless you choose your block names carefully and put
comments around them, it's hard to tell which blocks are if-blocks comments around them, it's hard to tell which blocks are if-blocks
and which are for-blocks, or what their nesting order is. and which are for-blocks, or what their nesting order is.
- PHPLib templates do not have caching, output filters, etc. - PHPLib templates do not have caching, output filters, etc.
Cheetah vs. PSP, PHP, ASP, JSP, Embperl, etc. Cheetah vs. PSP, PHP, ASP, JSP, Embperl, etc.
--------------------------------------------- ---------------------------------------------
(comparisons.pspEtc)
Webware's PSP Component Webware's PSP Component
- http://webware.sourceforge.net/Webware/PSP/Docs/ - http://webware.sourceforge.net/Webware/PSP/Docs/
Tomcat JSP Information Tomcat JSP Information
- http://jakarta.apache.org/tomcat/index.html - http://jakarta.apache.org/tomcat/index.html
ASP Information at ASP101 ASP Information at ASP101
- http://www.asp101.com/ - http://www.asp101.com/
Embperl Embperl
 End of changes. 9 change blocks. 
18 lines changed or deleted 0 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)