Timeline for Is a god class still bad practice if it is used with mixins?
Current License: CC BY-SA 3.0
16 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 13, 2019 at 16:15 | review | Close votes | |||
Sep 21, 2019 at 3:01 | |||||
Nov 20, 2017 at 21:11 | history | edited | J. Darnell | CC BY-SA 3.0 |
fixed grammar
|
Nov 20, 2017 at 19:40 | vote | accept | J. Darnell | ||
Nov 20, 2017 at 18:57 | comment | added | J. Darnell |
@JacquesB composition is definitely another option. It seems more natural for me to do project.func1() than it does to use project.functional_grouping1.func1() . This might be something I just need to come around to.
|
|
Nov 20, 2017 at 18:42 | answer | added | BobDalgleish | timeline score: 2 | |
Nov 20, 2017 at 18:35 | comment | added | JacquesB | @J.Darnell: You don't give any reason why you can't just use composition, so I will go ahead and say your use of a God class is bad practice. Let the logically separate components be properties of the project object. | |
Nov 20, 2017 at 18:09 | comment | added | J. Darnell | I believe that making the 'project' class less of a god class would increase the complexity. It's a bit difficult for me to picture the design without the project class encapsulating all of the functionality of a project. To be clear, the project class itself does not implement most of its functionality but inherits it via several mixins. | |
Nov 20, 2017 at 18:03 | comment | added | J. Darnell | My application deals with multiple projects. Even though the methods of a project can be logically separated, it still makes sense to me that they be callable on a project object. I'd like to be able to pass a project object to a function and that function be able to exercise all of the functionality. | |
Nov 20, 2017 at 18:03 | comment | added | Ben Cottrell | Or to pose @JacquesB 's question from a slightly different angle, why would you not want different functionality split out into different classes? What issues are you concerned about with regards to splitting your application into logically separate components? | |
Nov 20, 2017 at 17:58 | answer | added | Conor Mancone | timeline score: 11 | |
Nov 20, 2017 at 17:54 | comment | added | JacquesB | @J.Darnell: If they are logically very different why do you want them on the same object? What are you trying to achieve by this? | |
Nov 20, 2017 at 17:38 | review | Close votes | |||
Nov 26, 2017 at 3:01 | |||||
Nov 20, 2017 at 17:23 | comment | added | J. Darnell | To encapsulate all of the functionality. That being said, the functionality can be broken up into very distinctive and logically separated modules. If it helps, the name of the god class is 'project'. Given a project object, I'd like to call func1 and func2 on that object, where func1 and func2 belong to different mixins because they are logically very different. | |
Nov 20, 2017 at 17:17 | comment | added | JimmyJames | Why do you want one object? | |
Nov 20, 2017 at 17:13 | review | First posts | |||
Nov 21, 2017 at 9:33 | |||||
Nov 20, 2017 at 17:12 | history | asked | J. Darnell | CC BY-SA 3.0 |