The "lazy Factory"
In a software design pattern view, lazy initialization is often used together with a factory method pattern. This combines three ideas:
- using a factory method to get instances of a class (factory method pattern)
- storing the instances in a map, so you get the same instance the next time you ask for an instance with same parameter (Multiton pattern, similar to the singleton pattern)
- using lazy initialization to instantiate the object the first time it is requested (lazy initialization pattern).
Read more about this topic: Lazy Initialization
Famous quotes containing the words lazy and/or factory:
“Up a lazy river by the old mill run, that lazy, lazy river in the noonday sun.”
—Sidney Arodin, U.S. songwriter. Lazy River, Peer International Corp. (1931)
“The medieval university looked backwards; it professed to be a storehouse of old knowledge.... The modern university looks forward, and is a factory of new knowledge.”
—Thomas Henry Huxley (18251895)
Related Phrases
Related Words