From Seo Wiki - Search Engine Optimization and Programming Languages

Jump to: navigation, search
Written in C++
Type library or framework

CTPP (or CT++) is a template engine completely written in C++. It has bindings for Perl, PHP and Python languages.

CTPP Features

  • Very high performance
The CTPP library is very fast since it’s written entirely in C++. Unlike templatizers written in interpreted languages, like PERL or PHP, CTPP doesn’t spend time on interpreting the original code or on loading the execution environment. At the same time, CTPP library is faster than the well-known projects like Xalan-C or libxslt because it doesn’t carry additional often superfluous functionality that costs in performance.
  • Flexible syntax of templates
If you are accustomed to the syntax of Smarty, HTML::Template or Text::Template, you can re-configure CTPP to “understand” your old templates. Certainly there will be little adjustments, but typically there will be no problems converting to the new engine.
  • Robustness
Since the areas of control of the programmer and the HTML designer are completely isolated there is no risk of breaking the logic by a wrong layout. Regardless of the HTML design the project will function exactly as developed by the programmer according to the functional specifications.
  • Portability
CTPP library supports equally well Linux, FreeBSD and Solaris on i386, x86-64 and UltraSparc platforms.
  • Support for implementations in the language of your choice
CTPP has C, C++, Perl5, PHP4, and PHP5 interfaces. It means that you can attach this library to any project written in popular programming languages.
  • Unlimited levels of nested cycles and conditions
  • User functions
New functions can be added as needed in order to customize formatting data for the User interface.
  • Open-source software
CTPP is open-source software licensed under the BSD License.

Architecture of CTPP

The MVC paradigm divides an application into three basic entities: a set of Models, a Controller, and the View.

A classic implementation completely isolates these entities from each other. It is assumed that a View doesn’t process any data and only renders a corresponding object model according to the template, that a Controller is only used to determine the list of executed models, and that Models represent entirely abstract data sets and rules that govern the data.

This paradigm allows separating the functions of a web designer, a programmer and a manager. A lot of the code can be reused. In addition a project has a single entry point which facilitates its upgrading and development.

As represented in the diagram below the architecture of the template engine consists of 4 subsystems: a template compiler which converts the text of the page template into bytecode, a virtual machine which executes the bytecode, a caching system for templates, and a library of data processor functions.


External links

Personal tools

Served in 0.526 secs.