← Back to team overview

launchpad-dev team mailing list archive

Re: API issue moving branches

 

On Tue, May 18, 2010 at 2:43 PM, Leonard Richardson
<leonard.richardson@xxxxxxxxxxxxx> wrote:
...
> Yeah, the named operation setTarget(package, project) is confusing. But
> the internal method setTarget(self, package, project) is also confusing,
> in exactly the same way! If we leave it in place internally and patch
> over it for the web service (which is what we talk about when we talk
> about annotations), we're letting our users have the good stuff but
> we're still using the not-so-good stuff internally.

IIRC, it was added specifically so we could expose it over the webservice API.

...
> At this point, I'd suggest we refactor the existing HWDB data model into
> the simpler data model, rather than have to keep two different data
> models in our heads. Why not? It's a lot of work, but not that much more
> work than writing a whole other data model, and at the end our
> application will be better. Because the public-facing data model is less
> efficient? That's a reason not to publish at all--it's a bad idea to
> publish an inefficient data model and hope our users don't use it too
> much.

I very much agree. I've wanted to expose the more abstract bits of the
branch model – IBranchTarget, IBranchCollection, IBranchNamespace –
over the webservice API for a very long time now. Thing is, I've not
known how to do it.

> I hope it doesn't feel like I'm suddenly springing this on you. This has
> been our plan for quite a while, but up to this point we've been
> focusing on creating a web service with a solid foundation that
> publishes all the Launchpad artifacts. Now is a good time to start
> talking about the best way to *improve* the design of the web service.

Yay.

jml



References