← Back to team overview

launchpad-dev team mailing list archive

Re: Generic Colletion?

 

On Tue, 20 Jul 2010 11:41:21 +0200, Jeroen Vermeulen <jtv@xxxxxxxxxxxxx> wrote:
> This is a generic base for that kind of collection.  It wouldn't slot 
> comfortably underneath the existing BranchCollection API because the 
> latter exposes Storm's Select objects.  Storm doesn't really expose 
> those, but you can obtain them through a private method.  My Collection 
> class doesn't go that deep.
> 
> A simple but quite usable concrete collection class based on my 
> Collection takes 4 lines (that's including import & docstring).  I hope 
> it will facilitate lots of future instances of the collection pattern.

Hi,

Thanks for doing this Jeroen, it is silly easy to create these very
useful objects now.

To make it even easier for others I created

  https://dev.launchpad.net/Collections

documenting the couple of steps required to do this.

If someone could fill in the couple of sections there when they
implement the features that I haven't added yet, that would be great.

> Our own Collection is much simpler but pushes optimization problems 
> higher up: you maintain some special knowledge in your concrete 
> collection, or you just use the collections differently.  We already 
> have an instance of optimization through specialized knowledge in our 
> pilot implementation, and it works well without complicating the normal 
> case.

I think that it would be valuable to put some performance things to
watch out for on that page too.

Thanks,

James



Follow ups

References