[Zope3-dev] Re: RFP: menu item ordering
Garrett Smith
garrett at mojave-corp.com
Mon Dec 15 21:37:31 EST 2003
Jim Fulton wrote:
> To me a view/tab (not to be confused w view components, of course)
> is used to display or directly manipulate data about an object.
> Actions are used to "do something" with the object. Undo is more
> about the object's location. We may be undoing operations on subobjects.
> Security grants are similar, imo.
>
> I'll admit that it's not so clear.
The difference between a 'view' and an 'action' is a recurring issue for
us. I've concluded that it really depends on application/use case. My
general criteria are:
- Views are used for the most common operations on to an object.
- Actions are used for less common operations on an object.
Views and actions are interchangeable. The difference is really in how
they're presented to the user. Views use a stronger UI motif (e.g. tabs)
than actions (e.g. toolbar hyper links).
I think it might fall into the 'pornography' standard -- I can't define
it but I know it when I see it :-)
As for ordering menu items, I think the most straight forward way is to
provide a sort_order/sortOrder attribute for menuItem and just leave
gaps for users to insert items. This is a bit inelegant, but it's also
KISS. Developers that want more control can define a new skin and either
redefine the menu items (assuming menu items will eventually be
skinnable) or redefine get_menu for the appropriate objects. I wouldn't
get too fancy with a menu ordering framework.
-- Garrett
More information about the Zope3-dev
mailing list