launchpad-dev team mailing list archive
-
launchpad-dev team
-
Mailing list archive
-
Message #09255
Re: Help please - launchpadlib collections
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 12-04-12 10:50 PM, Ian Booth wrote:
>> On 12-04-12 06:18 PM, Ian Booth wrote:
>>
>>> dir(lp) will list the services for sure, but also everything
>>> else as well. Having the top level collection 'services'
>>> provides a namespace of sorts which I think is necessary.
>>
>> Could you explain why you think it's necessary? So far, I
>> thought you were saying that discoverability is nice-to-have.
>>
>
> It is a nice to have and is not strictly necessary now when there's
> only one service. But later when there are more, I think it will
> become more important. As an extreme example, we wouldn't want to
> do away with the distributions collection and have all the distros
> as top level entries. I see no difference between that and
> services. That's my opinion based on past experience anyway.
The difference I see is that all distributions provide a common api,
and so writing code that works with a particular distribution does not
require foreknowledge of that particular distribution. It is
plausible to write functionality that works on any (or every) member
of a distribution.
Services will all be different, both in signatures and in semantics.
Writing code that uses a service requires foreknowledge of that
particular service, because
1. Without knowing what it does, you don't know that you want to use it
2. Without knowing its method signatures, you can't use it
I agree that having a namespace for services would be useful, but I
think using a collection to provide that namespace would be misleading.
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk+IOggACgkQ0F+nu1YWqI3nMACfdKJ7M780EfdtfhnGMc7oSsZd
mQIAnimvf4YKeYuX+szqmy67AGoWpLiH
=9aSj
-----END PGP SIGNATURE-----
Follow ups
References