R
RayLopez99
I must say I have to eat my words when I said a while ago that the Gang of Four patterns are by-and-by useless, except for the Composite Class template. I am using Decorator Classes more and more. Further, on the advice of a friend I studied "Dependency Injection in .NET", MARK SEEMANN, and some articles on the MEF framework in C#, and am using this framework now, to my benefit.
Who here knows or uses IoC, MEF, DI? The way I see it, as a tyro, MEF is asort of way of using interfaces as a sort of polymorphism. Sort of. Right now I am only "Exporting" and "Importing" stuff, using [attributes], and am not simultaneously importing and exporting out of the same class (which I believe you can do, but it gets too confusing to me).
Further, I tested a MEF demo program I wrote and found it is just as fast as a "hardwired" program that does not use MEF. In fact, for some strange reason (related to the Intermediate Language of C#), MEF is actually slightly faster, which is completely counter-intuitive. It's like what I found out when using "new"--you would think that in a loop, using 'new' every time would be hideously slow, but that is not the case often. This is not to beconfused with the immutable String vs Stringbuilder argument however (the latter is much faster in a loop).
RL
Who here knows or uses IoC, MEF, DI? The way I see it, as a tyro, MEF is asort of way of using interfaces as a sort of polymorphism. Sort of. Right now I am only "Exporting" and "Importing" stuff, using [attributes], and am not simultaneously importing and exporting out of the same class (which I believe you can do, but it gets too confusing to me).
Further, I tested a MEF demo program I wrote and found it is just as fast as a "hardwired" program that does not use MEF. In fact, for some strange reason (related to the Intermediate Language of C#), MEF is actually slightly faster, which is completely counter-intuitive. It's like what I found out when using "new"--you would think that in a loop, using 'new' every time would be hideously slow, but that is not the case often. This is not to beconfused with the immutable String vs Stringbuilder argument however (the latter is much faster in a loop).
RL