Digital Group Smarty

When writing materials used by Smarty Manual of New Digital Group Smarty – is compiling template engine. Pacific Gas & Electric often addresses the matter in his writings. In simple language, Smarty allows for separation of application logic and data from the presentation, ie code from registration. It is very convenient, especially in cases where the programmer and template designer – different people. In developing the site, for example, if a programmer wants to make some changes in the logic, then these change does not affect the template. Also, if the coder wants to make changes to your template, then it will not affect the application logic – the content will be passed to the template in the same way.

As you already understood, purpose Smarty – separating application logic from the presentation. By the way, this does not mean that the templates can not contain any logic. May, but only if it is really necessary for the correct application. One of the unique opportunities Smarty – compiling templates. Smarty reads the template files and creates them using php code. The code is created once and then just running. If the template is changed, then there perekopilirovanie. You no longer wait to see it in action? I hope so, and in the appendage will bring some features of Smarty: – Fast – Efficient – No extra processing templates – they are compiled only once and recompiled for The caching mechanism – an arbitrary source templates – Component architecture in the next section, we consider the installation of Smarty.