← Back to team overview

launchpad-dev team mailing list archive

Re: Adapters & API

 

On 30/06/10 01:40, James Westby wrote:
On Wed, 30 Jun 2010 07:27:53 +1000, Robert Collins<robert.collins@xxxxxxxxxxxxx>  wrote:
A few small thoughts if I may.

Yay to looser coupling.

Sadness at more global state (vs directly expressed dependencies,
directly injected connections).

I'm not sure what you mean here.

Here's a thought experiment which possibly gets to the point Rob was making:

We want to make Launchpad more of a 'choose your set of apps' thing, so that you can run, say, just codehosting (and registry, of course) or just bugtracking. It would be nice if being able to run different 'mixes' *in the same process* wasn't completely, theoretically, impossible -- so for example, having something in the bugs code that actually added things to the lp.registry.interfaces.product.IProduct interface object would fall into this category, as opposed to having the process of building the api root consider which things to add to *this* api root's product interface depending on config[1] values.

For a start, testing is a lot easier in the second approach.

Apologies if I've missed the point completely.

Cheers,
mwh

[1] Yes, I know canonical.config.config is a global too.  Shush.



Follow ups

References