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

Christian Klinger cklinger at novareto.de
Thu May 8 03:15:03 EDT 2008


Sebastian Ware schrieb:
> 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

Hi,

at the grokkerdam sprint we talked about pagelets. Which seems to
be a powerful way in replacing macros.

Christian



More information about the Grok-dev mailing list