Grails: Templates vs TagLibs.

Viewed 5882

In Grails, there are two mechanisms for modularity in the view layers: Template and TagLib.

While I am writing my own Grails app, I am often facing the same question when I need to write an UI component: do I need to use a template or a TagLib?

After searching the web, I didn't find a lot of best practices or rules of thumb concerning this design decision, so can you help me and tell me:

  1. What is the main difference between the two mechanisms?
  2. In which scenarios, do you use a TagLib instead of a Template (and vice-versa) ?
2 Answers
Related