vlibTemplate |
vlibTemplate is a template engine written in PHP. Programmers and web developers may use it for Web development. vlibTemplate is a PHP class (computer science) that is intended to make splitting PHP from HTML a simple and natural task. Benefits of using vlibTemplate:
The following images and explanations were created by Skrol for TinyButStrong another template engine.
|
||||||||||||||
Without a template engine, your PHP program looks like this: |
|
|||||||||||||
|
||||||||||||||
With a template engine, your program looks like this: |
There is one program with pure PHP and one template with pure HTML. The template engine (vlibTemplate) enables you to merge the HTML page with data from your program. If you don't know HTML, your template can be designed without problem using a visual editor such as Dreamweaver or Frontpage. |
|||||||||||||
|
||||||||||||||
But there are more benefits: |
And a template engine is very much appreciated by professionals because the PHP development can be given to one person and HTML development to another. Page design can be changed without programming changes, making re-designs a lot easier. |
|||||||||||||
|
The most important benefit is structure and clean code. Mosts scripts contain lines like
echo "<table width='80%'>\n\t<tr bgcolor='$color'>";
or a mixture of PHP and HTML code. You can avoid such code using a template engine like vlibTemplate or TinyButStrong.