[ZDP] Re: Ordering objects and ZDP Tools (again)

Rik Hoekstra rik.hoekstra@inghist.nl
Tue, 14 Mar 2000 22:02:25 +0100


Hi Maik

> about the acquisition problem: the content and whatever other folder
> specific dtml documents do not have such a property but acquire one from
> their container folder. This can be overcome by checking the order
> property of a DTML Method != container. Or is there a generic way to
> test if something is a ZClass instance, or I should make a list of
> allowed meta-types. All of these are clumsy, but the problem may be
> overcome.

I don't mind anything aquiring properties from a ZClass instance.
In what case would this be problematic ?

[RH] In the dtml methods (content etc) you insert in the ZClass instances.
We don't want them in the ordered list, do we?

> > It is up to the user to decide if he wants to change the order of
> > the items. This will not happen too often, I would think.
>
> ? why not, depends on the type of documents (faq order for instance may
> change quite often)

It is just an observation. I think it was you who wanted to change
the order of an easy question to a higher position. We will see how
often this is actually needed.


[RH] Yep, let's see


> > It is up to the views to decide whether they want to respect the order
> > provided. Views can also decide what to do with the orders with a value
> > of 0. Views also don't have to worry about different naming schemes
> > and also the Catalog can now sort on the order, which may be needed.
>
> yes, that _may_ be an advantage. Although.... A use case:
> we have two documents, one a snippet and the other a FAQ, both with a
> keyword dtml. The FAQ in the faq is unimportant and has an order
> property of value 2000 (which will keep it at the end of the faq list
> and there are more than 50 faqs about dtml). The snippet, however, is
> also unimportant and has an order of 50 (keeping it down at its list
> which is maintained by another maintainer). Now the Catalog sorted on
> order will keep the snippet above the faq, for no obvious reason.

If this is a desired feature, then the catalog search should take
into account the total number of snippets/questions, and the absolute
position of the objects.

[weighted ordering expose snipped]


This does not take into account that the Snippets and Questions
can indeed come from different folders, which would complicate
things, because you would have to decide the base set cardinality
by looking at the folder from which a Snippet/Question comes
every time instead of doing so once.


[RH] Ahum, this seems me to be getting a bit too complicated and not very
useful as feature. This discussion is not leading anywhere useful, I'm
afraid. Let's cut it short. I will implement the global sorting for use in
folders. It seems I wanted too much at the same time.

> Now this is not very important, but the order property when used
> generically will lead to strange orderings.

The numbers have no special meaning. They are only to keep the order
relative to one meta_type. As you have stated above, you can't compare
an order property in 50 FAQ Questions and an order in 20 Snippets.
Also, a number of 2000 does not mean that a Question is unimportant
or obsolete, in which case it should be removed or moved to another
place anyway, but the order just signifies that this question makes
most _sense_ after all the questions before and before all the questions
after it.


[RH] Ok, I agree completely.

> This said, I really do not mind adding the generic order to the Document
> Folder class. Shall I proceed like that then?

Just set the default value of the order property to 0. Maybe
you should take a name of "contextorder" so it is clear that
we are not speaking about a ranking order, difficulty order
or quality order, which could be added later or in a different
way.


[RH] OK. I will.


Rik