Design: Idiom for classes and methods that are customizable by the user?

Dirk Bächle tshortik at gmx.de
Sun May 15 06:01:19 EDT 2016


Hi Marko,

Am 13.05.2016 um 07:53 schrieb Marko Rauhamaa:
> Dirk Bächle <tshortik at gmx.de>:
>
>>> For example, why do you need a key? Couldn't you simply pass the task
>>> master class as an argument?
>>
>> The idea behind this is, to be able to select classes by giving a
>> parameter on the command-line. So at some point a translation from a
>> given "key" to its actual class has to happen, I guess.
>
> I see. So are the task masters interchangeable? I would have imagined
> they would modify the default operational semantics. If so, the task
> manager should be fixed programmatically in the SConstruct file.
>

yes, I'd like to be able to replace Taskmasters as well. For example, switching from the "default" file-oriented taskmaster, to one 
that also supports pseudo targets (always run) like in "make" or "aqualid".
After all, we're mainly a "build framework"...so supporting different approaches to a given "build process" makes sense to me.

Apart from that, it's basically just an example of what I'm trying to achieve. To which classes in our architecture the idiom is 
actually applied, is left as a decision that is made sometime later.

Dirk




More information about the Python-list mailing list