[Zope3-dev] Vocabulariy issues

Gustavo Niemeyer niemeyer at conectiva.com
Tue Sep 28 11:17:28 EDT 2004


> >2. Let's keep the API as simple as possible. At the beginning of the
> >mail you say you want to make vocabularies collections of values
> >only, but then your new API still has the ITerm interface. I like
> >that fact, since it keeps things easy. I would hate if vocabs just
> >manage vlaues and I have to write views for the values to get the
> >title or the token.
> 
> I proposed that extraction of tokens and titles from a vocabulary
> should be the responsibility of presentation code.  Ultimately, the
> vocabulary may need to store information used to make up the title and
> tokens, but we'll leave it to the ITerms view to know how to get it
> out.

That sounds really interesting. This will allow one to, for instance,
introduce persistent vocabularies which include their own translations
internally. Right now doing so is quite unconfortable, given that titles
are returned with terms, and at the time they're computed, the
vocabulary has no direct access to the request to compute the
preferred language (one may use interaction.participations, but that
looks like a workaround).

-- 
Gustavo Niemeyer
http://niemeyer.net


More information about the Zope3-dev mailing list