Earlier quoted context omitted.
I hate PHP and don't even want to talk about it but I did skim through the docs for Smarty. The rationale is that PHP sucks as a template engine, so why not create a new one and use PHP for the model-controller/whatever. Maybe that seems perverse, but you have stuff like Node.js in existence that oddly enough solves some problems quite nicely, so maybe it works for PHP guys. I'll never see the appeal compared to othe…
Completely unrelated: I'm not easily offended. Right now I'm not offended at all, in case anyone would interpet this post to mean so. I'm all OK. Really. But that said: I'm severely puzzled about your choice of HN username.
The Lesser Known Contributors Who Are Trying To Make PHP Good Again
31–40 of 53 posts
Re: The Lesser Known Contributors Who Are Trying To Make PHP Good Again
#32Everyone probably knows this, but PHP's Smarty template engine ( http://www.smarty.net ) is really awesome. I've yet to see a better one in any language - it has things like Unix-like pipe chaining of filters, user defined functions, and intelligent caching built in. I reduced the number of lines in one codebase I worked on by 70% through use of Smarty.
I work on a legacy code base with pretty much everything in SMARTY templates (including CSS and JS files!) and it's really aweful. It may not be SMARTY's fault, but most of what's going on could be just as easily done with PHP code than with SMARTY tags, include variable insertion ( ) and control logic (if ($var) : // endif;). Now we've actually moved everything to the client side using Ember and Handlebars templates…
> include variable insertion ()
No disable your short tags and any nontrivial template will become ugly as hell, unless you are on php 5.4+ which not many are.Re: The Lesser Known Contributors Who Are Trying To Make PHP Good Again
#33Everyone probably knows this, but PHP's Smarty template engine ( http://www.smarty.net ) is really awesome. I've yet to see a better one in any language - it has things like Unix-like pipe chaining of filters, user defined functions, and intelligent caching built in. I reduced the number of lines in one codebase I worked on by 70% through use of Smarty.
And seriously, check Symfony 2 out.
Re: The Lesser Known Contributors Who Are Trying To Make PHP Good Again
#34While I've bashed PHP as much next guy, these are the facts: -Take away PHP and the internet would break. The vast majority of websites are either written in PHP or have a PHP back end. -The LAMP/LNMP stack is by far one of the most deployed web server configuration. -PHP is extremely well documented and it's been around so long that it's easy to find solutions on the web. PHP is the Model T of web languages: people…
PHP is extremely well documented and it's been around so long that it's easy to find solutions on the web. I can agree that PHP is documented. That it is well documented however is something I'm very much willing to argue against. PHP has string-operations documented to be "binary-safe" without ever saying what that is supposed to mean, if it's good (it's not), if it's bad (yes, yes, yes it is) and why you should hav…
Re: The Lesser Known Contributors Who Are Trying To Make PHP Good Again
#35Everyone probably knows this, but PHP's Smarty template engine ( http://www.smarty.net ) is really awesome. I've yet to see a better one in any language - it has things like Unix-like pipe chaining of filters, user defined functions, and intelligent caching built in. I reduced the number of lines in one codebase I worked on by 70% through use of Smarty.
Re: The Lesser Known Contributors Who Are Trying To Make PHP Good Again
#36Author says, "the developers of these new tools deserve some serious recognition for the work they are doing" and then totally fails to mention them!
So now we've again been suckered into the 'PHP good' vs 'PHP bad' non-debate.
Re: The Lesser Known Contributors Who Are Trying To Make PHP Good Again
#37While I've bashed PHP as much next guy, these are the facts: -Take away PHP and the internet would break. The vast majority of websites are either written in PHP or have a PHP back end. -The LAMP/LNMP stack is by far one of the most deployed web server configuration. -PHP is extremely well documented and it's been around so long that it's easy to find solutions on the web. PHP is the Model T of web languages: people…
PHP is extremely well documented and it's been around so long that it's easy to find solutions on the web. I can agree that PHP is documented. That it is well documented however is something I'm very much willing to argue against. PHP has string-operations documented to be "binary-safe" without ever saying what that is supposed to mean, if it's good (it's not), if it's bad (yes, yes, yes it is) and why you should hav…
I'm used to dealing with perl 5, which has quirks of it's own, but at least their documented (a little too much sometimes). I learn a lot about many things by reading the perl docs.
Here's "Gory details of parsing quoted constructs" (no that I have read it..)
http://perldoc.perl.org/perlop.html#Gory-details-of-parsing-...
Re: The Lesser Known Contributors Who Are Trying To Make PHP Good Again
#38Re: The Lesser Known Contributors Who Are Trying To Make PHP Good Again
#39Re: The Lesser Known Contributors Who Are Trying To Make PHP Good Again
#40Everyone probably knows this, but PHP's Smarty template engine ( http://www.smarty.net ) is really awesome. I've yet to see a better one in any language - it has things like Unix-like pipe chaining of filters, user defined functions, and intelligent caching built in. I reduced the number of lines in one codebase I worked on by 70% through use of Smarty.
PHP is itself a template engine. Bolting a template engine on top of that makes no sense whatsoever.
Though I don't like having to use the Smarty psuedo-language, I do like the organization of code that it provides.