[rfc] MethodObject or CommandObject pattern and reconfigure.py

Robert Collins robert.collins at canonical.com
Wed Aug 5 00:19:48 BST 2009


On Fri, 2009-07-24 at 15:37 +1000, Martin Pool wrote:
> 
> 
>  * If the only interface you want to present is "do this action" and
> there's no obvious object identity that callers would be interested
> in, make it a function not an object.  The function can always become
> a factory for objects later, whether or not that's disclosed.

Objects often make unit testing easier, even in the case where the
client API is going to be very narrow. I think its worth saying that
these are factors to consider, but I would hesitate to make them rules.

-Rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20090805/3e2b7d9c/attachment.pgp 


More information about the bazaar mailing list