AJ Naidas
AJ Naidas

Reputation: 1424

Using a templating engine like Mustache.js

I am programming cross-platform apps via PhoneGap and I learned that using template engines like Mustache will speed my apps up. I was just wondering why I should use a template engine. How will this help? I don't know the science of it. Can anyone explain?

Upvotes: 1

Views: 1494

Answers (1)

David Wolever
David Wolever

Reputation: 154494

Code which generates HTML tends to become verbose and hard to follow (read, debug, etc).

A templating engine can be thought of a a domain specific language for generating HTML (or, really, any kind of text… But I'm going to guess that you're generating HTML), making it easier to understand the structure and intent of the code.

Upvotes: 2

Related Questions