Jesse Silverman wrote:How might you format the constructor definition below in an environment that restricted or discourages lines longer than 100 chars? 80 chars?
But unfortunately not the requireThat( , , ) idiom used there. What's that bit about?
Stephan van Hulst wrote:The concept of "factory of factories" is definitely NOT what the abstract factory pattern is about.
It is true that many applications will use a static factory method to provide an abstract factory, but this is actually not part of the pattern, and does nothing to demonstrate the power of the abstract factory pattern.
The name of the pattern really says it all. You have an abstract class (or preferentially, an interface) that contains methods to create instances of another type. THAT'S IT. The application uses the abstract factory to create instances with, and the client of the application provides the factory.
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koophttps://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton