[Cosmo-dev] Cosmo WebUI Service Layer
Travis Vachon
travis at osafoundation.org
Wed Mar 14 09:24:06 PST 2007
>
> 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.
Thanks!
I'm still a little worried about this design. My main objections are
twofold:
1) I'm afraid it would lead to nasty code (that is, a smell) in the
implementation of cosmo.service since we'd need to do the detection
of differentiation between different auth methods in each of the
cosmo.service methods. I've created an implementation of the JSON-RPC
service using Dojo's JsonService module that I think will minimize
the ugliness for the particular case we care about (ticketed access),
but I'm still not convinced it will be terribly elegant, especially
if we introduce other access methods.
2) This doesn't seem as extensible to other data sources (ie gCal,
other Cosmo instances), since we're building cosmo.service into the
Item class. If we later decide to add support for this we'll need to
reimplement our model classes.
Any thoughts? Do we even care about the "multiple data sources"
model? It seems a little sad to come up with a design that we would
definitely need to change if we decided to support multiple data
sources in the future, but if we definitely don't care then I should
stop worrying about it :)
-Travis
More information about the cosmo-dev
mailing list