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

Martijn Faassen faassen at startifact.com
Fri May 9 08:58:23 EDT 2008

Lennart Regebro wrote:
> On Thu, May 8, 2008 at 11:50 AM, Martijn Faassen <faassen at startifact.com> wrote:
>> I don't know where that term came from, but it's basically the layout around
>> the main content bit. With pagelets, you can just specify the main content
>> bit and have a layout thingy wrap itself around it. Quite similar to the
>> pipelines story we've been discussing in some ways.
> I find the term very strange, as it sounds like it is some sort of
> lightweight page, which in fact, it is not.
> It's a workable solution, but I wonder firstly why pagelets are
> needed? Can't the content rendering be done by a viewletmanager that
> renders the content?

A 'pagelet' is a page that doesn't render its own layout, so I guess you 
could see it as a light-weight page.

> Secondly, how does this work with existing non-pagelet views? I'm
> guessing the design can be implemented by letting the layout template
> simply render the normal page standard-macro? You wouldn't want to
> have to implement the design twice. :)

I agree that we should make this work with non-pagelet views. We should 
simply tell people not to include the layout there anymore, and that 
they can now use this other way to add layout. This is a nice 
incremental learning step.

Christian Theune argued to build this story on top of the pagelet story 
that's already there and in use, though. And that it ought to be 
compatible, preferably. I think those are good points. So, this will 
require us to expand the way our views work to turn them into whatever a 
pagelet is. We can then use the same mechanism as pagelets uses to get a 
layout around something, but of course we need to grokkify the way you 
declare layouts.



More information about the Grok-dev mailing list