[Seaside] Bread crumbs

Avi Bryant avi at beta4.com
Mon Aug 25 14:24:49 CEST 2003


On Mon, 25 Aug 2003, Julian Fitzell wrote:

> These are just some of the questions swirling in my mind.  Bread crumbs
> work really well for say yahoo or that kind of hierarchical information
> system (and maybe that's all you're talking about doing) but, while I
> think they'd be pretty useful for other applications, I can't quite
> formulate how they'd work or how we should implement them.

Agreed - you really need to be more specific about what the bread crumb
trail is modelling before you talk about how to implement it.

There is one type of breadcrumb already in Seaside, which is the one used
by the inspector.  In a recent enough version, if you click Explore in the
toolbar, and then move to the Inspect tab, and start clicking on the links
representing the instance variables of the objects, you will see a
breadcrumb trail appear tracing yours steps.

This is a very simple breadcrumb implementation, provided by a component
that I think is called WAPath.  It maintains a list of name/object pairs.
You can always ask it for the current object (which the inspector does so
that it knows what to display).  You can also set the current object and
name, which will get added to the end of the path (the inspector does this
when you click on a link).  When the user clicks an item in the breadcrumb
trail, the current object will change.

This approach works well for navigating static data structures (like the
Yahoo hierarchy Julian mentioned, or a Wiki), but doesn't make much sense
for workflow.  Work flow has much more interesting problems.  One way
you can think about modelling it is that you want to be able to create
links which, when clicked on, act as if the user had backtracked to a
particular earlier page and hit reload - so the breadcrumb trail is a more
controlled form of back button.

One way to implement this would be for the session to hand out "bookmark"
objects, which, when sent #value, would simulate the user backtracking to
the point at which they were captured. You could capture these bookmarks
at every step, and build up a trail of links which would activate the
appropiate bookmark when clicked on, and the user would be whisked back to
the right page exactly as if they had clicked the back button to get
there.

This is potentially even more confusing to developers than the use of the
back button - these "bookmark" objects are essentially raw continuations -
but maybe if I don't point that out they won't be scary...

What do you guys think?




More information about the Seaside mailing list