Factory
pattern contains:
1. DataConnection interface(Product)
2. LocalConnection class(ConcreteProduct)
3. NetworkConnection class (ConcreteProduct)
4. ConnectionFactory class(ConcreteCreator)
Is it alright not to use the interface class and the pattern will still comply to be a Factory pattern?
Something similar was applied in the book titled "The Design pattern
Java Companion" by James W. Cooper
Here, I can ask another question which is:
as long as any particular pattern can take some kind of structure (or shape) that comply with the pattern itself that defined in GOF book, How shall I know these shapes? any reference for that?
thanks
Qusay