March 2002
Intermediate to advanced
496 pages
8h 51m
English
You might think any method that creates and returns a new object is a “factory” method. In object-oriented programming, however, methods that return new objects are common, and not every such method is an instance of the FACTORY METHOD pattern.
|
The fact that a method creates a new object does not in itself mean that it is an example of the FACTORY METHOD pattern. The FACTORY METHOD pattern requires that an operation that creates an object also isolates its client from knowing which class to instantiate. In FACTORY METHOD, you will find several classes that implement the same operation, returning the same, abstract type but internally instantiating ...
Read now
Unlock full access