Search code examples
phphandlebars.jsmustache

handlebars with Php, IOS, Android


I'm currently looking for a template engine. For the moment I've an idea on two HandleBars and Mustache.

Mustache is a basic logic-less with many language implementation.

HandleBars are complied Mustache template. But only in JS.

I work on web app and mobile app. I use PHP and IOS/Android, I've see Mustache have implementation of each of them.

I know Handlebars is better than mustache on compilation. But in my case, i should use HandleBars or Mustache?

Or HandleBars With mustache?

I'm really lost on it...

Thank's Reading!


Solution

  • If your only reason for using Handlebars is compilation, there are compiling implementations of Mustache:

    If you intend to use the Handlebars extensions to the Mustache syntax, there is a Handlebars implementation in PHP as well, and it seems to be pretty solid, but note that it is much slower than Mustache.php. I don't know of a Handlebars implementation in Objective-C though.

    I personally went the Hogan.js + Mustache.php route, but then I'm the author of Mustache.php so I'm probably biased :)