Design questions for future filter model.

Alexandre Rafalovitch writes:
 > >BTW: While you seem to think a lot these days ;-) if you have any
 > >other serious design flaws to mention, it is really the right time to
 > >speak up.
 > >
 > >Anselm.
 > 
 > Ok, one more thing on my mind.
 > 
 > With new filter model, are there any considerations to allow filters to
 > specify in which order they want to be. For example, we might want Auth
 > filter to be called before all the others and not just because it starts
 > with 'A'. But at some later point somebody might right a filter that should
 > sit before Auth filter and its derivatives, but anywhere if Auth filter is
 > not there. Other examples could be a global and localised filter that work
 > in pairs. They might want to be executed in some particular order relative
 > to each other but in any order relative to other filters. Also, it might be
 > required for some of the filters you mentioned before (Lookup filter in
 > particular).
 > 
 > The integrity of constrains could be checked by using modified bubble sort
 > at "Add filter" time. If filters are conflicting in their requested order,
 > then a filter cannot be added.
 > 
 > It would be great if filters could register their requirements on filters
 > they are executed before and after.
 > Using any other not so flexible system (eg. Alphabetical) would bring
 > problems. (as people with Machintoshes know too well :-{ )

Filters are ordered by the following "rules":
a) From the most general filters to the most particular. Ie if you
have a filter on A, B and C, in /A/B/C, then they are orderd as fA,
fB, fC, and will be  executed in that order (this rule cannot not be
changed because of the lookup filtering).
b) When multiple filters are set on the same resource, they are
executed in order of registration (with the current form based UI,
this is very difficult to control, to say the least).

It should be easy, with the new filter design to have a resource
maintain its *own* set of contraints on filter execution, since in the
new design, it is up to the resource to ultimatley decide in what
orders  the filters are to be called at perform time (again, for
lookup, you will not be able to affect the above order).

Anselm.

Received on Monday, 19 August 1996 20:13:36 UTC