[Grok-dev] How are viewlets better than macros?

Lennart Regebro regebro at gmail.com
Wed May 7 07:31:47 EDT 2008


On Mon, May 5, 2008 at 5:54 PM, Sebastian Ware <sebastian at urbantalk.se> wrote:
> On the Grok site viewlets are explained to have "...basically the same
> purpose as a macro, but is more clean, powerful and flexible." Only the text
> fails to explain how. The example shown doesn't show much of this power or
> flexibility as far as I can tell. Where is the real benefit? What am I
> missing?

Macros rely on global variables, but there is no way to see which
variables they rely on, except reading the code very carefully. Macros
are language dependent. Macros are difficult to override if you have
more than one macro in a template.

In short: Macros are evil. Do not use.


More information about the Grok-dev mailing list