[Grok-dev] menus

Christian Theune ct at gocept.com
Thu Apr 26 00:58:07 EDT 2007


Am Montag, den 23.04.2007, 18:12 +0200 schrieb Martijn Faassen:
> This is just to start off some investigation of menus, as I'm starting 
> to feel the need for them.


> Zope 3 has a menu infrastructure I've used though never fully 
> understood. I've been trying to digest this text about it:
> http://svn.zope.org/Zope3/trunk/src/zope/app/publisher/browser/menu.txt?rev=67630
> but I'm still trying to understand it.
> Hopefully we can reuse some of the infrastructure described there and 
> translate it into Grok terms. It needs some thought thrown at it first 
> though, as the patterns aren't entirely clear to me yet.
> Comments? Ideas?

I already took some time to investigate the patterns that the current
menu infrastructure tries to solve. (By the way, let me quote Jim: "Any
specific behaviour of the current menu implementation is accidental.
Menus are only considered as a pattern.")

What I was noticing is that there are two ways of approaching what we
call menus:

a) You are developing an application that happens to be web-based, but,
still, you're developing an application.

b) You are developing a web site that happens to have behaviour and some
application-like stuff in there.

In the first case, my approach to menus is more like the classic GUI
menu style: You have a menu with items and selecting one of those might
trigger an action or switch to a different view. In this case I think it
would be convenient to create menus by pointing off to various views and
say "Hey, put *this* view into *this* menu (take the default title or
let me specify one) (and guard it with this permission)."

In the second case, my approach to menus is more like building up the
navigational structure of a web site. This has two majore differences
that I found immediately: you can talk about "location", meaning your
user "is" somewhere and want to tell the user where he is in those terms
(e.g. bread crumbs or the path) this typically includes highlighting the
currently selected menu item. The second issue is that you want to point
users to arbitrary, maybe content/data dependent, locations to anywhere
in your site, not necessarily thinking in terms of a (Zope 3/grok) view
but in terms of your site's structure.

The current Zope 3 menu implementation tries to merge those two
approaches making them hard to understand, especially as I feel that the
authores were trying to solve different goals. I'm in a train right now
and can't remember whether the doc you quote includes motivations or
not, but I think it doesn't.

To conclude, I'd love to hear the goal/motivation that you have for


gocept gmbh & co. kg - forsterstraße 29 - 06112 halle/saale - germany
www.gocept.com - ct at gocept.com - phone +49 345 122 9889 7 -
fax +49 345 122 9889 1 - zope and plone consulting and development
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : http://mail.zope.org/pipermail/grok-dev/attachments/20070426/c4371b40/attachment.bin

More information about the Grok-dev mailing list