Table of Contents
1. Preface
2. Installation
Next »

1. Preface

The concept to separate presentation (XHTML code) and logic (scripts) layers has a long story. We can mix those two parts, use PHP itself to separate them or to manipulate the output document with DOM. There is also one more solution - template engines. The PHP script is accompanied by an additional file with a template which describes, how to display the data. A template engine is a system that puts the data generated by the script in the templates, thus generating the complete output for the user. The template does not have to be written in PHP, too. We can use a separate language there, because PHP code is too complex and too long for such tasks, even if it was being developed to deal with it. The new language uses very short and intuitive constructs that hide all the algorithmic issues away from the template designer, no matter whether he is familiar with programming or not. Moreover, the language can allow us to do things in the way that is impossible to achieve in PHP because of its structure.

Open Power Template

Open Power Template 2 is a successor of popular template engine for PHP5. We have redesigned it from scratch, because we wanted to continue our ideas and implement new functionality that was impossible to achieve on the old engine. The main source of new features and improvements are the users. Of course, we know that the code rewriting breaks the backward compatibility, but on the other hand we can now fix everything that worked or looked poorly. But in fact, the main project philosophy, goals and solutions are still present.

OPT can be described in two points: performance and the KISS rule (Keep It Small and Simple). We try to keep the simple operations simple and intuitive and to simplify more complex things. We always analyze existing projects and develop solutions to solve encountered problems easily. During the coding, we pay attention on the performance, optimizing the code as much as possible. OPT also means more than one way to work. We think that there is no the best model for all the tasks and we rather offer a set of tools which you can use, depending on your demands.

Open Power Template is a part of "Open Power Libs" project which is a set of supporting libraries for your scripts and frameworks. In order to work, it requires the core OPL files that are included in every OPT release.

Features

Some of the features offered by the new version:

The feature list seems to be quite long, but everything is on the right place. All you have to do is to learn and use a couple of simple rules, and the rest is simple. The library is available under the terms of new BSD license.

Documentation

This document concerns the Open Power Template library only. It also contains the basic information on the OPL core, but more details can be found in its own documentation.

1. Preface
Table of Contents
Next »
2. Installation