[Grok-dev] Re: BrowserView versus BrowserPage

Kevin Smith kevin at mcweekly.com
Wed Jun 27 12:09:11 EDT 2007


It also seems like every other week, someone on zope-users is asking 
what the difference
between BrowserPage and BrowserView is. If we could make a clearer 
seperation,
that would be beneficial.

Jan-Wijbrand Kolman wrote:
> On 6/27/07, Martijn Faassen <faassen at startifact.com> wrote:
>> Jan-Wijbrand Kolman wrote:
>> > I guess this topic has been discussed before, but I suddenly wonder:
>> >
>> > Why does grok "only" provide for a "BrowserPage" type of view (via
>> > grok.View) and not also a BrowserView type of view? I can imagine
>> > having had both a grok.View() implementing IBrowserView and a
>> > grok.Page() implementing IBrowserPage.
>>
>> You say 'grok.View()' and 'grok.Page()' with the '()' there, but these
>> would be base classes, right?
>
> Yes. My notation is confusing.
>
>> Yes, Philipp brought this up in the past. I see the point. Making the
>> change would require quite a lot of changes in documentation and
>> people's code, however. Additionally, we use grok.View for things that
>> aren't really pages such as page fragments and file downloads - the word
>> 'Page' may sit a bit less well.
>>
>> I'm not against trying to move forward with this, but we'd need a pretty
>> good plan on how to accomplish this first. We need an analysis of what
>> grok.View is going to be for exactly. I'm a bit worried we'll give up
>> such a general name as 'View' for use cases that occur infrequently.
>> Suggestions would be very welcome.
>
> I see the implications. I think if we would have started out with
> grok.Page for what now is grok.View, it would have sat quite well. But
> well, we cannot change that now anymore,  I certainly agree there.
>
> The first thoughts I had just before bringing up this issue, was to
> suggest something like grok.SimpleView or grok.BaseView or maybe even
> grok.NonBrowserView. The general case will not change then.
>
> Also, it is certainly possible of course to just register a
> multiadapter providing IBrowserView for the case you need it.
>
>
> kind regard,
> jw
>


More information about the Grok-dev mailing list