From: Michaela Brauner on
Hello Peter,
>
> Which pattern are you referring to? The factory pattern (which you
> originally seem to have asked about)? Or the abstract class design
> (which you seem to be trying to implement)?
My task is.
MyApplication.exe
Machine - Factory
Scanner - Products
The machine needs one scanner from n scanner.

I prefer the correct pattern. I'm looking for that.
MyApplication.exe shoould be run without new compile withe different dll's.
Not more.
>
....
>
> I also don't understand the intent behind the links you posted. The
> first doesn't seem specifically applicable to the question at hand, and
> the second I can't even understand (I appreciate that your English is
> better than my German and certainly don't fault you for referring to
> German sources, but unfortunately there is little hope of me figuring
> them out).
Of course, I think so. Sorry.

http://en.wikipedia.org/wiki/Microsoft_Visual_Studio

Managed Extensibility Framework (MEF) that offers more extensibility
points than previous versions of the..

Micosoft know that problem and make improvements, but I haven't VS2010,
only VS2008.

And I want to learn, make first on the 'normal' way.

Maybe you have a short good example.

Have a nice day
Michaela
From: Michaela Brauner on
Hello Peter,
I forgot this link.
http://en.wikipedia.org/wiki/Managed_Extensibility_Framework
Can you tell me now,

http://msdn.microsoft.com/en-us/library/dd460648(VS.100).aspx

http://msdn.microsoft.com/de-de/library/ee332203.aspx
Only in German, please see the picture, I haven't the English
link.

Catalog -- Machine - Factory?
Part --- Products - Scanner?
o Export Funktionen ?
o Import Variables?

That is not clear.

Have a nice day
Michaela
>>
>> Which pattern are you referring to? The factory pattern (which you
>> originally seem to have asked about)? Or the abstract class design
>> (which you seem to be trying to implement)?
> My task is.
> MyApplication.exe
> Machine - Factory
> Scanner - Products
> The machine needs one scanner from n scanner.
>
> I prefer the correct pattern. I'm looking for that.
> MyApplication.exe should be run without new compile with different dll's.
> Not more.
>>
> ...
>>
>> I also don't understand the intent behind the links you posted. The
>> first doesn't seem specifically applicable to the question at hand,
>> and the second I can't even understand (I appreciate that your English
>> is better than my German and certainly don't fault you for referring
>> to German sources, but unfortunately there is little hope of me
>> figuring them out).
> Of course, I think so. Sorry.
>
> http://en.wikipedia.org/wiki/Microsoft_Visual_Studio
>
> Managed Extensibility Framework (MEF) that offers more extensibility
> points than previous versions of the..
>
> Microsoft know that problem and make improvements, but I haven't VS2010,
> only VS2008.
>
> And I want to learn, make first on the 'normal' way.
>
> Maybe you have a short good example.
>
From: Peter Duniho on
Michaela Brauner wrote:
> Hello Peter,
>>
>> Which pattern are you referring to? The factory pattern (which you
>> originally seem to have asked about)? Or the abstract class design
>> (which you seem to be trying to implement)?
> My task is.
> MyApplication.exe
> Machine - Factory
> Scanner - Products
> The machine needs one scanner from n scanner.
>
> I prefer the correct pattern. I'm looking for that.

The factory pattern may or may not be the best approach. It probably
is, but it will depend on the exact architecture. Specifically, how an
individual scanner is represented in your design.

> MyApplication.exe shoould be run without new compile withe different dll's.
> Not more.

This has nothing at all to do with the question of whether to use the
factory pattern or not.

> http://en.wikipedia.org/wiki/Microsoft_Visual_Studio
>
> Managed Extensibility Framework (MEF) that offers more extensibility
> points than previous versions of the..
>
> Micosoft know that problem and make improvements, but I haven't VS2010,
> only VS2008.

I'm surprised there's not a .NET 4 SDK that can be used with VS2008.
But it appears that's the case.

However, you can always upgrade to VS2010. The Express versions are
free, if you can't justify paying for the retail versions.

That said, while MEF can be an effectively way to populate the types
supported by a factory class, it also is not related specifically to the
factory pattern.

And again, with or without the factory pattern, you may or may not find
it useful to declare an abstract base class for your factory objects (or
even a non-abstract base class).

These three things are all independent choices with respect to the
design and implementation of your program. You can use any one of them
independently of whether you use any of the others.

Pete