PHP's Smarty releases version 3.0
groups.google.com
PHP's Smarty releases version 3.0
1–10 of 23 posts
Re: PHP's Smarty releases version 3.0
#2Re: PHP's Smarty releases version 3.0
#3Granted Smarty certainly isn't anyone's poster-child of internet-awesomeness (looking at you, XHP), and given the uprising in 2008 & 2009 against it the project's taken a few hits, but 3.0 really shows that some of PHP's core is learning lessons and that projects of the past don't always have to go the way of the dinosaur.
Could you elaborate? What happened to Smarty during those years?
Re: PHP's Smarty releases version 3.0
#4Granted Smarty certainly isn't anyone's poster-child of internet-awesomeness (looking at you, XHP), and given the uprising in 2008 & 2009 against it the project's taken a few hits, but 3.0 really shows that some of PHP's core is learning lessons and that projects of the past don't always have to go the way of the dinosaur.
given the uprising in 2008 & 2009 against it Could you elaborate? What happened to Smarty during those years?
One of the core arguments against it, I think, was PHP developers suddenly remembering short tags and alternative syntaxes for control structures (if, foreach) that made working with templates in straight PHP just as easy, much more flexible, and shaving a few milliseconds off load times -- it's a sizeable library to load.
Re: PHP's Smarty releases version 3.0
#5Earlier quoted context omitted.
given the uprising in 2008 & 2009 against it Could you elaborate? What happened to Smarty during those years?
Among PHP developers, the idea that "PHP is already a templating language" became pretty much memetic. I use an older version of this engine in my work and never really bought into actively hating Smarty, although I stopped using it for my own projects. One of the core arguments against it, I think, was PHP developers suddenly remembering short tags and alternative syntaxes for control structures (if, foreach) that m…
In Django templates: {{ name }}
Things get a bit better if you write your own "h" function: function h($var) { echo htmlentities($var); }Re: PHP's Smarty releases version 3.0
#6Earlier quoted context omitted.
Among PHP developers, the idea that "PHP is already a templating language" became pretty much memetic. I use an older version of this engine in my work and never really bought into actively hating Smarty, although I stopped using it for my own projects. One of the core arguments against it, I think, was PHP developers suddenly remembering short tags and alternative syntaxes for control structures (if, foreach) that m…
I've always thought that the problem with that viewpoint is that PHP is actually a pretty bad templating language. In Django templates: {{ name }} Things get a bit better if you write your own "h" function: function h($var) { echo htmlentities($var); }
is my preferred method of printing inline, which shortens it up quite a bit.
Re: PHP's Smarty releases version 3.0
#7Earlier quoted context omitted.
Among PHP developers, the idea that "PHP is already a templating language" became pretty much memetic. I use an older version of this engine in my work and never really bought into actively hating Smarty, although I stopped using it for my own projects. One of the core arguments against it, I think, was PHP developers suddenly remembering short tags and alternative syntaxes for control structures (if, foreach) that m…
I've always thought that the problem with that viewpoint is that PHP is actually a pretty bad templating language. In Django templates: {{ name }} Things get a bit better if you write your own "h" function: function h($var) { echo htmlentities($var); }
is a lot better...
We have to have an i18n layer anyway for all output so it ends up being a lot of calls. Use some code gen macros and it's tolerable.
Also, XHP seems pretty rad. It gives me ideas. :)
Re: PHP's Smarty releases version 3.0
#8Earlier quoted context omitted.
Among PHP developers, the idea that "PHP is already a templating language" became pretty much memetic. I use an older version of this engine in my work and never really bought into actively hating Smarty, although I stopped using it for my own projects. One of the core arguments against it, I think, was PHP developers suddenly remembering short tags and alternative syntaxes for control structures (if, foreach) that m…
I've always thought that the problem with that viewpoint is that PHP is actually a pretty bad templating language. In Django templates: {{ name }} Things get a bit better if you write your own "h" function: function h($var) { echo htmlentities($var); }
Re: PHP's Smarty releases version 3.0
#9Earlier quoted context omitted.
I've always thought that the problem with that viewpoint is that PHP is actually a pretty bad templating language. In Django templates: {{ name }} Things get a bit better if you write your own "h" function: function h($var) { echo htmlentities($var); }
The htmlentities issue isn't anything a little upstream logic couldn't fix; just the same as Django's templating engine does. is my preferred method of printing inline, which shortens it up quite a bit.
Which isn't that terrible.The PHP developers don't make this easy though, as "short tags" are officially recommended to be disabled, so to write portable PHP you'd have to do
Every time, which adds visual noise that gets worse the more tags you write.Re: PHP's Smarty releases version 3.0
#10Back when php was relatively new (2002 - 2003), our company hired a few php developers to build several ecommerce solutions. They swore up and down at the time that smarty and pear would get the job done faster and better.
Long story short, after implementing the solution rather quickly we spent more money deleting giant gobs of lame templating code and re-writing the rest of code in very lean php than we did on the original project.
Never again will I use any templating engine on top of a scripting language. It's actually a written core requirement for any new project I contract ("no lame templating engines").
Templating junk can also make it more difficult to get lean standards-compliant html that you need for reliable javascript behavior.
Don't use templating to junk up your code. You've been warned.