CTPP (or CT++) is a
template engine completely written in
C++
C++ (pronounced "C plus plus") is a high-level general-purpose programming language created by Danish computer scientist Bjarne Stroustrup as an extension of the C programming language, or "C with Classes". The language has expanded significa ...
. It has bindings for
Perl
Perl is a family of two High-level programming language, high-level, General-purpose programming language, general-purpose, Interpreter (computing), interpreted, dynamic programming languages. "Perl" refers to Perl 5, but from 2000 to 2019 it ...
,
PHP
PHP is a General-purpose programming language, general-purpose scripting language geared toward web development. It was originally created by Danish-Canadian programmer Rasmus Lerdorf in 1993 and released in 1995. The PHP reference implementati ...
and
Python languages.
Features
* Performance
* Flexible syntax of templates
* Robustness
* Portability
* Support for implementations in the language of your choice
* Unlimited levels of nested cycles and conditions
* User functions
Architecture
The
MVC
MVC may refer to:
Science and technology
* Maximum-value composite procedure, an imaging procedure
* Multivariable calculus, a concept in mathematics
* Multivariable control, a concept in process engineering
* Mechanical vapor compression, a desal ...
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 does not 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
* (BROKEN)
Version cached in Web Archive
* {{Github, https://github.com/moneymanagerex/ctpp
C++ libraries
Perl modules
PHP
Scripting languages
Template engines