← Back to team overview

launchpad-dev team mailing list archive

Re: Adapters & API

 

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.

> Using 'import everything' for your dependency injection seems risky
> (but I haven't quantified it) to me.

Everything isn't a core part of the design, just the easiest thing to
express in that one mail. We can vary this part as needed.

> Lastly, I think that you'd want to check the performance of the global
> lookup you're adding. Globals are generally evil, and adding more
> doesn't really feel like a solution to me.

I agree that it should be considered, but for the root wadl you have to
load everything in anyway, so I don't think there will be a significant
impact there.

If there are times when we don't have everything loaded and want to list
the methods, or find whether a particlar method is valid/where it should
be dispatched to then there will be a cost.


It would be possible to avoid this my having references to other
interfaces to look for webservice declarations on that didn't use
symbols, and used strings or something instead. That would avoid the
global nature, but at a cost.

In addition, having "additive" behaviour, where features are enabled and
disabled as you install different parts of Launchpad, while something
that is a long way from actually being possible, would be tougher with
that approach.


As a parallel, it might be worth seeing it as wanting to provide "hook
points", similar to bzr, where plugins can extend/modify behaviour, but
the core doesn't know anything about the details of the plugins.


Thanks,

James



Follow ups

References