[Cosmo-dev] Cosmo WebUI Service Layer

Travis Vachon travis at osafoundation.org
Mon Mar 5 16:26:14 PST 2007


>
> So the Conduit will update a field in items that it fetches?
>
No, the Conduit will create a new Item and give it a Conduit.
>>>
>>> Also, what do we do about "new" items? Does the conduit become  
>>> like an item factory - "var item = conduit.newItem()" ?
>>>
>> This is a model question, really. Unless we want to significantly  
>> change how the code currently works, I think sticking with the  
>> "create an item and use saveItem to make it appear on the server"  
>> idiom. It would probably make sense to have a method like
>>
>> Collection.newItem(){create an Item that inherits my Conduit}
>
> Is there another proposal for the model, then?
I think Bobby is working on that now.
>>
>> var c = new Collection([conduit, ticketKey])?
>>
>> Where "conduit" and "ticketKey" are keyword arguments as described  
>> in the proposal.
>>
>> If ticketKey is given, Collection's constructor will create/find  
>> the appropriate ticket conduit. If "conduit" is given, the  
>> Collection will be created with the given Conduit as its conduit  
>> (but not saved!!). Otherwise, the Collection will be given the  
>> DefaultCurrentUserConduit.
>>
>> I'm open to suggestions on this one though...
>
> So where do the conduit and ticketKey come from?  Forgive my  
> ignorance on this one..
>
Heh, actually, I'm sorry for making this email a little more "only  
understandable in the space that my head is in" than it should be.

Really, these two cases are fairly weird, like "I want to create a  
new Collection, but I only have a ticket." It's not a use case we  
currently support and, frankly, doesn't make much sense with Tickets  
as we currently understand them. Therefore this will usually be

var c = new Collection()

and just use the "DefaultCurrentUserCollection".

In the future, if we supported some sort of "ticket that can be used  
to create new collections" it would probably be specified in the URL  
or somewhere so that the app knows about it a-priori.

I think Bobby's responding to a few other points, and I believe we're  
in agreement, I'll respond to his emails if I have more thoughts..

Thanks!

-Travis



More information about the cosmo-dev mailing list