[Cosmo-dev] Cosmo WebUI Service Layer
Bobby Rullo
br at osafoundation.org
Mon Mar 12 12:44:39 PST 2007
On Mar 12, 2007, at 2:27 PM, Travis Vachon wrote:
>>
>> Just one and two I think. Of course that IS the meat of it. I
>> envision the conduits as really just there to encapsulate enough
>> information to figure out how to make the appropriate TAL calls
>> and publish some topics perhaps.
>>
>> Frankly, I'm not feeling 100% about it myself, but I just wanted
>> an interface to code to which allows you to specify different
>> types of collections (subscribed, owned) without having to know
>> how exactly you get them over the wire.
>>
>> It does seem like a bit of a code smell to have yet another place
>> where there's just a bunch of proxy calls to a yet deeper layer.
>>
>> Here's a radical idea - we did talk about not having conduits in
>> items offline yesterday and instead just having the conduits live
>> in collections. What if we didn't have conduits at all and instead
>> just have transport info objects in the collections. Now the model
>> object's save implementation will look like:
>>
>> Item.prototype.save = function(){
>> var collection = this.getACollectionICanWriteOn();
>> cosmo.service.save(this, collection.transportInfo);
>> }
>
> What would the transportInfo object look like and what would
> cosmo.service do with it? It's difficult to tell how this is
> different from previous proposals without knowing what kind of
> information you're proposing to put in each..
>
> -Travis
> _________
The transport info just contains on how to connect to a source. it
could look like
{
type: "ticket",
ticketKey: "123124124124",
collectionId: "123123123123"
}
The service layer would know how to save based on the type of
transport info object provided.
Bobby
More information about the cosmo-dev
mailing list