[Mono-dev] [Mono-list] SqlCeServer on mono

Andreas Färber andreas.faerber at web.de
Wed May 16 15:00:42 EDT 2007


>> Please tell me why do you considerer it a bad design to use the
>> object rather than the interface???
> I didn't say that. You can write factories even w/out employing
> interfaces, if you don't like them.

You are always using an object. It's the type (the class) of the  
variables that matters.

It is always a bad idea to use too specific classes as variable types  
when that is not needed. For instance, System.IO.Stream is a very  
generic class that you can use when dealing with all kinds of streams  
instead of restraining your use to say MemoryStream. As you see, this  
abstraction is a Microsoft supported "pattern" if you want to call it  
that way. And in a similar way ADO.NET supports the "Abstract  
Factory" pattern either manually, using conditionals or defines for  
the assignment, or using a third-party factory library doing so,  
whether Mono or not (doesn't Microsoft provide such a "Building  
Block" for their platform themselves?).


More information about the Mono-devel-list mailing list