[Zope] Management Interface Refactoring?

Shane Hathaway shane@digicool.com
Wed, 30 Aug 2000 08:33:03 -0400


Chris Withers wrote:
> 
> Dieter Maurer wrote:
> >  >  - it sends me to the management screen afterwards, and I'm
> >  >    calling it from the public interface.
> > This means, you want to look at the source of "manage_delObjects"
> > (-> "OFS.ObjectManager") to see, how it sends you to the management interface.
> >
> > You will see, that it contains:
> >
> >         if REQUEST is not None:
> >           return self.manage_main(self,REQUEST,update_menu)
> >
> > Thus, do not pass it a REQUEST.
> 
> It's this kindof hackiness which I really hope MJ's work eventually gets
> rid of.
> 
> This is the sort of thing I was talking about when I said "using bits of
> the management interface in other contexts" a while back.
> 
> what do other people think?
> 
> How do we go about making progress on this?

A simple but effective approach would be to split up every manage_*
method into two methods:

- manage_do_* does the work.
- manage_* calls manage_do_* then returns HTML.

Perhaps this could be added to the "clean up the core" proposal.

Shane