Factory and non-factory design pattern differences?

A good example is given in the wikipedia article: en.wikipedia.org/wiki/Abstract_factory_p... An abstract factory is a "factory interface" that can be implemented by various concrete factories.

If you're looking for a good quick reference site for design patterns, check out dofactory.com/Patterns/Patterns.aspx for examples (using C#) and brief explanations. Also, the Head First Design Patterns book (which uses Java examples) helps break down the different patterns in an easy to understand format. I'd recommend those 2 resources for anyone just starting to research design patterns.

There is both an abstract and factory pattern. The Gang of Four book talks about two patterns: Factory Method, and Abstract Factory. A Factory method is just what it sounds like, an abstract method used to create an object: public interface SomeInterface { Foo create(); // factory method } public class SomeClass implements SomeInterface { Foo create() { // the concrete type being constructed is abstracted by the factory method return new DerivedFoo(); } } An abstract factory is a type that defines an abstraction for creating objects.In the example above, SomeInterface is an abstract factory.

The two are not always coupled to each other. It's perfectly valid to have a regular concrete class with some functionality that also has a factory method.An abstract factory says that the purpose of the entire class is to create one or more objects.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions