Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
PHP Template Engines on Slashdot

 
Post new topic   Reply to topic    Smarty Forum Index -> Article Discussions
View previous topic :: View next topic  
Author Message
boots
Administrator


Joined: 16 Apr 2003
Posts: 5613
Location: Toronto, Canada

PostPosted: Wed Mar 31, 2004 10:01 pm    Post subject: PHP Template Engines on Slashdot Reply with quote

Thought some might be interested: Slashdot is running a piece on PHP Template Engines and of course, Smarty is discussed, touted, flamed, praised and dissected.

Whaddya know, I even have mod points today Smile
Back to top
View user's profile Send private message
Kai31410
Smarty n00b


Joined: 12 Jun 2009
Posts: 1

PostPosted: Fri Jun 12, 2009 8:04 am    Post subject: Reply with quote

Smarty PHP template engine...
Smarty project is a template engine for PHP. Many other template engines for PHP provide basic variable substitution and dynamic block functionality.

Smarty takes a step further to be a "smart" template engine, adding features such as configuration files, template functions, and variable modifiers, and making all of this functionality as easy as possible to use for both programmers and template designers.

Smarty also converts the templates into PHP scripts, eliminating the need to parse the templates on every invocation. This makes Smarty extremely scalable and managable for large application needs.

Here are some key features of "Smarty PHP template engine":

Caching: Smarty provides fine-grained caching features for caching all or parts of a rendered web page, or leaving parts uncached. Programmers can register template functions as cacheable or non-cachable, group cached pages into logical units for easier management, etc.
Configuration Files: Smarty can assign variables pulled from configuration files. Template designers can maintain values common to several templates in one location without intervention from the programmer, and config variables can easily be shared between the programming and presentation portions of the application.
Security: Templates do not contain PHP code. Therefore, a template designer is not unleashed with the full power of PHP, but only the subset of functionality made available to them from the programmer (application code.)
Easy to Use and Maintain: Web page designers are not dealing with PHP code syntax, but instead an easy-to-use templating syntax not much different than plain HTML. The templates are a very close representation of the final output, dramatically shortening the design cycle.
Variable Modifiers: The content of assigned variables can easily be adjusted at display-time with modifiers, such as displaying in all upper-case, html-escaped, formatting dates, truncating text blocks, adding spaces between characters, etc. Again, this is accomplished with no intervention from the programmer.
Template Functions: Many functions are available to the template designer to handle tasks such as generating HTML code segments (dropdowns, tables, pop-ups, etc.), displaying content from other templates in-line, looping over arrays of content, formatting text for e-mail output, cycling though colors, etc.
Filters: The programmer has complete control of template output and compiled template content with pre-filters, post-filters and output-filters.
Resources: Templates can be pulled from any number of sources by creating new resource handlers, then using them in the templates.
Plugins: Almost every aspect of Smarty is controlled through the use of plugins. They are generally as easy as dropping them into the plugin directory and then mentioning them in the template or using them in the application code. Many user-community contributions are also available. (See the plugins section of the forum and wiki.)
Add-ons: Many user-community contributed Add-ons are available such as Pagination, Form Validation, Drop Down Menus, Calander Date Pickers, etc. These tools help speed up the development cycle, there is no need to re-invent the wheel or debug code that is already stable and ready for deployment. (see the Add-ons section of the forum and wiki.)
Debugging: Smarty comes with a built-in debugging console so the template designer can see all of the assigned variables and the programmer can investigate template rendering speeds.
Compiling: Smarty compiles templates into PHP code behind the scenes, eliminating run-time parsing of templates.
Performance: Smarty performs extremely well, despite its vast feature set. Most of Smarty's capabilities lie in plugins that are loaded on-demand. Smarty comes with numerous presentation tools, minimizing your application code and resulting in quicker, less error-prone application development/deployment. Smarty templates get compiled to PHP files internally (once), eliminating costly template file scans and leveraging the speed of PHP op-code accelerators.
________
Back to top
View user's profile Send private message
bimal
Smarty Elite


Joined: 19 Apr 2007
Posts: 420
Location: Kathmandu, Nepal

PostPosted: Wed Jun 17, 2009 5:40 pm    Post subject: Comparision list Reply with quote

FYI, Please look at http://en.wikipedia.org/wiki/Template_engine_(web)#Comparison and note the comparision. Smarty looks to be great out of the competetion there.
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Article Discussions All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP