From: Stefan B. <bo...@ap...> - 2009-06-08 11:06:30
|
On 2009-06-06, Maxim Filimonov <tpa...@gm...> wrote: > I'm looking at the .net version of Validator class now great > and it's quite strange for me that this class contains > implementation of validation while java version is only abstract > class without knowledge of any validation API. In the Java case I knew there'd be (at least) two implementations, while I only expected a single implementation for .NET. Do you envision a different validation API (I may just not be aware of alternatives so please bear with me) for .NET as well? If there is more than one implementation for .NET then we can and should split Validator the same way we did for Java, otherwise I'd feel it would be speculative design and defer the decision to later (YAGNI). If we leave Validator as it is it may be a good idea to remove the public constructor, though. That way people would be forced to use the factory method and we'd be free to change the implementation later. If you feel my code is wrong, please don't hesitate to jump in and fix it 8-) Stefan |