Timeline for Avoiding constructors with many arguments
Current License: CC BY-SA 3.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 12, 2017 at 7:31 | history | edited | CommunityBot |
replaced http://programmers.stackexchange.com/ with https://softwareengineering.stackexchange.com/
|
|
Dec 25, 2015 at 17:14 | comment | added | radarbob | Mr. Factory: "What object do you want? ... What's that? Just tell me what class-object to build." The configuration file JSON is a data source, as Uncle Bob says "it's an implementation detail." It could from another source and/or in another form. Generally we want to decouple from the specific datasource details. Should the source or form change, the factory will not. Given a source+parser, and a factory as decoupled modules makes both reusable. | |
Dec 24, 2015 at 7:50 | comment | added | lugge86 | "The factory has absolutely no idea that such a JSON thingy even exists" - well, then what is the factory for?? It hides the details of product creation from both, product and consumer. Why should yet another class help? I'm fine with the factory speaking JSON. One can implement another factory for parsing XML and implement "Abstract Factory" in the future... | |
Dec 18, 2015 at 18:34 | history | edited | radarbob | CC BY-SA 3.0 |
added 22 characters in body
|
Dec 18, 2015 at 18:29 | history | answered | radarbob | CC BY-SA 3.0 |