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

Sebastian Ware sebastian at urbantalk.se
Thu May 8 03:07:48 EDT 2008

8 maj 2008 kl. 09.00 skrev Lennart Regebro:

> On Thu, May 8, 2008 at 8:53 AM, Sebastian Ware  
> <sebastian at urbantalk.se> wrote:
>> gork.Viewlets are useless (for me who doesn't understand how they  
>> work) due
>> to the current state of their documentation, so this puts us in a  
>> situation
>> where I get to choose between useless and evil... I will have to  
>> dance with
>> the devil for a little longer ;)
> You don't have to use viewlets to replace macros. You can in fact
> often just use small views that return snippets of HTML code, and call
> them. Some macros can indeed be tricky to replace.

I found it very easy to replace my python generated html-snippets with  
macros, so it didn't require me to rewire my brain. It turned out to  
be a very powerful refactoring in terms of reducing the complexity of  
my code!

mvh Sebastian

More information about the Grok-dev mailing list