On Jun 13, 2011, at 9:15 AM, Marek Potociar wrote:
> On 06/13/2011 02:46 PM, Markus KARG wrote:
>> For the topic of factories itself I share Bill's opinion that whenever possible we should use interfaces and do not provide implementations. As much as possible of the implementation should be in the sole hands of the vendors and not already pre-programmed by the spec. If using a ClientFactory is the solution, then we should provide one. It's just the cleaner approach.
>
> Can you please provide an example of constructing a client instance with the client factory you propose? Does your
> client factory have static methods? If yes, it must be at least an abstract class then, which means we are just moving
> the problem one level of indirection further.
Exactly. It doesn't matter how many factory classes we create, we'll need an abstract class for the static methods at some point. Earlier feedback on the API was related to the number of classes; adding an extra level of indirection seems to go against that and without any clear benefits IMO.
-- Santiago