Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Smarty: love/hate

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Article Discussions
View previous topic :: View next topic  
Author Message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Thu Nov 13, 2003 12:51 am    Post subject: Smarty: love/hate Reply with quote

An article from Reverend Jim.

http://revjim.net/item/3706/
Back to top
View user's profile Send private message Visit poster's website
bimal
Smarty Elite


Joined: 19 Apr 2007
Posts: 423

PostPosted: Thu Jun 18, 2009 4:11 pm    Post subject: Reasons to hate Smarty Reply with quote

I hate Smarty for few/limited reasons:

If I forget to define user permissions, Smarty silenty hides the output. I expect at least, some error messages there. But, probably, it may be due to lack of this support in php. (For example, if modifiers have parsing error, or syntax error, the whole error/out may hide).

It should ask url redirection with PHP (smarty.php.net should redirect to www.smarty.net)

.chm Manual is old (this form is too handy and useful. So, should be updated with the recent changes)

I have to duplicate variables while assigning them to Smarty. But I tend to use assign_by_ref() for larger variables, thinking that it would save time and memroy.

I love Smarty with some controversies below:

Use of default delimiters { and } prevent writing embeded css and javascripts. But it forced me to build a habit of externalizing these resources. I even use unobstrusive javascripts. So, my template looks perfectly clean and easy to modify months later.

$smarty.<get|post|...>.index_name, for example, $smarty.get.id is good to use, without user notice, even if $_GET['id'] does not exist. But it is a very long variable; at least long enough to destroy the visible layout in html editors.

There are a lot of public plugins in Smarty website, used in general purpose. But they are never shipped with Smarty's distribution. However, I can use them copying from the repository.

I can share one installation of Smarty in all my sites!
Details: http://www.phpinsider.com/smarty-forum/viewtopic.php?p=58271

Final thought:
Not using Smarty is a stupid idea.
At least Mohrt answers, if somebody is in trouble, and posted it in Smarty forum.
Back to top
View user's profile Send private message Visit poster's website
douglassdavis
Smarty Junkie


Joined: 21 Jan 2008
Posts: 541

PostPosted: Thu Jun 18, 2009 4:59 pm    Post subject: Reply with quote

I like mostly everything. things i didn't like will be changed in smarty 3.

Some minor annoyances though:

the lack of a current_directory: resource.

the @ operator, which i forget to add a lot because to me it makes sense that it would be the default behavior.
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Thu Jun 18, 2009 6:55 pm    Post subject: Reply with quote

douglassdavis wrote:
I like mostly everything. things i didn't like will be changed in smarty 3.

Some minor annoyances though:

the lack of a current_directory: resource.

the @ operator, which i forget to add a lot because to me it makes sense that it would be the default behavior.


If you are trying Smarty 3, have a look at {$smarty.current_dir}
Back to top
View user's profile Send private message Visit poster's website
bimal
Smarty Elite


Joined: 19 Apr 2007
Posts: 423

PostPosted: Thu Aug 06, 2009 10:39 pm    Post subject: Smarty made me straight sighted - against wordress Reply with quote

Smarty made me clear and straight sighted. After using custom templates building, for several units of works, I am choosy.

I think, I am not blaming very standard tools like Wordpress - so much popular, but so much disturbing. They focused end users, while Smarty focused good developers.

I don't like the way wordpress uses echo("..<html tags>..."); unlike Smarty. This kind of problem persists in zencart and even in Magento's advanced templating. Sometimes, they simply remove the $ sign from the object or variable name and call it a template. This is definitely an extra burden to the php parser.

For a proof, see, wordpress file: wp-login.php in an editor. A genuine Smarty developer would dislike this file. Whether you use Smarty or not is not a big deal, because, all wordpres files work well, and are well tested. Smarty's similar page would look much cleaner.

Below is a list of few resources I have found out useful for the developers connected with Smarty and Wordpress.

http://imthi.com/blog/programming/extending-wordpress-the-actual-power.php

http://verens.com/archives/2004/08/12/integrating-wordpress-with-smarty-continued/

http://ocaoimh.ie/wordpress-smarty-and-multi-blogs/


Last edited by bimal on Thu Aug 06, 2009 10:49 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
Sherry
Smarty n00b


Joined: 12 Dec 2009
Posts: 1

PostPosted: Sat Dec 12, 2009 11:24 am    Post subject: Thanks Reply with quote

I really like this Love/hate forum topic.Thanks for sharing this.Thanks to you.
_________________
SemSim ccna training course - online ccna bootcamp.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    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