Understanding template engines