{"id":325635,"date":"2021-06-29T03:00:12","date_gmt":"2021-06-29T03:00:12","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=325635"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=325635","title":{"rendered":"\u041c\u043d\u043e\u0433\u043e\u043b\u0438\u043a\u0438\u0439 \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u0438"},"content":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<p><em>\u042d\u0442\u043e\u0442 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f <\/em><a href=\"https:\/\/azhidkov.pro\/posts\/21\/06\/210626-srp-interpretations\/\" rel=\"noopener noreferrer nofollow\"><em>\u043a\u0440\u043e\u0441\u0441-\u043f\u043e\u0441\u0442\u043e\u043c<\/em><\/a><em> <\/em><\/p>\n<p>\u041a\u0430\u0436\u0435\u0442\u0441\u044f, \u043b\u044e\u0431\u043e\u0439 &#171;\u0441\u043e\u043b\u0438\u0434\u043d\u044b\u0439&#187; \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u0437\u043d\u0430\u0435\u0442 \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 SOLID \u0432\u043e\u043e\u0431\u0449\u0435 \u0438 \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u0438 (SRP) \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438.<\/p>\n<details class=\"spoiler\">\n<summary>\u0421\u043f\u043e\u0439\u043b\u0435\u0440, \u0435\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u043d\u0435 \u0437\u043d\u0430\u0435\u0442\u0435<\/summary>\n<div class=\"spoiler__content\">\n<p>SOLID &#8212; \u044d\u0442\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u043e\u0432  \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0434\u0438\u0437\u0430\u0439\u043d\u0430, \u0441\u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0420\u043e\u0431\u0435\u0440\u0442\u043e\u043c \u041c\u0430\u0440\u0442\u0438\u043d\u043e\u043c,  \u0442\u0430\u043a \u0436\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u043c \u043a\u0430\u043a \u0430\u043d\u043a\u043b \u0411\u043e\u0431. \u041f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u0437\u0432\u0443\u0447\u0430\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<ol>\n<li>\n<p><strong>S<\/strong>ingle Responsibility Principle: A module should have one, and only one, reason to change.<\/p>\n<\/li>\n<li>\n<p><strong>O<\/strong>pen\/Closed Principle:: A software artifact should be open for extension but closed for modification.<\/p>\n<\/li>\n<li>\n<p><strong>L<\/strong>iskov  Substitution Principle:: What is wanted here is something like the  following substitution property: If for each object o1 of type S there  is an object o2 of type T such that for all programs P defined in terms  of T, the behavior of P is unchanged when o1 is substituted for o2 then S  is a subtype of T<\/p>\n<\/li>\n<li>\n<p><strong>I<\/strong>nterface Segregation Principle:: Clients should not be forced to depend upon interfaces that they do not use.<\/p>\n<\/li>\n<li>\n<p><strong>D<\/strong>ependency Inversion Principle::<\/p>\n<ol>\n<li>\n<p>High level modules should not depend upon low level modules. both should depend upon abstractions.<\/p>\n<\/li>\n<li>\n<p>Abstractions should not depend upon details. details should depend upon abstractions.<\/p>\n<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<\/div>\n<\/details>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0440\u0435\u0447\u044c \u0437\u0430\u0445\u043e\u0434\u0438\u0442 \u043e\u0431 SRP, \u044f \u0432\u0441\u0435\u0433\u0434\u0430 \u0443\u0442\u043e\u0447\u043d\u044f\u044e, \u0447\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0438\u043c\u0435\u0435\u0442 \u0432\u0432\u0438\u0434\u0443 \u043c\u043e\u0439 \u0441\u043e\u0431\u0435\u0441\u0435\u0434\u043d\u0438\u043a. \u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0443 SRP \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043f\u044f\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0445 \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043e\u043a \u0438 \u0442\u0440\u0438 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u0438. \u0418 \u044f \u043d\u0435 \u0434\u0443\u043c\u0430\u044e, \u0447\u0442\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u0430\u044f \u044d\u043c\u043c\u2026\u200b \u0448\u0442\u0443\u043a\u043e\u0432\u0438\u043d\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0445\u043e\u0440\u043e\u0448\u0438\u043c \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e\u043c \u043f\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u041f\u041e.<\/p>\n<h3>\u0424\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0438 SRP<\/h3>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u043d\u0435\u0432\u0435\u0440\u043d\u0443\u044e, \u043d\u043e \u0441\u0430\u043c\u0443\u044e \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0443\u044e \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0443:<\/p>\n<blockquote>\n<p>\u041a\u043b\u0430\u0441\u0441 \u0434\u043e\u043b\u0436\u0435\u043d \u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0434\u043d\u0443 \u0432\u0435\u0449\u044c<\/p>\n<p>\u2014 \u043d\u0430\u0440\u043e\u0434<\/p>\n<\/blockquote>\n<p>\u041a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432\u0442\u043e\u0440\u0438\u0442 \u0438 \u0440\u0443\u0441\u0441\u043a\u0430\u044f \u0432\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u044f:<\/p>\n<blockquote>\n<p>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0412\u0441\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u0435\u0433\u043e \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u0435\u043d\u0438\u044f, \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0432 \u044d\u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0441 \u0438 \u043f\u043e\u0434\u0447\u0438\u043d\u0435\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435.<\/p>\n<p>\u2014 \u0412\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u044f, https:\/\/ru.wikipedia.org\/wiki\/SOLID_(\u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435_\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435)<\/p>\n<\/blockquote>\n<p>\u0425\u043e\u0442\u044f \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0442\u043e\u0439 \u0436\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043e\u0434\u043d\u0443 \u0438\u0437 \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043e\u043a \u041c\u0430\u0440\u0442\u0438\u043d\u0430.<\/p>\n<p>\u0412\u043e\u043e\u0431\u0449\u0435, \u0442\u0430\u043a\u043e\u0439 \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u0435\u0441\u0442\u044c &#8212; \u044d\u0442\u043e \u043e\u0434\u0438\u043d \u0438\u0437 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u043e\u0432 \u0444\u0438\u043b\u043e\u0441\u043e\u0444\u0438\u0438 Unix. \u041d\u043e \u0441\u0430\u043c \u041c\u0430\u0440\u0442\u0438\u043d \u043f\u0438\u0448\u0435\u0442 \u0432 \u0427\u0438\u0441\u0442\u043e\u0439 \u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435, \u0447\u0442\u043e \u044d\u0442\u043e \u043d\u0435 SRP:<\/p>\n<blockquote>\n<p>It is too easy for programmers to hear the name and then assume that it means that every module should do just one thing.<\/p>\n<p>Make no mistake, there is a principle like that. [\u2026\u200b] But it is not one of the SOLID principles \u2014 it is not the SRP.<\/p>\n<p>\u2014 Robert C. Martin, Clean Architecture<\/p>\n<\/blockquote>\n<hr>\n<p>\u0421\u0430\u043c \u041c\u0430\u0440\u0442\u0438\u043d \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u0443\u0435\u0442 SRP \u0442\u0440\u0435\u043c\u044f \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438:<\/p>\n<p>\u0424\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0430 2003 \u0433\u043e\u0434\u0430<\/p>\n<blockquote>\n<p>The Single Responsibility Principle (SRP) states that a class or module should have one, and only one, reason to change<\/p>\n<p>\u2014 Robert C. Martin, Agile software development Principles Patterns and Practices<\/p>\n<\/blockquote>\n<p>\u0424\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0430 2014 \u0433\u043e\u0434\u0430<\/p>\n<blockquote>\n<p>Gather together the things that change for the same reasons. Separate those things that change for different reasons.<\/p>\n<p>\u2014 Robert C. Martin, The Single Responsibility Principle<\/p>\n<\/blockquote>\n<p>\u0424\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0430 2018 \u0433\u043e\u0434\u0430<\/p>\n<blockquote>\n<p>A module should be responsible to one, and only one, actor<\/p>\n<p>\u2014 Robert C. Martin, Clean Architecture<\/p>\n<\/blockquote>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u0443 \u043d\u0438\u0445 \u043e\u0431\u0449\u0435\u0433\u043e, \u043c\u043d\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u043f\u043e \u0442\u0440\u0438 \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0439 \u041c\u0430\u0440\u0442\u0438\u043d\u0430 \u043e\u0431 SRP. \u0412\u044b \u0436\u0435 \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u0435 \u0434\u0435\u043d\u044c-\u0434\u0432\u0430 \u0436\u0438\u0437\u043d\u0438 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u043e\u0442\u0432\u0435\u0442 \u0437\u0430 \u043f\u044f\u0442\u043d\u0430\u0434\u0446\u0430\u0442\u044c \u043c\u0438\u043d\u0443\u0442, \u0435\u0441\u043b\u0438 \u0434\u043e\u0447\u0438\u0442\u0430\u0435\u0442\u0435 \u043f\u043e\u0441\u0442 \u0434\u043e \u043a\u043e\u043d\u0446\u0430.<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u0430\u043a \u0430\u043d\u043a\u043b \u0411\u043e\u0431 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442 SRP \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044c \u043b\u0435\u0442.<\/p>\n<h3>\u041e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u044f SRP<\/h3>\n<p><strong>Agile software development Principles Patterns and Practices, 2003<\/strong><\/p>\n<p><em>\u041b\u044e\u0431\u043e\u043f\u044b\u0442\u043d\u044b\u0439 \u0444\u0430\u043a\u0442 &#8212; SRP \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043d\u0430 \u0432\u043e\u0441\u0435\u043c\u044c \u043b\u0435\u0442 \u043f\u043e\u0437\u0436\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u043e\u0432 SOLID, \u0438 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0431\u044b\u043b \u0434\u0440\u0443\u0433\u043e\u0439 &#8212; OLDI. \u0410 \u0430\u043a\u0440\u043e\u043d\u0438\u043c SOLID \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043b \u043d\u0435 \u0430\u043d\u043a\u043b \u0411\u043e\u0431, \u0430 \u041c\u0430\u0439\u043a\u043b \u0424\u044d\u0437\u0435\u0440\u0441.<\/em><\/p>\n<p>\u0412\u043f\u0435\u0440\u0432\u044b\u0435 SRP \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0432 <a href=\"https:\/\/www.amazon.com\/Software-Development-Principles-Patterns-Practices\/dp\/0135974445\" rel=\"noopener noreferrer nofollow\">Agile software development Principles Patterns and Practices<\/a>. \u0412 \u044d\u0442\u043e\u0439 \u043a\u043d\u0438\u0433\u0435 \u041c\u0430\u0440\u0442\u0438\u043d \u043f\u043e\u044f\u0441\u043d\u044f\u043b \u0435\u0433\u043e \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 <strong>\u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b<\/strong>:<\/p>\n<blockquote>\n<p>Consider the bowling game from  Chapter 6. For most of its development the Game class was handling two separate  responsibilities. It was keeping track of the current frame, and it was calculating the  score. In the end, RCM and RSK separated these two responsibilities into two  classes. The Game kept the responsibility to keep track of frames, and the Scorer  got the responsibility to calculate the score. (see page 85.)<\/p>\n<p>\u2014 Robert C. Martin, Agile software development Principles Patterns and Practices<\/p>\n<\/blockquote>\n<p><strong>Clean Code, 2008<\/strong><\/p>\n<p>\u041f\u043e\u044f\u0441\u043d\u044f\u0442\u044c SRP \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u043f\u043e <strong>\u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b<\/strong> \u041c\u0430\u0440\u0442\u0438\u043d \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u0442 \u0438 \u0432 <a href=\"https:\/\/www.amazon.com\/Clean-Code-Handbook-Software-Craftsmanship\/dp\/0132350882\" rel=\"noopener noreferrer nofollow\">Clean Code<\/a>:<\/p>\n<pre><code class=\"java\">public class SuperDashboard extends JFrame implements MetaDataUser {     public Component getLastFocusedComponent()     public void setLastFocused(Component lastFocused)     public int getMajorVersionNumber()     public int getMinorVersionNumber()     public int getBuildNumber(); }<\/code><\/pre>\n<blockquote>\n<p>The seemingly small SuperDashboard class in Listing 10-2 has two reasons to change. First, it tracks version information that would seemingly need to be updated every time the software gets shipped. Second, it manages Java Swing components (it is a derivative of JFrame, the Swing representation of a top-level GUI window)<\/p>\n<p>\u2014 Robert C. Martin, Clean Code<\/p>\n<\/blockquote>\n<p><strong>The Clean Coder, 2011<\/strong><\/p>\n<p>\u0417\u0430\u0442\u0435\u043c \u0432 <a href=\"https:\/\/www.amazon.com\/Clean-Coder-Conduct-Professional-Programmers\/dp\/0137081073\/ref=pd_sim_5\/131-9122726-9479409?pd_rd_w=0NdTd&amp;pf_rd_p=d88e414a-c661-4436-b6ed-003c19da9b92&amp;pf_rd_r=6FTHCEPHBC1138C43SJ9&amp;pd_rd_r=28244df1-86a2-478b-85b3-5e3542ecf45b&amp;pd_rd_wg=H5iaV&amp;pd_rd_i=0137081073&amp;psc=1\" rel=\"noopener noreferrer nofollow\">The Clean Coder<\/a> \u0430\u043d\u043a\u043b \u0411\u043e\u0431 \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 SRP \u0443\u0436\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044f <strong>\u0430\u0441\u043f\u0435\u043a\u0442\u043e\u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438<\/strong> (\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0438 \u0431\u0438\u0437\u043d\u0435\u0441-\u043f\u0440\u0430\u0432\u0438\u043b):<\/p>\n<blockquote>\n<p>There is a design principle  called the Single Responsibility Principle (SRP). This principle states that you should separate those things that change  for different reasons, and group together those things that change for  the same reasons. GUIs are no exception.<\/p>\n<p>The layout, format, and workflow of the GUI will change for aesthetic  and efficiency reasons, but the underlying capability of the GUI will  remain the same.<\/p>\n<p>[&#8230;]<\/p>\n<p>Design experts have been telling us for decades to separate our GUIs from our business rules.<\/p>\n<p>\u2014 Robert C. Martin, The Clean Coder<\/p>\n<\/blockquote>\n<p><strong>The Single Responsibility Principle, 2014<\/strong><\/p>\n<p>\u0412 <a href=\"https:\/\/blog.cleancoder.com\/uncle-bob\/2014\/05\/08\/SingleReponsibilityPrinciple.html\" rel=\"noopener noreferrer nofollow\">\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439<\/a> \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u043e SRP \u0430\u043d\u043a\u043b \u0411\u043e\u0431 \u0443\u0436\u0435 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0442\u0435\u0440\u043c\u0438\u043d &#171;\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 <strong>\u0430\u0441\u043f\u0435\u043a\u0442\u043e\u0432 [\u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438]<\/strong>&#187; (separation of concerns):<\/p>\n<blockquote>\n<p>Two years later, Edsger Dijkstra  wrote another classic paper entitled On the role of scientific thought.  in which he introduced the term: The Separation of Concerns. [&#8230;] This is the reason we do not put SQL in JSPs. This is the reason we do not generate HTML in the modules that compute  results. This is the reason that business rules should not know the database  schema. This is the reason we separate concerns.<\/p>\n<p>\u2014 Robert C. Martin, https:\/\/blog.cleancoder.com\/uncle-bob\/2014\/05\/08\/SingleReponsibilityPrinciple.html<\/p>\n<\/blockquote>\n<p>\u041d\u043e \u0437\u0434\u0435\u0441\u044c \u0436\u0435, \u041c\u0430\u0440\u0442\u0438\u043d \u0432\u043f\u0435\u0440\u0432\u044b\u0435 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442 SRP \u0441\u043e\u0432\u0441\u0435\u043c \u0432 \u0434\u0440\u0443\u0433\u043e\u043c \u043a\u043b\u044e\u0447\u0435:<\/p>\n<blockquote>\n<p>And this gets to the crux of the Single Responsibility Principle. This principle is about people.<\/p>\n<p>When you write a software module, you want to make sure that when  changes are requested, those changes can only originate from a single  person, or rather, a single tightly coupled group of people representing  a single narrowly defined business function.<\/p>\n<p>\u2014 Robert C. Martin, https:\/\/blog.cleancoder.com\/uncle-bob\/2014\/05\/08\/SingleReponsibilityPrinciple.html<\/p>\n<\/blockquote>\n<p>\u0417\u0434\u0435\u0441\u044c \u0443\u0436\u0435 \u0440\u0435\u0447\u044c \u0438\u0434\u0451\u0442 \u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u043a\u043e\u0434\u0430 \u043f\u043e <strong>\u043b\u044e\u0434\u044f\u043c<\/strong>.<\/p>\n<p><strong>Clean Architecture, 2018<\/strong><\/p>\n<p>\u0412 \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0436\u0435 \u0444\u043e\u0440\u043c\u0435 \u044d\u0442\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0435 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0435\u0449\u0451 \u0447\u0435\u0440\u0435\u0437 \u0447\u0435\u0442\u044b\u0440\u0435 \u0433\u043e\u0434\u0430 \u0432 <a href=\"https:\/\/www.amazon.com\/Clean-Architecture-Craftsmans-Software-Structure\/dp\/0134494164\/ref=pd_sim_1\/131-9122726-9479409?pd_rd_w=Kj7C7&amp;pf_rd_p=d88e414a-c661-4436-b6ed-003c19da9b92&amp;pf_rd_r=0ZQVJKRJ6VFKKPXGBRJA&amp;pd_rd_r=664e0c37-918c-4613-b12d-6e758d26e96b&amp;pd_rd_wg=DAys9&amp;pd_rd_i=0134494164&amp;psc=1\" rel=\"noopener noreferrer nofollow\">Clean Architecture<\/a>:<\/p>\n<blockquote>\n<p>A module should be responsible to one, and only one, actor<\/p>\n<p>\u2014 Robert C. Martin, Clean Architecture<\/p>\n<\/blockquote>\n<p>\u0414\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u043b\u0438\u0446\u043e\u043c (actor) \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0433\u0440\u0443\u043f\u043f\u0430 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%A1%D1%82%D0%B5%D0%B9%D0%BA%D1%85%D0%BE%D0%BB%D0%B4%D0%B5%D1%80\" rel=\"noopener noreferrer nofollow\">\u0441\u0442\u0435\u0439\u043a\u0445\u043e\u0434\u0435\u0440\u043e\u0432<\/a> (\u043b\u044e\u0434\u0435\u0439 \u0442\u0430\u043a \u0438\u043b\u0438 \u0438\u043d\u0430\u0447\u0435 \u043f\u0440\u0438\u0447\u0430\u0441\u0442\u043d\u044b\u0445 \u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u0438 \u0435\u0451 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e) \u0441 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u044f\u043c\u0438.<\/p>\n<h3>\u0428\u0435\u0441\u0442\u0430\u044f \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0430 SRP<\/h3>\n<p>\u041c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e\u0439 \u0448\u0435\u0441\u0442\u0430\u044f (\u0443\u0436\u0435 \u043c\u043e\u044f) \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0430 SRP:<\/p>\n<blockquote>\n<p>\u041c\u043e\u0434\u0443\u043b\u044c \u0434\u043e\u043b\u0436\u0435\u043d \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u0437\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439 \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0442\u0435\u0439\u043a\u0445\u043e\u043b\u0434\u0435\u0440\u0430.<\/p>\n<p>\u2014 \u0410\u043b\u0435\u043a\u0441\u0435\u0439 \u0416\u0438\u0434\u043a\u043e\u0432, \u041c\u043d\u043e\u0433\u043e\u043b\u0438\u043a\u0438\u0439 \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043e\u0442\u0432\u0435\u0442\u0441\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u0438<\/p>\n<\/blockquote>\n<p>\u042d\u0442\u0430 \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0430 \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u043c\u0443 \u043f\u043e\u043d\u044f\u0442\u0438\u044e &#8212;  &#171;\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0435&#187;. \u041d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u0442\u0435\u0440\u043c\u0438\u043d &#171;\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0435&#187; \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u044c\u0448\u0435 \u0440\u0430\u0437\u043d\u043e\u0447\u0442\u0435\u043d\u0438\u0439,  \u0447\u0435\u043c &#171;\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 \u043b\u0438\u0446\u043e&#187;. &#171;\u0414\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 \u043b\u0438\u0446\u043e&#187; &#8212; \u043a\u0440\u0430\u0439\u043d\u0435 \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u044b\u0439 \u0442\u0435\u0440\u043c\u0438\u043d, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d \u0447\u0430\u0449\u0435  \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438 &#171;\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b&#187;, \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c  UML-\u0435\u043c.<\/p>\n<p>\u0412 \u043c\u043e\u0435\u0439 \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u043f\u043e\u0447\u0435\u043c\u0443 \u043d\u0430\u0434\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u0438 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f  \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f. \u041e\u0434\u043d\u0438 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u043e\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0438\u043c \u0440\u043e\u043b\u044c \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430 \u0411\u0414, \u0430  \u0434\u0440\u0443\u0433\u0438\u0435 &#8212; \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u043e\u043c, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0438\u043c \u0440\u043e\u043b\u044c \u0434\u0438\u0437\u0430\u0439\u043d\u0435\u0440\u0430 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432. \u0422\u0430\u043a\u0436\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u0438 \u043f\u043e\u0447\u0435\u043c\u0443 \u043d\u0430\u0434\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u0438, \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0449\u0438\u0435 \u0437\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e  \u0444\u0443\u043d\u043a\u0446\u0438\u0439 CFO \u0438 COO &#8212; \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u043d\u0438\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043b\u044e\u0434\u044c\u043c\u0438 \u0438\u0437  \u0440\u0430\u0437\u043d\u044b\u0445 \u043e\u0442\u0434\u0435\u043b\u043e\u0432.<\/p>\n<p>\u041d\u043e \u0438 \u0441 \u044d\u0442\u043e\u0439 \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u043e\u0439 \u0435\u0441\u0442\u044c \u043f\u0430\u0440\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u0431\u0443\u0434\u0443\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043f\u043e \u0434\u0432\u0430  \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f &#8212; \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435. \u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u044f \u043d\u0435 \u0432\u0438\u0434\u0435\u043b \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0433\u0434\u0435 \u0431\u044b\u043b\u0438 \u0431\u044b \u0432\u043d\u044f\u0442\u043d\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043d\u044b  \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0438 \u043d\u0435\u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f, \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0442\u0435\u0439\u043a\u0445\u043e\u043b\u0434\u0435\u0440\u043e\u0432 \u0438 \u0438\u0445  \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u0434\u0440\u0443\u0433 \u043a \u0434\u0440\u0443\u0433\u0443.<\/p>\n<p>\u041d\u0438 \u044d\u0442\u0430, \u043d\u0438 \u043b\u044e\u0431\u0430\u044f \u0434\u0440\u0443\u0433\u0430\u044f \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0430 SRP \u043d\u0435 \u0434\u0430\u0451\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430\u043c \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430 \u043a \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044e \u0432 \u043a\u0430\u0436\u0434\u043e\u0434\u043d\u0435\u0432\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u0435. \u041c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c, \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u0435\u0435 \u0440\u0430\u0437\u0431\u0438\u0442\u044c SRP \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0439? \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<ol>\n<li>\n<p>\u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0439\u0442\u0435 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0430\u0446\u0438\u043a\u043b\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0433\u0440\u0430\u0444 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u043c\u0435\u0436\u0434\u0443 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438;<\/p>\n<\/li>\n<li>\n<p>\u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0439\u0442\u0435 \u0432\u0432\u043e\u0434-\u0432\u044b\u0432\u043e\u0434 (\u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 GUI) \u0438 \u0431\u0438\u0437\u043d\u0435\u0441-\u043f\u0440\u0430\u0432\u0438\u043b\u0430;<\/p>\n<\/li>\n<li>\n<p>\u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0439\u0442\u0435 \u043a\u043e\u0434 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0438\u0439 \u0440\u0430\u0437\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b;<\/p>\n<\/li>\n<li>\n<p>\u043f\u0438\u0448\u0438\u0442\u0435 \u0442\u0435\u0441\u0442\u044b. \u0412 \u0442\u0435\u0441\u0442\u0430\u0445 \u043c\u043e\u043a\u0430\u0439\u0442\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0430 system under test \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0439\u0442\u0435 &#171;\u0440\u0443\u043a\u0430\u043c\u0438&#187; (\u0430 \u043d\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e DI-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430).<\/p>\n<\/li>\n<\/ol>\n<p>\u042d\u0442\u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u043d\u0435 \u043d\u0443\u0436\u0434\u0430\u044e\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u043e\u043c \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u0441\u0442\u0435\u0439\u043a\u0445\u043e\u043b\u0434\u0435\u0440\u043e\u0432 \u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439. \u0418 \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u043c \u043c\u043e\u0436\u043d\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0445\u0430\u043d\u0438\u0447\u0435\u0441\u043a\u0438.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0442\u0430\u043a\u0438\u0445 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0439 \u0432 \u043a\u0430\u0436\u0434\u043e\u0434\u043d\u0435\u0432\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u043d\u0430\u043c\u043d\u043e\u0433\u043e  \u0431\u043e\u043b\u0435\u0435 \u0448\u0438\u0440\u043e\u043a\u043e\u043c\u0443 \u043a\u0440\u0443\u0433\u0443 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432 \u0438 \u0442\u0430\u043a\u0436\u0435 \u0434\u0430\u0441\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u0443\u044e \u0438  \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435.<\/p>\n<p>\u041f\u043e\u043c\u0438\u043c\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0445, \u0435\u0441\u0442\u044c \u0435\u0449\u0451 \u043e\u0434\u043d\u0430 \u0432\u0430\u0436\u043d\u0430\u044f \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f:  \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0439\u0442\u0435  &#171;\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443&#187; (\u0434\u043e\u043c\u0435\u043d) \u0438 &#171;\u0441\u043a\u0440\u0438\u043f\u0442\u044b&#187; (\u0444\u0443\u043d\u043a\u0446\u0438\u0438) \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041e\u0431 \u044d\u0442\u043e\u043c \u043f\u0438\u0448\u0443\u0442 \u0438 \u041c\u0430\u0440\u0442\u0438\u043d \u0432 Clean Architecture &#8212; \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439 \u0438  \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u043e\u0440\u043e\u0432, \u0438 \u042d\u0432\u0430\u043d\u0441 \u0432 DDD &#8212; \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439  \u0438 \u0434\u043e\u043c\u0435\u043d\u043d\u044b\u0445 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432. \u041d\u043e \u043d\u0438 \u043e\u043d\u0438, \u043d\u0438 \u044f \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u0434\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043c\u043e\u0436\u043d\u043e  \u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0437\u0430 \u0441\u043e\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0435\u043c \u044d\u0442\u043e\u0439 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u043c\u0435\u0445\u0430\u043d\u0438\u0447\u0435\u0441\u043a\u0438. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043d\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u044e \u0435\u0451 \u0432 \u0440\u044f\u0434 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0445.<\/p>\n<h3>\u041d\u0430 \u0441\u0443\u043a\u0443 \u0432\u0438\u0441\u0438\u0442 \u043c\u043e\u0447\u0430\u043b\u043e, \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0432\u0441\u0451 \u0441\u043d\u0430\u0447\u0430\u043b\u0430<\/h3>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/edd\/e36\/1a5\/edde361a502f9dd712c86b649dedd409.png\" width=\"888\" height=\"499\"><figcaption><\/figcaption><\/figure>\n<p><strong>SOLID relevance, 2020<\/strong><\/p>\n<p>\u041f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043e\u043a \u0438 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u0439 SRP \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c \u044d\u0432\u043e\u043b\u044e\u0446\u0438\u0435\u0439 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f SRP \u0441\u0430\u043c\u0438\u043c \u041c\u0430\u0440\u0442\u0438\u043d\u043e\u043c. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u043b\u044f \u043d\u0435\u0433\u043e SRP \u0431\u044b\u043b \u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u043f\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b. \u041f\u043e\u0442\u043e\u043c \u043e\u043d \u043f\u043e\u043d\u044f\u043b, \u0447\u0442\u043e \u043f\u043e \u0430\u0441\u043f\u0435\u043a\u0442\u0430\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u0434 \u0442\u043e\u0436\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0442\u044c. \u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u0430\u043d\u043a\u043b \u0411\u043e\u0431 \u043e\u0431\u043e\u0431\u0449\u0438\u043b \u0438\u0445 \u0447\u0435\u0440\u0435\u0437 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043b\u0438\u0446.<\/p>\n<p>\u042d\u0442\u043e \u0431\u044b\u043b\u043e \u043e\u0442\u043b\u0438\u0447\u043d\u043e\u0435 \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u0439. \u041f\u043e\u043a\u0430 \u041c\u0430\u0440\u0442\u0438\u043d \u043d\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0441\u0432\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043f\u043e\u0441\u0442 \u043d\u0430 \u0442\u0435\u043c\u0443 SRP. \u0412 \u043d\u0451\u043c \u043e\u043d \u0441\u043d\u043e\u0432\u0430 \u043e\u0442\u043a\u0430\u0442\u0438\u043b\u0441\u044f \u043a \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044e \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e \u0430\u0441\u043f\u0435\u043a\u0442\u0430\u043c:<\/p>\n<blockquote>\n<p>It is hard to imagine that this principle is not relevant in software. We do not mix business rules with GUI code. We do not mix SQL queries with communications protocols.<\/p>\n<p>\u2014 Robert C. Martin, https:\/\/blog.cleancoder.com\/uncle-bob\/2020\/10\/18\/Solid-Relevance.html<\/p>\n<\/blockquote>\n<p>\u0415\u0441\u043b\u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0439 SRP \u0441 \u0432\u044b\u0441\u043e\u0442\u044b &#171;\u043f\u0442\u0438\u0447\u044c\u0435\u0433\u043e \u043f\u043e\u043b\u0451\u0442\u0430&#187;,  \u0442\u043e \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0432\u0438\u0434\u043d\u043e \u0447\u0442\u043e \u0430\u043d\u043a\u043b \u0411\u043e\u0431 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0441\u043a\u0430\u0447\u0435\u0442 \u043c\u0435\u0436\u0434\u0443 \u044d\u0442\u0438\u043c\u0438  \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f\u043c\u0438 \u0434\u0435\u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u043a\u043e\u0434\u0430:<\/p>\n<p>\u0418\u0441\u0442\u043e\u0440\u0438\u044f \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u0439 SRP<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p>\u0413\u043e\u0434<\/p>\n<\/th>\n<th>\n<p>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a<\/p>\n<\/th>\n<th>\n<p>\u041a\u0440\u0438\u0442\u0435\u0440\u0438\u0439 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044f<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p>2003<\/p>\n<\/td>\n<td>\n<p>Agile software development Principles Patterns and Practices<\/p>\n<\/td>\n<td>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438 \u043d\u0430\u043c\u0451\u043a \u043d\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 \u043b\u0438\u0446\u043e*<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>2008<\/p>\n<\/td>\n<td>\n<p>Clean Code<\/p>\n<\/td>\n<td>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>2011<\/p>\n<\/td>\n<td>\n<p>The Clean Coder<\/p>\n<\/td>\n<td>\n<p>\u0410\u0441\u043f\u0435\u043a\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>2014<\/p>\n<\/td>\n<td>\n<p>The Single Responsibility Principle<\/p>\n<\/td>\n<td>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0430\u0441\u043f\u0435\u043a\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 \u043b\u0438\u0446\u043e<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>2018<\/p>\n<\/td>\n<td>\n<p>Clean Architecture<\/p>\n<\/td>\n<td>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 \u043b\u0438\u0446\u043e, \u0432 \u043c\u0435\u043d\u044c\u0448\u0435\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0430\u0441\u043f\u0435\u043a\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438**<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>2020<\/p>\n<\/td>\n<td>\n<p>SOLID Relevance<\/p>\n<\/td>\n<td>\n<p>\u0410\u0441\u043f\u0435\u043a\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p><em>* \u0412 Agile software development Principles Patterns and Practices \u0431\u044b\u043b \u0438 \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0432 \u0433\u043b\u0430\u0432\u0435 \u043f\u0440\u043e SRP.<\/em><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/89d\/b8a\/e98\/89db8ae98ca76a1a4b36881aa2925549.png\" width=\"825\" height=\"305\"><figcaption><\/figcaption><\/figure>\n<blockquote>\n<p><em>Two different applications use the Rectangle class. One application does computational geometry. It uses Rectangle to help it with the mathematics of geometric shapes. It never draws the rectangle on the screen. The other application is graphical in nature. It may also do some computational geometry, but it definitely draws the rectangle on the screen.<\/em><\/p>\n<p><em>\u2014 Robert C. Martin, Agile software development Principles Patterns and Practices<\/em><\/p>\n<\/blockquote>\n<p><em>\u0413\u043b\u044f\u0434\u044f \u043d\u0430 \u044d\u0442\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 (\u0438\u0437 2021 \u0433\u043e\u0434\u0430) \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0439\u0442\u0438 \u043a \u0432\u044b\u0432\u043e\u0434\u0443, \u0447\u0442\u043e \u0443  \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 (\u043e\u0434\u0438\u043d \u0438\u0437 \u0432\u0438\u0434\u043e\u0432 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445  \u043b\u0438\u0446) \u0438 \u043c\u0435\u0442\u043e\u0434\u044b draw \u0438 area \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0442 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043b\u0438\u0446.<\/em><\/p>\n<hr>\n<p><em>** \u0412 Clean Architecture \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e \u0430\u0441\u043f\u0435\u043a\u0442\u0443 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u043e\u0436\u0435  \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 (\u043c\u0435\u0442\u043e\u0434 save, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c\u044b\u0439 CTO). \u041d\u043e \u0432 \u044d\u0442\u043e\u0439 \u043a\u043d\u0438\u0433\u0435 \u041c\u0430\u0440\u0442\u0438\u043d \u0443\u0436\u0435 \u044f\u0432\u043d\u043e \u043d\u0435 \u043f\u0440\u043e\u0433\u043e\u0432\u0430\u0440\u0438\u0432\u0430\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c  \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u043e \u0430\u0441\u043f\u0435\u043a\u0442\u0430\u043c. \u0412 \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u0438 \u0441 \u043d\u0435\u0442\u0438\u043f\u0438\u0447\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u0441\u043b\u043e\u0432\u0430 actor, \u044d\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e  \u0442\u0430\u043a\u043e\u0435 \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0434\u0435\u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044e \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430  \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0441\u0442\u0430\u0442\u044c \u0447\u0435\u0442\u0432\u0451\u0440\u0442\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u0435\u0439 SRP, \u043d\u043e \u0432 \u0436\u0438\u0437\u043d\u0438 \u044f \u0435\u0451 \u043f\u043e\u043a\u0430 \u043d\u0435  \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u043b.<\/em><\/p>\n<hr>\n<p>\u0420\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u0430\u0441\u043f\u0435\u043a\u0442\u0430\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b &#8212; \u044d\u0442\u043e \u043d\u0435 \u0434\u0432\u0435 \u0440\u0430\u0437\u043d\u044b\u0435 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u043d\u0430 \u043e\u0434\u0438\u043d \u043f\u0440\u0438\u043d\u0446\u0438\u043f. \u042d\u0442\u043e \u0434\u0432\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430 \u0434\u0435\u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0435\u0434\u0443\u0442 \u043a \u0440\u0430\u0437\u043d\u044b\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c.<\/p>\n<h4>\u0420\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u0434\u0430 \u043f\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 != \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044e \u043a\u043e\u0434\u0430 \u043f\u043e \u0430\u0441\u043f\u0435\u043a\u0442\u0430\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438<\/h4>\n<p>\u041c\u043e\u0436\u043d\u043e  \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0442\u044c SQL \u0438 JSP \u0438 \u0432\u0441\u0451 \u0435\u0449\u0451 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u043a\u043e\u0434 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445  \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445 \u0438 \u043b\u043e\u043c\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u0434\u043d\u0438\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043f\u0440\u0438 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439  \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.<\/p>\n<p>\u0418 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442, \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0432\u0435\u0441\u0442\u0438 \u043f\u043e \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u0443 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f  \u0438\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0432 \u043e\u0434\u0438\u043d \u043c\u0435\u0442\u043e\u0434 \u0438 \u043f\u0430\u0440\u0441\u0438\u043d\u0433 json-\u0430, \u0438  \u0431\u0438\u0437\u043d\u0435\u0441-\u043f\u0440\u0430\u0432\u0438\u043b\u0430, \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u0412 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0445\u0440\u0443\u043f\u043a\u0438\u0439 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0442\u0440\u0443\u0434\u043d\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c.<\/p>\n<p>\u0410\u0441\u043f\u0435\u043a\u0442\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u0441\u0430\u043c\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c &#8212; \u043e\u0440\u0442\u043e\u0433\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u0441\u0438 \u0434\u0435\u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u043a\u043e\u0434\u0430.<\/p>\n<p>SRP \u043d\u0430\u0440\u0443\u0448\u0430\u0435\u0442 \u043e\u0434\u043d\u0443 \u0438\u0437 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u0439 \u0438 \u0441\u043c\u0435\u0448\u0438\u0432\u0430\u0435\u0442 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0430\u0441\u043f\u0435\u043a\u0442\u044b \u0434\u0438\u0437\u0430\u0439\u043d\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c. \u0417\u0430\u0447\u0435\u043c \u0430\u043d\u043a\u043b \u0411\u043e\u0431 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u043b \u0434\u0432\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430 \u0432 \u043e\u0434\u0438\u043d &#8212; \u044f \u043d\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u044e. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043e\u043d \u0441\u0430\u043c \u043d\u0435 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043d\u044f\u043b, \u0447\u0442\u043e \u043a\u043e\u0434 \u043d\u0430\u0434\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0442\u044c \u0438 \u043f\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0438 \u043f\u043e \u0430\u0441\u043f\u0435\u043a\u0442\u0430\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u0430 \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u043d\u044f\u043b  &#8212; SOLID \u0441\u0442\u0430\u043b  \u0443\u0436\u0435 \u0431\u0440\u0435\u043d\u0434\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b\u043b\u043e \u0436\u0430\u043b\u044c \u0442\u0435\u0440\u044f\u0442\u044c.<\/p>\n<p>\u041c\u043e\u0436\u0435\u043c \u043b\u0438 \u043c\u044b \u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043f\u0440\u0438\u043d\u0446\u0438\u043f, \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0430 \u0438 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0435 \u0442\u0440\u0438 \u0433\u043e\u0434\u0430? \u042f \u0434\u0443\u043c\u0430\u044e \u043d\u0435\u0442.<\/p>\n<h3>\u041d\u0430\u043c \u043d\u0443\u0436\u043d\u044b \u043d\u043e\u0432\u044b\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b<\/h3>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u043c\u044b \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043c \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e:<\/p>\n<ul>\n<li>\n<p>\u0432\u043e\u043e\u0431\u0449\u0435, \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 SRP. \u0420\u0430\u0437\u043d\u044b\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043f\u043e\u043d\u0438\u043c\u0430\u044e\u0442 \u043f\u043e\u0434 \u044d\u0442\u043e\u0439 \u0430\u0431\u0431\u0440\u0435\u0432\u0438\u0430\u0442\u0443\u0440\u043e\u0439 \u0440\u0430\u0437\u043d\u044b\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u0434\u0438\u0437\u0430\u0439\u043d\u0430. \u0414\u0430\u0436\u0435 \u0441\u0430\u043c \u041c\u0430\u0440\u0442\u0438\u043d \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043f\u043e-\u0440\u0430\u0437\u043d\u043e\u043c\u0443 \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u0443\u0435\u0442 \u0438 \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 SRP;<\/p>\n<\/li>\n<li>\n<p>\u0442\u043e, \u0447\u0442\u043e \u043c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0412\u0435\u0440\u043d\u043e\u0439 \u0412\u0435\u0440\u0441\u0438\u0435\u0439 SRP, \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435. \u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0436\u0438\u0437\u043d\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0443  \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u0442.<\/p>\n<\/li>\n<li>\n<p>\u0430  \u0435\u0441\u043b\u0438 \u0431\u044b \u0438 \u0434\u0435\u043b\u0430\u043b\u0438, \u0442\u043e SRP-\u0438\u0434\u0435\u0430\u043b \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u0431\u044b\u043b \u0431\u044b \u043d\u0435\u0434\u043e\u0441\u0442\u0438\u0436\u0438\u043c. \u0422\u0430\u043a \u043a\u0430\u043a \u0443 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043a\u043e\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0434\u0432\u0435 \u043f\u0440\u0438\u0447\u0438\u043d\u044b \u0434\u043b\u044f  \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f &#8212; \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u0441\u043f\u043e\u0441\u043e\u0431\u0443  \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u0418 \u0445\u043e\u0442\u044f SRP \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0430\u043c\u044b\u043c \u043d\u0435\u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u044b\u043c \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u043e\u043c SOLID-\u0430, \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435  \u0447\u0435\u0442\u044b\u0440\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430 \u0442\u043e\u0436\u0435 \u0438\u043c\u0435\u044e\u0442 \u0440\u0430\u0437\u043d\u043e\u0447\u0442\u0435\u043d\u0438\u044f \u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u043d\u0430  \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043d\u0435 \u0434\u0443\u043c\u0430\u044e, \u0447\u0442\u043e SOLID \u0432 \u0441\u0432\u043e\u0451\u043c \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u0432\u0438\u0434\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0445\u043e\u0440\u043e\u0448\u0438\u043c  \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e\u043c \u043f\u043e \u0434\u0438\u0437\u0430\u0439\u043d\u0443 \u0441\u0438\u0441\u0442\u0435\u043c.<\/p>\n<p>\u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u0432 SOLID \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u0445\u043e\u0440\u043e\u0448\u0438\u0445 \u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u0438\u0434\u0435\u0439,  \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043d\u0435 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0443\u043f\u0440\u0430\u0437\u0434\u043d\u0438\u0442\u044c \u0435\u0433\u043e &#8212; \u044f \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0435\u0433\u043e \u0440\u0435\u0441\u0442\u0430\u0432\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \u0410\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u0434\u0435\u0438 \u0432\u044b\u0447\u043b\u0435\u043d\u0438\u0442\u044c, \u0443\u0442\u043e\u0447\u043d\u0438\u0442\u044c \u0438 \u043f\u0440\u043e\u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0445\u043e\u0440\u043e\u0448\u0438\u043c\u0438  \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438. \u0422\u043e, \u0447\u0442\u043e \u043f\u043e\u0442\u0435\u0440\u044f\u043b\u043e \u0441\u0432\u043e\u044e \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0441\u0442\u044c &#8212; \u0443\u0431\u0440\u0430\u0442\u044c.<\/p>\n<p>\u0418 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 &#8212; \u043d\u0435 \u0437\u0430\u0433\u043e\u043d\u044f\u0442\u044c \u0441\u0435\u0431\u044f \u0432 \u0440\u0430\u043c\u043a\u0438 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0438\u0437 \u043f\u0435\u0440\u0432\u044b\u0445 \u0431\u0443\u043a\u0432 \u043d\u043e\u0432\u044b\u0445 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0439 \u0430\u043a\u0440\u043e\u043d\u0438\u043c.<\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/565158\/\"> https:\/\/habr.com\/ru\/post\/565158\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<p><em>\u042d\u0442\u043e\u0442 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f <\/em><a href=\"https:\/\/azhidkov.pro\/posts\/21\/06\/210626-srp-interpretations\/\" rel=\"noopener noreferrer nofollow\"><em>\u043a\u0440\u043e\u0441\u0441-\u043f\u043e\u0441\u0442\u043e\u043c<\/em><\/a><em> <\/em><\/p>\n<p>\u041a\u0430\u0436\u0435\u0442\u0441\u044f, \u043b\u044e\u0431\u043e\u0439 &#171;\u0441\u043e\u043b\u0438\u0434\u043d\u044b\u0439&#187; \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u0437\u043d\u0430\u0435\u0442 \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 SOLID \u0432\u043e\u043e\u0431\u0449\u0435 \u0438 \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u0438 (SRP) \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438.<\/p>\n<details class=\"spoiler\">\n<summary>\u0421\u043f\u043e\u0439\u043b\u0435\u0440, \u0435\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u043d\u0435 \u0437\u043d\u0430\u0435\u0442\u0435<\/summary>\n<div class=\"spoiler__content\">\n<p>SOLID &#8212; \u044d\u0442\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u043e\u0432  \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0434\u0438\u0437\u0430\u0439\u043d\u0430, \u0441\u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0420\u043e\u0431\u0435\u0440\u0442\u043e\u043c \u041c\u0430\u0440\u0442\u0438\u043d\u043e\u043c,  \u0442\u0430\u043a \u0436\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u043c \u043a\u0430\u043a \u0430\u043d\u043a\u043b \u0411\u043e\u0431. \u041f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u0437\u0432\u0443\u0447\u0430\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<ol>\n<li>\n<p><strong>S<\/strong>ingle Responsibility Principle: A module should have one, and only one, reason to change.<\/p>\n<\/li>\n<li>\n<p><strong>O<\/strong>pen\/Closed Principle:: A software artifact should be open for extension but closed for modification.<\/p>\n<\/li>\n<li>\n<p><strong>L<\/strong>iskov  Substitution Principle:: What is wanted here is something like the  following substitution property: If for each object o1 of type S there  is an object o2 of type T such that for all programs P defined in terms  of T, the behavior of P is unchanged when o1 is substituted for o2 then S  is a subtype of T<\/p>\n<\/li>\n<li>\n<p><strong>I<\/strong>nterface Segregation Principle:: Clients should not be forced to depend upon interfaces that they do not use.<\/p>\n<\/li>\n<li>\n<p><strong>D<\/strong>ependency Inversion Principle::<\/p>\n<ol>\n<li>\n<p>High level modules should not depend upon low level modules. both should depend upon abstractions.<\/p>\n<\/li>\n<li>\n<p>Abstractions should not depend upon details. details should depend upon abstractions.<\/p>\n<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<\/div>\n<\/details>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0440\u0435\u0447\u044c \u0437\u0430\u0445\u043e\u0434\u0438\u0442 \u043e\u0431 SRP, \u044f \u0432\u0441\u0435\u0433\u0434\u0430 \u0443\u0442\u043e\u0447\u043d\u044f\u044e, \u0447\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0438\u043c\u0435\u0435\u0442 \u0432\u0432\u0438\u0434\u0443 \u043c\u043e\u0439 \u0441\u043e\u0431\u0435\u0441\u0435\u0434\u043d\u0438\u043a. \u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0443 SRP \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043f\u044f\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0445 \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043e\u043a \u0438 \u0442\u0440\u0438 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u0438. \u0418 \u044f \u043d\u0435 \u0434\u0443\u043c\u0430\u044e, \u0447\u0442\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u0430\u044f \u044d\u043c\u043c\u2026\u200b \u0448\u0442\u0443\u043a\u043e\u0432\u0438\u043d\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0445\u043e\u0440\u043e\u0448\u0438\u043c \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e\u043c \u043f\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u041f\u041e.<\/p>\n<h3>\u0424\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0438 SRP<\/h3>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u043d\u0435\u0432\u0435\u0440\u043d\u0443\u044e, \u043d\u043e \u0441\u0430\u043c\u0443\u044e \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0443\u044e \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0443:<\/p>\n<blockquote>\n<p>\u041a\u043b\u0430\u0441\u0441 \u0434\u043e\u043b\u0436\u0435\u043d \u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0434\u043d\u0443 \u0432\u0435\u0449\u044c<\/p>\n<p>\u2014 \u043d\u0430\u0440\u043e\u0434<\/p>\n<\/blockquote>\n<p>\u041a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432\u0442\u043e\u0440\u0438\u0442 \u0438 \u0440\u0443\u0441\u0441\u043a\u0430\u044f \u0432\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u044f:<\/p>\n<blockquote>\n<p>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0412\u0441\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u0435\u0433\u043e \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u0435\u043d\u0438\u044f, \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0432 \u044d\u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0441 \u0438 \u043f\u043e\u0434\u0447\u0438\u043d\u0435\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435.<\/p>\n<p>\u2014 \u0412\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u044f, https:\/\/ru.wikipedia.org\/wiki\/SOLID_(\u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435_\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435)<\/p>\n<\/blockquote>\n<p>\u0425\u043e\u0442\u044f \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0442\u043e\u0439 \u0436\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043e\u0434\u043d\u0443 \u0438\u0437 \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043e\u043a \u041c\u0430\u0440\u0442\u0438\u043d\u0430.<\/p>\n<p>\u0412\u043e\u043e\u0431\u0449\u0435, \u0442\u0430\u043a\u043e\u0439 \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u0435\u0441\u0442\u044c &#8212; \u044d\u0442\u043e \u043e\u0434\u0438\u043d \u0438\u0437 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u043e\u0432 \u0444\u0438\u043b\u043e\u0441\u043e\u0444\u0438\u0438 Unix. \u041d\u043e \u0441\u0430\u043c \u041c\u0430\u0440\u0442\u0438\u043d \u043f\u0438\u0448\u0435\u0442 \u0432 \u0427\u0438\u0441\u0442\u043e\u0439 \u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435, \u0447\u0442\u043e \u044d\u0442\u043e \u043d\u0435 SRP:<\/p>\n<blockquote>\n<p>It is too easy for programmers to hear the name and then assume that it means that every module should do just one thing.<\/p>\n<p>Make no mistake, there is a principle like that. [\u2026\u200b] But it is not one of the SOLID principles \u2014 it is not the SRP.<\/p>\n<p>\u2014 Robert C. Martin, Clean Architecture<\/p>\n<\/blockquote>\n<hr>\n<p>\u0421\u0430\u043c \u041c\u0430\u0440\u0442\u0438\u043d \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u0443\u0435\u0442 SRP \u0442\u0440\u0435\u043c\u044f \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438:<\/p>\n<p>\u0424\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0430 2003 \u0433\u043e\u0434\u0430<\/p>\n<blockquote>\n<p>The Single Responsibility Principle (SRP) states that a class or module should have one, and only one, reason to change<\/p>\n<p>\u2014 Robert C. Martin, Agile software development Principles Patterns and Practices<\/p>\n<\/blockquote>\n<p>\u0424\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0430 2014 \u0433\u043e\u0434\u0430<\/p>\n<blockquote>\n<p>Gather together the things that change for the same reasons. Separate those things that change for different reasons.<\/p>\n<p>\u2014 Robert C. Martin, The Single Responsibility Principle<\/p>\n<\/blockquote>\n<p>\u0424\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0430 2018 \u0433\u043e\u0434\u0430<\/p>\n<blockquote>\n<p>A module should be responsible to one, and only one, actor<\/p>\n<p>\u2014 Robert C. Martin, Clean Architecture<\/p>\n<\/blockquote>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u0443 \u043d\u0438\u0445 \u043e\u0431\u0449\u0435\u0433\u043e, \u043c\u043d\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u043f\u043e \u0442\u0440\u0438 \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0439 \u041c\u0430\u0440\u0442\u0438\u043d\u0430 \u043e\u0431 SRP. \u0412\u044b \u0436\u0435 \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u0435 \u0434\u0435\u043d\u044c-\u0434\u0432\u0430 \u0436\u0438\u0437\u043d\u0438 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u043e\u0442\u0432\u0435\u0442 \u0437\u0430 \u043f\u044f\u0442\u043d\u0430\u0434\u0446\u0430\u0442\u044c \u043c\u0438\u043d\u0443\u0442, \u0435\u0441\u043b\u0438 \u0434\u043e\u0447\u0438\u0442\u0430\u0435\u0442\u0435 \u043f\u043e\u0441\u0442 \u0434\u043e \u043a\u043e\u043d\u0446\u0430.<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u0430\u043a \u0430\u043d\u043a\u043b \u0411\u043e\u0431 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442 SRP \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044c \u043b\u0435\u0442.<\/p>\n<h3>\u041e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u044f SRP<\/h3>\n<p><strong>Agile software development Principles Patterns and Practices, 2003<\/strong><\/p>\n<p><em>\u041b\u044e\u0431\u043e\u043f\u044b\u0442\u043d\u044b\u0439 \u0444\u0430\u043a\u0442 &#8212; SRP \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043d\u0430 \u0432\u043e\u0441\u0435\u043c\u044c \u043b\u0435\u0442 \u043f\u043e\u0437\u0436\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u043e\u0432 SOLID, \u0438 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0431\u044b\u043b \u0434\u0440\u0443\u0433\u043e\u0439 &#8212; OLDI. \u0410 \u0430\u043a\u0440\u043e\u043d\u0438\u043c SOLID \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043b \u043d\u0435 \u0430\u043d\u043a\u043b \u0411\u043e\u0431, \u0430 \u041c\u0430\u0439\u043a\u043b \u0424\u044d\u0437\u0435\u0440\u0441.<\/em><\/p>\n<p>\u0412\u043f\u0435\u0440\u0432\u044b\u0435 SRP \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0432 <a href=\"https:\/\/www.amazon.com\/Software-Development-Principles-Patterns-Practices\/dp\/0135974445\" rel=\"noopener noreferrer nofollow\">Agile software development Principles Patterns and Practices<\/a>. \u0412 \u044d\u0442\u043e\u0439 \u043a\u043d\u0438\u0433\u0435 \u041c\u0430\u0440\u0442\u0438\u043d \u043f\u043e\u044f\u0441\u043d\u044f\u043b \u0435\u0433\u043e \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 <strong>\u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b<\/strong>:<\/p>\n<blockquote>\n<p>Consider the bowling game from  Chapter 6. For most of its development the Game class was handling two separate  responsibilities. It was keeping track of the current frame, and it was calculating the  score. In the end, RCM and RSK separated these two responsibilities into two  classes. The Game kept the responsibility to keep track of frames, and the Scorer  got the responsibility to calculate the score. (see page 85.)<\/p>\n<p>\u2014 Robert C. Martin, Agile software development Principles Patterns and Practices<\/p>\n<\/blockquote>\n<p><strong>Clean Code, 2008<\/strong><\/p>\n<p>\u041f\u043e\u044f\u0441\u043d\u044f\u0442\u044c SRP \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u043f\u043e <strong>\u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b<\/strong> \u041c\u0430\u0440\u0442\u0438\u043d \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u0442 \u0438 \u0432 <a href=\"https:\/\/www.amazon.com\/Clean-Code-Handbook-Software-Craftsmanship\/dp\/0132350882\" rel=\"noopener noreferrer nofollow\">Clean Code<\/a>:<\/p>\n<pre><code class=\"java\">public class SuperDashboard extends JFrame implements MetaDataUser {     public Component getLastFocusedComponent()     public void setLastFocused(Component lastFocused)     public int getMajorVersionNumber()     public int getMinorVersionNumber()     public int getBuildNumber(); }<\/code><\/pre>\n<blockquote>\n<p>The seemingly small SuperDashboard class in Listing 10-2 has two reasons to change. First, it tracks version information that would seemingly need to be updated every time the software gets shipped. Second, it manages Java Swing components (it is a derivative of JFrame, the Swing representation of a top-level GUI window)<\/p>\n<p>\u2014 Robert C. Martin, Clean Code<\/p>\n<\/blockquote>\n<p><strong>The Clean Coder, 2011<\/strong><\/p>\n<p>\u0417\u0430\u0442\u0435\u043c \u0432 <a href=\"https:\/\/www.amazon.com\/Clean-Coder-Conduct-Professional-Programmers\/dp\/0137081073\/ref=pd_sim_5\/131-9122726-9479409?pd_rd_w=0NdTd&amp;pf_rd_p=d88e414a-c661-4436-b6ed-003c19da9b92&amp;pf_rd_r=6FTHCEPHBC1138C43SJ9&amp;pd_rd_r=28244df1-86a2-478b-85b3-5e3542ecf45b&amp;pd_rd_wg=H5iaV&amp;pd_rd_i=0137081073&amp;psc=1\" rel=\"noopener noreferrer nofollow\">The Clean Coder<\/a> \u0430\u043d\u043a\u043b \u0411\u043e\u0431 \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 SRP \u0443\u0436\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044f <strong>\u0430\u0441\u043f\u0435\u043a\u0442\u043e\u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438<\/strong> (\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0438 \u0431\u0438\u0437\u043d\u0435\u0441-\u043f\u0440\u0430\u0432\u0438\u043b):<\/p>\n<blockquote>\n<p>There is a design principle  called the Single Responsibility Principle (SRP). This principle states that you should separate those things that change  for different reasons, and group together those things that change for  the same reasons. GUIs are no exception.<\/p>\n<p>The layout, format, and workflow of the GUI will change for aesthetic  and efficiency reasons, but the underlying capability of the GUI will  remain the same.<\/p>\n<p>[&#8230;]<\/p>\n<p>Design experts have been telling us for decades to separate our GUIs from our business rules.<\/p>\n<p>\u2014 Robert C. Martin, The Clean Coder<\/p>\n<\/blockquote>\n<p><strong>The Single Responsibility Principle, 2014<\/strong><\/p>\n<p>\u0412 <a href=\"https:\/\/blog.cleancoder.com\/uncle-bob\/2014\/05\/08\/SingleReponsibilityPrinciple.html\" rel=\"noopener noreferrer nofollow\">\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439<\/a> \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u043e SRP \u0430\u043d\u043a\u043b \u0411\u043e\u0431 \u0443\u0436\u0435 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0442\u0435\u0440\u043c\u0438\u043d &#171;\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 <strong>\u0430\u0441\u043f\u0435\u043a\u0442\u043e\u0432 [\u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438]<\/strong>&#187; (separation of concerns):<\/p>\n<blockquote>\n<p>Two years later, Edsger Dijkstra  wrote another classic paper entitled On the role of scientific thought.  in which he introduced the term: The Separation of Concerns. [&#8230;] This is the reason we do not put SQL in JSPs. This is the reason we do not generate HTML in the modules that compute  results. This is the reason that business rules should not know the database  schema. This is the reason we separate concerns.<\/p>\n<p>\u2014 Robert C. Martin, https:\/\/blog.cleancoder.com\/uncle-bob\/2014\/05\/08\/SingleReponsibilityPrinciple.html<\/p>\n<\/blockquote>\n<p>\u041d\u043e \u0437\u0434\u0435\u0441\u044c \u0436\u0435, \u041c\u0430\u0440\u0442\u0438\u043d \u0432\u043f\u0435\u0440\u0432\u044b\u0435 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442 SRP \u0441\u043e\u0432\u0441\u0435\u043c \u0432 \u0434\u0440\u0443\u0433\u043e\u043c \u043a\u043b\u044e\u0447\u0435:<\/p>\n<blockquote>\n<p>And this gets to the crux of the Single Responsibility Principle. This principle is about people.<\/p>\n<p>When you write a software module, you want to make sure that when  changes are requested, those changes can only originate from a single  person, or rather, a single tightly coupled group of people representing  a single narrowly defined business function.<\/p>\n<p>\u2014 Robert C. Martin, https:\/\/blog.cleancoder.com\/uncle-bob\/2014\/05\/08\/SingleReponsibilityPrinciple.html<\/p>\n<\/blockquote>\n<p>\u0417\u0434\u0435\u0441\u044c \u0443\u0436\u0435 \u0440\u0435\u0447\u044c \u0438\u0434\u0451\u0442 \u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u043a\u043e\u0434\u0430 \u043f\u043e <strong>\u043b\u044e\u0434\u044f\u043c<\/strong>.<\/p>\n<p><strong>Clean Architecture, 2018<\/strong><\/p>\n<p>\u0412 \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0436\u0435 \u0444\u043e\u0440\u043c\u0435 \u044d\u0442\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0435 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0435\u0449\u0451 \u0447\u0435\u0440\u0435\u0437 \u0447\u0435\u0442\u044b\u0440\u0435 \u0433\u043e\u0434\u0430 \u0432 <a href=\"https:\/\/www.amazon.com\/Clean-Architecture-Craftsmans-Software-Structure\/dp\/0134494164\/ref=pd_sim_1\/131-9122726-9479409?pd_rd_w=Kj7C7&amp;pf_rd_p=d88e414a-c661-4436-b6ed-003c19da9b92&amp;pf_rd_r=0ZQVJKRJ6VFKKPXGBRJA&amp;pd_rd_r=664e0c37-918c-4613-b12d-6e758d26e96b&amp;pd_rd_wg=DAys9&amp;pd_rd_i=0134494164&amp;psc=1\" rel=\"noopener noreferrer nofollow\">Clean Architecture<\/a>:<\/p>\n<blockquote>\n<p>A module should be responsible to one, and only one, actor<\/p>\n<p>\u2014 Robert C. Martin, Clean Architecture<\/p>\n<\/blockquote>\n<p>\u0414\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u043b\u0438\u0446\u043e\u043c (actor) \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0433\u0440\u0443\u043f\u043f\u0430 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%A1%D1%82%D0%B5%D0%B9%D0%BA%D1%85%D0%BE%D0%BB%D0%B4%D0%B5%D1%80\" rel=\"noopener noreferrer nofollow\">\u0441\u0442\u0435\u0439\u043a\u0445\u043e\u0434\u0435\u0440\u043e\u0432<\/a> (\u043b\u044e\u0434\u0435\u0439 \u0442\u0430\u043a \u0438\u043b\u0438 \u0438\u043d\u0430\u0447\u0435 \u043f\u0440\u0438\u0447\u0430\u0441\u0442\u043d\u044b\u0445 \u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u0438 \u0435\u0451 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e) \u0441 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u044f\u043c\u0438.<\/p>\n<h3>\u0428\u0435\u0441\u0442\u0430\u044f \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0430 SRP<\/h3>\n<p>\u041c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e\u0439 \u0448\u0435\u0441\u0442\u0430\u044f (\u0443\u0436\u0435 \u043c\u043e\u044f) \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0430 SRP:<\/p>\n<blockquote>\n<p>\u041c\u043e\u0434\u0443\u043b\u044c \u0434\u043e\u043b\u0436\u0435\u043d \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u0437\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439 \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0442\u0435\u0439\u043a\u0445\u043e\u043b\u0434\u0435\u0440\u0430.<\/p>\n<p>\u2014 \u0410\u043b\u0435\u043a\u0441\u0435\u0439 \u0416\u0438\u0434\u043a\u043e\u0432, \u041c\u043d\u043e\u0433\u043e\u043b\u0438\u043a\u0438\u0439 \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043e\u0442\u0432\u0435\u0442\u0441\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u0438<\/p>\n<\/blockquote>\n<p>\u042d\u0442\u0430 \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0430 \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u043c\u0443 \u043f\u043e\u043d\u044f\u0442\u0438\u044e &#8212;  &#171;\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0435&#187;. \u041d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u0442\u0435\u0440\u043c\u0438\u043d &#171;\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0435&#187; \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u044c\u0448\u0435 \u0440\u0430\u0437\u043d\u043e\u0447\u0442\u0435\u043d\u0438\u0439,  \u0447\u0435\u043c &#171;\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 \u043b\u0438\u0446\u043e&#187;. &#171;\u0414\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 \u043b\u0438\u0446\u043e&#187; &#8212; \u043a\u0440\u0430\u0439\u043d\u0435 \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u044b\u0439 \u0442\u0435\u0440\u043c\u0438\u043d, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d \u0447\u0430\u0449\u0435  \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438 &#171;\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b&#187;, \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c  UML-\u0435\u043c.<\/p>\n<p>\u0412 \u043c\u043e\u0435\u0439 \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u043f\u043e\u0447\u0435\u043c\u0443 \u043d\u0430\u0434\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u0438 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f  \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f. \u041e\u0434\u043d\u0438 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u043e\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0438\u043c \u0440\u043e\u043b\u044c \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430 \u0411\u0414, \u0430  \u0434\u0440\u0443\u0433\u0438\u0435 &#8212; \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u043e\u043c, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0438\u043c \u0440\u043e\u043b\u044c \u0434\u0438\u0437\u0430\u0439\u043d\u0435\u0440\u0430 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432. \u0422\u0430\u043a\u0436\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u0438 \u043f\u043e\u0447\u0435\u043c\u0443 \u043d\u0430\u0434\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u0438, \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0449\u0438\u0435 \u0437\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e  \u0444\u0443\u043d\u043a\u0446\u0438\u0439 CFO \u0438 COO &#8212; \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u043d\u0438\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043b\u044e\u0434\u044c\u043c\u0438 \u0438\u0437  \u0440\u0430\u0437\u043d\u044b\u0445 \u043e\u0442\u0434\u0435\u043b\u043e\u0432.<\/p>\n<p>\u041d\u043e \u0438 \u0441 \u044d\u0442\u043e\u0439 \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u043e\u0439 \u0435\u0441\u0442\u044c \u043f\u0430\u0440\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u0431\u0443\u0434\u0443\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043f\u043e \u0434\u0432\u0430  \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f &#8212; \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435. \u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u044f \u043d\u0435 \u0432\u0438\u0434\u0435\u043b \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0433\u0434\u0435 \u0431\u044b\u043b\u0438 \u0431\u044b \u0432\u043d\u044f\u0442\u043d\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043d\u044b  \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0438 \u043d\u0435\u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f, \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0442\u0435\u0439\u043a\u0445\u043e\u043b\u0434\u0435\u0440\u043e\u0432 \u0438 \u0438\u0445  \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u0434\u0440\u0443\u0433 \u043a \u0434\u0440\u0443\u0433\u0443.<\/p>\n<p>\u041d\u0438 \u044d\u0442\u0430, \u043d\u0438 \u043b\u044e\u0431\u0430\u044f \u0434\u0440\u0443\u0433\u0430\u044f \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0430 SRP \u043d\u0435 \u0434\u0430\u0451\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430\u043c \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430 \u043a \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044e \u0432 \u043a\u0430\u0436\u0434\u043e\u0434\u043d\u0435\u0432\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u0435. \u041c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c, \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u0435\u0435 \u0440\u0430\u0437\u0431\u0438\u0442\u044c SRP \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0439? \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<ol>\n<li>\n<p>\u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0439\u0442\u0435 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0430\u0446\u0438\u043a\u043b\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0433\u0440\u0430\u0444 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u043c\u0435\u0436\u0434\u0443 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438;<\/p>\n<\/li>\n<li>\n<p>\u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0439\u0442\u0435 \u0432\u0432\u043e\u0434-\u0432\u044b\u0432\u043e\u0434 (\u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 GUI) \u0438 \u0431\u0438\u0437\u043d\u0435\u0441-\u043f\u0440\u0430\u0432\u0438\u043b\u0430;<\/p>\n<\/li>\n<li>\n<p>\u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0439\u0442\u0435 \u043a\u043e\u0434 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0438\u0439 \u0440\u0430\u0437\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b;<\/p>\n<\/li>\n<li>\n<p>\u043f\u0438\u0448\u0438\u0442\u0435 \u0442\u0435\u0441\u0442\u044b. \u0412 \u0442\u0435\u0441\u0442\u0430\u0445 \u043c\u043e\u043a\u0430\u0439\u0442\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0430 system under test \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0439\u0442\u0435 &#171;\u0440\u0443\u043a\u0430\u043c\u0438&#187; (\u0430 \u043d\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e DI-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430).<\/p>\n<\/li>\n<\/ol>\n<p>\u042d\u0442\u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u043d\u0435 \u043d\u0443\u0436\u0434\u0430\u044e\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u043e\u043c \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u0441\u0442\u0435\u0439\u043a\u0445\u043e\u043b\u0434\u0435\u0440\u043e\u0432 \u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439. \u0418 \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u043c \u043c\u043e\u0436\u043d\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0445\u0430\u043d\u0438\u0447\u0435\u0441\u043a\u0438.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0442\u0430\u043a\u0438\u0445 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0439 \u0432 \u043a\u0430\u0436\u0434\u043e\u0434\u043d\u0435\u0432\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u043d\u0430\u043c\u043d\u043e\u0433\u043e  \u0431\u043e\u043b\u0435\u0435 \u0448\u0438\u0440\u043e\u043a\u043e\u043c\u0443 \u043a\u0440\u0443\u0433\u0443 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432 \u0438 \u0442\u0430\u043a\u0436\u0435 \u0434\u0430\u0441\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u0443\u044e \u0438  \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435.<\/p>\n<p>\u041f\u043e\u043c\u0438\u043c\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0445, \u0435\u0441\u0442\u044c \u0435\u0449\u0451 \u043e\u0434\u043d\u0430 \u0432\u0430\u0436\u043d\u0430\u044f \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f:  \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0439\u0442\u0435  &#171;\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443&#187; (\u0434\u043e\u043c\u0435\u043d) \u0438 &#171;\u0441\u043a\u0440\u0438\u043f\u0442\u044b&#187; (\u0444\u0443\u043d\u043a\u0446\u0438\u0438) \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041e\u0431 \u044d\u0442\u043e\u043c \u043f\u0438\u0448\u0443\u0442 \u0438 \u041c\u0430\u0440\u0442\u0438\u043d \u0432 Clean Architecture &#8212; \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439 \u0438  \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u043e\u0440\u043e\u0432, \u0438 \u042d\u0432\u0430\u043d\u0441 \u0432 DDD &#8212; \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439  \u0438 \u0434\u043e\u043c\u0435\u043d\u043d\u044b\u0445 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432. \u041d\u043e \u043d\u0438 \u043e\u043d\u0438, \u043d\u0438 \u044f \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u0434\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043c\u043e\u0436\u043d\u043e  \u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0437\u0430 \u0441\u043e\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0435\u043c \u044d\u0442\u043e\u0439 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u043c\u0435\u0445\u0430\u043d\u0438\u0447\u0435\u0441\u043a\u0438. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043d\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u044e \u0435\u0451 \u0432 \u0440\u044f\u0434 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0445.<\/p>\n<h3>\u041d\u0430 \u0441\u0443\u043a\u0443 \u0432\u0438\u0441\u0438\u0442 \u043c\u043e\u0447\u0430\u043b\u043e, \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0432\u0441\u0451 \u0441\u043d\u0430\u0447\u0430\u043b\u0430<\/h3>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p><strong>SOLID relevance, 2020<\/strong><\/p>\n<p>\u041f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043e\u043a \u0438 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u0439 SRP \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c \u044d\u0432\u043e\u043b\u044e\u0446\u0438\u0435\u0439<\/p>\n<\/hr>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-325635","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/325635","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=325635"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/325635\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=325635"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=325635"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=325635"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}