← Back to team overview

launchpad-dev team mailing list archive

Re: API issue moving branches

 

Ok, I understand a little better where you are coming from.

So for the attributes of the model, I think we can still use _ to distinguish 
between internal and external attributes.

For example, I think that package, distribution, product and such attributes 
could be renamed to _distribution, _product, etc and only have a generic 
target attribute.

About the question of how to do big refactoring while maintaining backward 
compatibility, we will have to maintain an implementation of the old API that 
is implemented in terms of the new. So apply the usual refactoring techniques.

For eample, if I want to split the class A into a B and C, we will maintain a 
backward A class, that offers the old A API and delegates to the appropriate B 
and C internally.

-- 
Francis J. Lacoste
francis.lacoste@xxxxxxxxxxxxx

On May 13, 2010, Julian Edwards wrote:
> On Thursday 13 May 2010 15:25:54 Francis J. Lacoste wrote:
> > I don't think Bjorn and you are agreeing.
> > 
> > From my understanding what you call 'internal model', I would call
> > 'implementation details'. Put another way, I think everything you
> > describe as internal model should have _ in front of their name. In
> > other word, these API shouldn't be called outside the class. (And much
> > less exported as webservice).
> > 
> > API have versioning support now, which makes some form of transition
> > possible.
> 
> I agree in that we can hide implementation details like that, but that's
> not what I mean by internal model.
> 
> What I am talking about is the model (or schema) itself, not the methods on
> the model objects.  We expose the model very directly, which makes it very
> hard to add versioning for model changes without some additional
> abstraction layer.
> 
> Consider the situation where we have a model object "A" in version 1.0 and
> we want to split it into "B" and "C" for version 1.1.
> 
> I don't see how it's currently possible make big changes like that without
> breaking API users, unless I am missing something?

Attachment: signature.asc
Description: This is a digitally signed message part.


Follow ups

References