Yesterday I was introduced to Hogan.js the templating library from twitter. It was new to me so I had a look at the documentation and I think I know when I would use it.
And when I would not.
If I was to work on a Symfony or Silex I would try out twig.js instead as it features the same template syntax as the name giving PHP templating engine feature in the before mentioned frameworks.
So what can I read from the Hogan.js documentation?
It is of similar size as ICanHaz.js (about 2.3-2.5kb) and it uses the mustache syntax as well. Judged from that alone they seem almost identical.
But they’re not.
This is perfectly fine of course if you’re working with node.js or similar anyway but I wouldn’t recommend it for use with other languages like PHP, Ruby or Java as it would increase your complexity a lot and you would probably have to introduce a lot of business logic duplication.