Live data from Hacker News

Mustache templating system for PHP

github.com

1–8 of 8 posts

Re: Mustache templating system for PHP

#4

Hrm, I can't say I'm that excited by this; does it have any advantages over Smarty or any of the other template systems out there? Edit: Although I must confess I like the name, new Mustache() indeed!

I think it's more about what it can't do than what it can. The main page claims that the templates are "logic-less". There's some benefit to that from a strictly MVC standpoint.

Re: Mustache templating system for PHP

#5
post #4

Hrm, I can't say I'm that excited by this; does it have any advantages over Smarty or any of the other template systems out there? Edit: Although I must confess I like the name, new Mustache() indeed!

I think it's more about what it can't do than what it can. The main page claims that the templates are "logic-less". There's some benefit to that from a strictly MVC standpoint.

I guess the code's author has an interesting take on logic, because one of the examples contains an if statement:

Hello {{name}} You have just won ${{value}}! {{#in_ca}} Well, ${{taxed_value}}, after taxes. {{/in_ca}}

Admittedly, it's a bit obfuscated but whatever way you look at it, it's still logic in the view file.

Re: Mustache templating system for PHP

#7
Yet another solution for a problem that doesn't exist...

All these do is make the PHP template SMALLER. It's still JUST as complicated. {{#in_ca}} is just as complicated as , it's just smaller. Passing this off to someone who can only do html, it might make it slightly easier for them to read, but honestly if they can't figure out how to stay away from PHP tags (or understand the minimal amount they will need to to do front end work) they shouldn't even be doing front end.

I can't imagine investing the time to learn or switch unless it can do something pretty spectacular, missing something?

Oh, and yeah cool name. Ironic hipster etc. yay.