From Wikipedia, the free encyclopedia
Jump to: navigation, search
WikiProject Computing (Rated C-class, Low-importance)
WikiProject icon This article is within the scope of WikiProject Computing, a collaborative effort to improve the coverage of computers, computing, and information technology on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
C-Class article C  This article has been rated as C-Class on the project's quality scale.
 Low  This article has been rated as Low-importance on the project's importance scale.
WikiProject Internet (Rated C-class, Low-importance)
WikiProject icon This article is within the scope of WikiProject Internet, a collaborative effort to improve the coverage of the Internet on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
C-Class article C  This article has been rated as C-Class on the project's quality scale.
 Low  This article has been rated as Low-importance on the project's importance scale.

Smarty lacking features ?[edit]

Smarty lacks some features like date formating (strftime) and support for MySQL or other RDBMS. I would use vLIB or TBS (TinyButStrong). Just my two cents. --ClausVB 20:11, 3 November 2005 (UTC)

If you're so sure about this, please edit the article directly. Getting a username would also be a good idea. Rufous 17:06, 11 January 2006 (UTC)

The cleanup tag[edit]

I don't get it: who placed a cleanup tag on the article and why? There's no discussion on the talk page about this.

I would remove it myself, but I'm new to wiki and thus afraid to blunder. Kaarjuus 21:03, 25 January 2006 (UTC)

Removed the cleanup tag. Kaarjuus 23:22, 1 February 2006 (UTC)

take out "a lot"[edit]

in the opening. Its not good grammar.

You know, it is the Wikipedia, where you can not only read articles, but edit them, too...  ;) —Preceding unsigned comment added by TonyV (talkcontribs) 13:57, 20 October 2007 (UTC)

why does the "see also" point to unrelated framework applications?[edit]

There is no mention in any of the items as to their relation to Smarty; further, in all cases, each of the items listed do substantially different things than Smarty -- even though some of them contain Smarty as a component.

Smarty template Editors[edit]

What do you think about a part concerning the Smarty editors? I have written one: Smarty-Mode. Deboutv 14:10, 21 November 2006 (UTC)


I propose re-writing the second and third paragraphs to look like this:

Tags are directives for Smarty that are enclosed by delimiters. These directives can be variables, denoted by a dollar sign ($), functions, or logical or control flow statements. Smarty allows PHP programmers to define functions that can be accessed using Smarty tags.

This compartmentalization allows the presentation of a web page to change separately from the back-end, thus allowing applications to be developed in a more organized fashion. Using this development model, designers are hidden from the back-end coding and PHP programmers are hidden from the presentation coding. —The preceding unsigned comment was added by Pkrecker (talkcontribs) 22:40, 7 December 2006 (UTC).


I wonder whether it would be worthwhile mentioning some of the criticisms of Smarty. Namely that it's resource hungry for what most people use it for. —The preceding unsigned comment was added by Streety06 (talkcontribs) 22:05, 29 March 2007 (UTC).

I would think thats reasonable, as long as you also put the counter-argument of the compilation step only happening once, when a template-file has changed. A link to PHP#Source_code_Encoders.2C_Optimizers_and_Accelerators would also be useful as a mention of best-practices for PHP in general which also speeds the general use. AlisterBulman
-rant starts here- And I think that criticism does not need criticism. Smarty templates aren't any type of business solution. Embedding another "language" into templates and the additional php code is just a really huge waste of time. Is this a big difference for the user/!programmer: '<?php echo $var ?>' vs '{var}' ? -rant ends here- 15:06, 1 September 2007 (UTC)
Do you have any citations of this? I'm not disagreeing, but if an application takes up so much as one extra CPU cycle, there will always be someone saying that it is "resource hungry." That's an extremely vague criticism. Do you have an article to point to about some project that failed because of it? Or some site that compares pages rendered using Smarty vs. pages rendered some other templating system or by raw php? I'm sorry, but just posting a criticism that says "it's resource hungry for what most people use it for" seems extremely subjective to me, and without something to back up the claim, sounds like it's just someone who happens to not like it. --TonyV 14:00, 20 October 2007 (UTC)
Smarty is almost the least resource-hungry way that such a feature could possibly be implemented. Because everything is compiled into regular PHP, running a template is as simple as including a PHP file. The only resource-heavy part of it is the compiling process itself, which is not done each time a page is requested. mmj (talk) 04:49, 24 February 2009 (UTC)

