[Wikitech-l] Using composition to improve testability?

2013-05-02 Thread Daniel Kinzler
Hi all! I came across a general design issue when trying to make ApiQueryLangLinks more flexible, taking into account extensions manipulating language links via the new LanguageLinks hook. To do this, I want to introduce a LangLinkLoader class with two implementations, one with the old behavior,

Re: [Wikitech-l] Using composition to improve testability?

2013-05-02 Thread Brad Jorsch
On Thu, May 2, 2013 at 9:36 AM, Daniel Kinzler dan...@brightbyte.de wrote: 1) The composition approach, using: [...] Disadvantages: * more classes * ??? * A lot of added complexity 2) The subclassing approach, using: [...] 3) Instead of making a bunch of one-public-method classes used

Re: [Wikitech-l] Using composition to improve testability?

2013-05-02 Thread Daniel Kinzler
On 02.05.2013 16:12, Brad Jorsch wrote: On Thu, May 2, 2013 at 9:36 AM, Daniel Kinzler dan...@brightbyte.de wrote: 1) The composition approach, using: [...] Disadvantages: * more classes * ??? * A lot of added complexity The the number of classes, and the object graph, some. Not in the