Timeline for Is it always a good idea to divide large classes into smaller ones? [duplicate]
Current License: CC BY-SA 3.0
15 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 12, 2015 at 17:48 | vote | accept | Zibbobz | ||
| Apr 28, 2015 at 3:05 | history | closed | gnat jwenting CommunityBot | Duplicate of What is the real responsibility of a class? | |
| Apr 27, 2015 at 21:39 | comment | added | Uwe Keim | @RobertHarvey I've "misused" it to have multiple parts of a larger class, e.g. 4 or 5 partial files of one class. | |
| Apr 27, 2015 at 21:19 | comment | added | Robert Harvey | @UweKeim: partial classes are historically used to split classes into two parts: a code-generated part that is not modifiable, and a user-defined part that is modifiable. | |
| Apr 27, 2015 at 21:09 | comment | added | David Hammen | Is it always a good idea -- It's a good idea not to use "always". There are instead rules of thumb to which one should always pay attention, but don't get carried away. Even the much maligned goto has it's place. | |
| Apr 27, 2015 at 21:02 | comment | added | Uwe Keim | I've successfully used the concept of partial classes in C# to "split" some larger classes into multiple files without the need to really actually create new classes. Probably not the most elegant way; for me it worked quite well. | |
| Apr 27, 2015 at 19:25 | answer | added | phil soady | timeline score: 0 | |
| Apr 27, 2015 at 18:11 | review | Close votes | |||
| Apr 28, 2015 at 3:05 | |||||
| Apr 27, 2015 at 18:02 | comment | added | Zibbobz | @gnat Having read the question, it seems to be about writing new code, rather than refactoring it. And also approaches the topic from the perspective of defining the responsibility of a single object, rather than the limits of trying to break apart objects that appear too large (though it is related - in that the answer is based upon single-responsibility principle). | |
| Apr 27, 2015 at 17:52 | comment | added | gnat | see also: How do I prove or disprove “god” objects are wrong? | |
| Apr 27, 2015 at 17:50 | comment | added | user4828 | What do you mean by "too many objects"? Do you have any objective standard for that judgement? | |
| Apr 27, 2015 at 17:50 | answer | added | Avetis | timeline score: 2 | |
| Apr 27, 2015 at 17:48 | answer | added | Robert Harvey | timeline score: 23 | |
| Apr 27, 2015 at 17:42 | answer | added | Lawrence Aiello | timeline score: 6 | |
| Apr 27, 2015 at 17:27 | history | asked | Zibbobz | CC BY-SA 3.0 |