The use of {php} tags within templates are not normally needed and not recommended[1]. I don't believe it is good practice to promote them in the article when better, and safer options exist, like plug-in functions. AlisterBulman

The existence of the {php} function in Smarty itself could be seen as a criticism. If we're creating a criticism section maybe we could add that - and cite some references. mmj (talk) 04:47, 24 February 2009 (UTC)

For HTML output, Smarty requires all plain text to be escaped using the |escape modifier, and omitting this can leave an application open to Cross-site scripting attacks. Smarty has drawn criticism for its inability to reverse this and escape by default, leaving it up to the template author to be responsible for guarding against XSS attack vectors. I'll see if I can find specific citations. mmj (talk) 04:41, 24 February 2009 (UTC)

Ok here are some things that could be cited: [2] and [3]. Problem is, these are both kind of conversational. But it is hard that a feature is 'generally' criticised by the public. mmj (talk) 04:47, 24 February 2009 (UTC)

This section needs re-evauating. For a start, see [5] in the Notes and references the link end up on what I would consider to be a competing website where criticism is weak at best. Statement like Smarty is an interpreted language inside another interpreted language "php" so your files (templates) are parsed two times is just misleading. Smarty compiles {TAGS} into actual <?php ?> code and the result of that is placed into a cache folder. So the second and subsquence calls to make use of that template file involves no template compilation taking place as it executes the pure PHP version held in the cache folder. In fact, if you are sure that every template files are in the cache folder then you do not even need to upload the template (.tpl) files on the production system making the whole criticism pointless. So the overhead isn't as bad as it makes out.

The "poor performance" is an absolute myth. I have benchmarked an in-house (non-optimized) Smarty based CMS with several "lightweight" CMS's (Drupal, Ionize, Joomla) and the Smarty one has clearly noutperformed the each of the three in every respect (render time, cpu, memory). I did this because some optimization was needed and we sought for "light" alternatives. It was not actually "apples-to-apples": Each competitor had simple static "hello" page with one DB call whereas the Smarty one had several database calls and a couple of modules. It is MUCH more about programming in general. Smarty based templates produces VERY small bytecode (you can see it from APC cache, for instance) and it is really fast. Go test it. — Preceding unsigned comment added by (talk) 11:48, 12 June 2012 (UTC)

Is it only for dummies??[edit]

I have been reading on CMS and Template management for a reasonable time. Here I found that there is no real information is given for a novice or someone who wants to use it on its personal website.

I found some missing sections as well. Such as Feature List, History, Usability, Compatibility, Critique, and most important some links to articles which can explain some one 'What to use?', 'Why to use?', and 'How to find resources?' If some one has the information I purely encourage the person to edit this page. Anyone having a suggestion or criticism please raise here.[sorry for not so good English] Dkcreatto 22:23, 14 August 2007 (UTC)

Removed commercial link[edit]

I removed the link to the NuSphere page on configuring PhpED for use with Smarty. It's not about Smarty itself, but about configuring a third-party commercial IDE for use with Smarty. As such, I don't think it's appropriate to have in the article, as it could be viewed as advertising a product. --TonyV 13:54, 20 October 2007 (UTC)

Which two files are they[edit]

It is not apparent what files, nor their purpose, are being referred to in the phrase "Since Smarty separates PHP from HTML, you have two files:" -- SEWilco (talk) 17:00, 10 December 2007 (UTC)

I improved the wording - hopefully it is clearer now. mmj (talk) 04:52, 24 February 2009 (UTC)

I came to Talk to make the same comment, so as of this wrting it's still not clear. Perhaps add the file name above the respective code section. — Preceding unsigned comment added by (talk) 18:38, 5 August 2012 (UTC)

Why the link to to page Inner-platform effect?[edit]

I think there should be an explanation or a removal of the link. Thanks! — Preceding unsigned comment added by Marclaporte (talkcontribs) 22:32, 16 July 2013 (UTC)

I've removed the link. It seems like covert criticism of the tool. Critiquing the library should be done in the article, not passive-aggressively in the links section. --Sj. Hemminga (talk) 21:57, 27 November 2013 (UTC)