Smarty in PHP
Smarty is a template engine in PHP mostly used by all the web developers. It provides a manageable way to separate application logic and content from its presentation. This is mostly used if the application programmer and the template designer are different persons.
The design goal of Smarty was the separation of business logic and presentation logic.
Smarty has the unique feature of template compiling i.e., (Smarty reads the template files and creates PHP scripts from them). All the template can take full advantage of PHP compiler and cache solutions such as eAccelerator, ionCube etc,
Some of the Smarty’s features:
- Not have template parsing overhead, only compiles one time.
- It is smart about recompiling only the template files that have altered.
- You can easily create your own functions and variable modifiers, so the template language is very extensible.
- The {if}..{elseif}..{else}..{/if} constructs are passed to the PHP parser, so the {if…} expression syntax can be as easy or as complex an estimation as you like.
- It is potential to embed PHP code in our template files.
It support built-in cache.
- It provides custom cache handling functions.
No comments yet.