When filling out an Overview of Object Oriented Concepts (To provide some research scientists with real data on software development), I came across this question:
What is the limit of N maximum methods that you allow in your classes?
A survey is then performed if you reorganize your classes as soon as you reach this limit.
I honestly never thought of such a restriction when developing my applications and wondered what argument was. Why do I want to impose on myself an arbitrary number, which probably depends heavily on the functionality of the classes?
N . " ". all-can-do-whatever-it-is.
, N, . .
, , , .
, 20 , , SRP > .
, , , - 10-20 , , . J2EE, Enterprise Java Melons.
. , , .
, , .
, 30 , 3 (Umm, 30 , - , kloc)
/ -.
- - , 4 5 .
, JDK- , , , , 20.
, , - , " !" , , do-all, .
If I open the source file, which I have not looked at before, and see more than 10-20 methods, I will probably scan it to see if it can somehow be reinstalled.
Source: https://habr.com/ru/post/1704851/More articles:Environment variable in a variable - bashObjectDataSource создается дважды при изменении управления - asp.netMapping Entities Framework Entity - Participant names cannot be the same as their closing type - c #Get innerHTML value from dynamically created text field (in javascript) - javascriptEntity Framework: загрузка от нескольких до одного объекта - .netHow can I translate Chinese text to pinyin on iPhone? - iphoneRails with Database Design without Rails - ruby | fooobar.comМетоды сериализации cookie Javascript/PHP? - javascriptCopy DLL from assembly for deployment - asp.netASP.NET: everything on page or breaks in controls? - architectureAll Articles