[dojo-contributors] Dojo data discussion

Jon Sykes lists at jpsykes.com
Thu Jun 7 21:16:21 EDT 2007

OK, so based on this and what I understood your initial idea to be,  
you seem to be arguing against yourself.  :-)

Maybe if you explain again what your initial idea was it might clear  
up some confusion.

On Jun 7, 2007, at 6:36 PM, Brian Douglas Skinner wrote:

> Hmmm, I don't see how the UI code could reliably do string conversion
> without knowing about the semantics of the data items...
> For example, let's say you have an astronomy database, with info about
> planets.  It has an item representing Pluto, with attributes like  
> mass,
> volume, oblateness, etc.  For the name attribute, the database may  
> know
> the name in a variety of languages: "Pluto" in English, "Pluton" in
> French, "Plutone" in Italian, etc.  Or the database itself may not  
> know
> all the names, but the datastore implementation may know where to look
> up those string translations.
> You could also have a journalism database, with info about  
> newspaper and
> journalists.  One of the items in that database might represent the
> sportswriter Terry Pluto.  In this case Terry's name is always  
> "Pluto",
> in English or French or Italian.
> If you've got an item x, and the datastore getLabel(x) method returns
> "Pluto", there's no reliable way for the UI code to translate that
> without knowledge about the semantics of the data.  I think that
> generally speaking, knowledge about the semantics of the data should
> live in the datastore and the database, rather than in the widgets.  I
> don't think the ComboBox should ever try to do any translation -- it
> should just call getLabel(x) and then display whatever string is  
> returned.
> :o) Brian
> _______________________________________________
> dojo-contributors mailing list
> dojo-contributors at dojotoolkit.org
> http://dojotoolkit.org/mailman/listinfo/dojo-contributors

More information about the dojo-contributors mailing list