[Cosmo-dev] Cosmo WebUI Service Layer
Ted Leung
twl at osafoundation.org
Mon Mar 5 16:10:49 PST 2007
On Mar 5, 2007, at 3:57 PM, Bobby Rullo wrote:
>>>>
>>>> Model Data Convenience Syntax
>>>
>>> Looks ok, but still worried about this for some reason.
>>>
>>> Why does the collection object have a getItem()? Items don't
>>> belong to a particular collection and you can identify them
>>> solely with the UID.
>> This is shorthand for "get an Item and assign it my conduit." I
>> hadn't really thought about it, but this actually goes a little
>> beyond the "syntactic sugar" idea of MDCS. That said, I think it
>> is a _very_ common idiom, and we probably want to keep it. Getting
>> an Item with only a UID requires picking a Conduit through which
>> to get it, and should be done at the Conduit level.
>
> I understand the shortcut, but why is it at the collection level if
> items don't belong to collections?
So just to point to the Chandler perspective again (not saying we
have to do it this way). In Chandler, for each Kind of Item, there
is a collection which represents all the items of a particular
kind. In that sense, every item belongs to at least one
collection. If items don't belong to collections, then all you have
is a big hash table, without a way to address items by content.
Even if we choose to keep thing relatively dumb now, we are likely to
want to have some ability to address items by content (also known as
querying items). Just food for thought.
>
>>>
>>>> item.doDelete()
>>>
>>> why not "delete()"?
>> delete is a keyword in Javascript, so I was worried this might be
>> problematic. It appears ok to do this in Firefox, but we'll need
>> to verify it's ok in other browsers too.
>>
> Oh ok. I prefer d3l3t3(). Not really.
Don't you mean d3l33t?
Ted
More information about the cosmo-dev
mailing list