Desgin pattern...
-
This one has puzzled me before. Valves, pumps, and the like sound very concrete, yet they want to call it an abstract factory? :)
Luc Pattyn [Forum Guidelines] [My Articles]
Voting for dummies? No thanks. X|
Luc Pattyn wrote:
yet they want to call it an abstract factory?
What are you guys talking about? Isn't the pattern supposed to use the implementation of an abstract class for the factory and the user derives from it implementing the concrete factories? Or am I not remembering the pattern correctly?
led mike
-
I know. It's a really crappy name. Really really crappy.
Deja View - the feeling that you've seen this post before.
-
Luc Pattyn wrote:
yet they want to call it an abstract factory?
What are you guys talking about? Isn't the pattern supposed to use the implementation of an abstract class for the factory and the user derives from it implementing the concrete factories? Or am I not remembering the pattern correctly?
led mike
You are remembering it correctly. It's just a name that I have a problem with just because it sounds like you can directly instantiate abstract classes. I'm not sure what they should call it, but I've had staff being confused about this when they complain about their code not working because it's abstract.
Deja View - the feeling that you've seen this post before.
-
You are remembering it correctly. It's just a name that I have a problem with just because it sounds like you can directly instantiate abstract classes. I'm not sure what they should call it, but I've had staff being confused about this when they complain about their code not working because it's abstract.
Deja View - the feeling that you've seen this post before.
Pete O'Hanlon wrote:
but I've had staff being confused about this when they complain about their code not working because it's abstract.
Sorry to hear that. On the bright side at least you work with people that use the word "Abstract"! That's more than I can say! :((
led mike
-
Pete O'Hanlon wrote:
but I've had staff being confused about this when they complain about their code not working because it's abstract.
Sorry to hear that. On the bright side at least you work with people that use the word "Abstract"! That's more than I can say! :((
led mike
led mike wrote:
at least you work with people that use the word "Abstract"! That's more than I can say!
Ouch. X|
Deja View - the feeling that you've seen this post before.
-
led mike wrote:
at least you work with people that use the word "Abstract"! That's more than I can say!
Ouch. X|
Deja View - the feeling that you've seen this post before.
-
Dude, it looks like you are being stalked by a 2.0 voter? Even I don't have a stalker! :laugh::laugh:
led mike
led mike wrote:
Dude, it looks like you are being stalked by a 2.0 voter? Even I don't have a stalker!
Damn. I'm not even worthy of a Univoter. :laugh:
Deja View - the feeling that you've seen this post before.
-
I know. It's a really crappy name. Really really crappy.
Deja View - the feeling that you've seen this post before.
Nooooo. It is a good name, though just as good and maybe better would be static factory. The factory itself is usually a class with only static methods, so it should be static (or abstract, though static is perhaps the more academically pleasing choice since it's not intended as a base class for concrete factories but rather just a bunch of static members relating to the same thing). So even though the products of the factory are concrete, the factory itself isn't. Pump p = Factory.CreatePump(...); not Factory f = new Factory(); Pump p = f.CreatePump(...); Normalement.
-
led mike wrote:
Dude, it looks like you are being stalked by a 2.0 voter? Even I don't have a stalker!
Damn. I'm not even worthy of a Univoter. :laugh:
Deja View - the feeling that you've seen this post before.
I often accidentally vote 2.... when a little spaced out it is far too easy to think, as you arrive at the last message, that those numbers represent pages. So I try to navigate to page 2, and get "thank you for voting"..! I must apologize to any victims (none today tho). :D
-
Nooooo. It is a good name, though just as good and maybe better would be static factory. The factory itself is usually a class with only static methods, so it should be static (or abstract, though static is perhaps the more academically pleasing choice since it's not intended as a base class for concrete factories but rather just a bunch of static members relating to the same thing). So even though the products of the factory are concrete, the factory itself isn't. Pump p = Factory.CreatePump(...); not Factory f = new Factory(); Pump p = f.CreatePump(...); Normalement.