What is Smarty?Smarty is a php template engine written using PHP, PHP.Net official provides, it provides the separation of logic and external content, simply speaking, the purpose is to use the PHP programmer to separate with the artist,using the programmer to change the logic of the program does not affect the design of the Art page, the art of re-modifying the page does not affect the program logic, which is particularly important in the multi-person collaborative project. Smarty Advantages1.Speed: The program written in Smarty can get the maximum speed improvement, which is relative to other template engine technology. 2.compiled: A program written in Smarty is compiled into a non-template PHP file at runtime, which uses a mix of PHP and HTML to convert the Web request directly into the file the next time the template is accessed. Instead of recompiling the template (in case the source program has not changed)3.caching technology: Smarty chooses a caching technology that caches the HTML files the user eventually sees as a static HTML page, and when the cache property of the Smarty is set to True, The user's Web request is converted directly to this static HTML file during the Cachetime period set by Smarty, which is equivalent to calling a static HTML file. 4.plug-in technology: Smarty can customize plugins. Plugins are actually some of the custom functions. 5. if/can be used in the templateElseIf/Else/endif. The template file can be easily reformatted by using a judgment statement. Not suitable for use in smarty places1.content that needs to be updated in real time. For example, like a stock display, it needs to update the data frequently, and this type of program uses Smarty to slow down the processing of the template. 2.Small Project. Small project because the project is simple and the artist and programmer are in one person's project, using Smarty will lose the advantage of rapid development of PHP.
Reprinted from: Http://baike.baidu.com/link?url=-raeeRXLUi4lHWTlkCEc_3Sqtf4W8QNwUV19lOH1_VZrWTPbk16pvBdnKGHEl6VfmblgcLWK7fsc0hSoMCueY_
What is Smarty?