{"id":287690,"date":"2018-08-16T14:14:46","date_gmt":"2018-08-16T10:14:46","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=287690"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=287690","title":{"rendered":"Clean architecture \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u043a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438"},"content":{"rendered":"\n<div data-io-article-url=\"https:\/\/habr.com\/post\/419173\/\" class=\"post__text post__text-html js-mediator-article\">\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442. \u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u0441\u0442\u0430\u0442\u0435\u0439 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043d\u0430 \u0442\u0435\u043c\u0443 clean architecture. \u0422\u043e \u0435\u0441\u0442\u044c \u0447\u0438\u0441\u0442\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0443\u0434\u043e\u0431\u043d\u044b\u0435 \u0432 \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0435\u043d\u0438\u0438 \u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438. \u041f\u0440\u043e \u0441\u0430\u043c\u0443 \u0447\u0438\u0441\u0442\u0443\u044e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 \u0442\u0430\u043a\u0438\u0445 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u0442\u0430\u0442\u044c\u044f\u0445 \u043a\u0430\u043a: <a href=\"https:\/\/habr.com\/company\/mobileup\/blog\/335382\/\">\u0417\u0430\u0431\u043b\u0443\u0436\u0434\u0435\u043d\u0438\u044f Clean Architecture<\/a> \u0438\u043b\u0438 <a href=\"https:\/\/habr.com\/post\/269589\/\">\u0427\u0438\u0441\u0442\u0430\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430<\/a>, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435 \u0432\u0438\u0436\u0443 \u0441\u043c\u044b\u0441\u043b\u0430 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c \u0442\u043e, \u0447\u0442\u043e \u0443\u0436\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e. <br \/>  <a name=\"habracut\"><\/a><br \/>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044c\u0442\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c\u0441\u044f, \u043c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u041a\u0430\u043a\u0443\u0448\u0435\u0432 \u0420\u0430\u0441\u0443\u043b. \u0422\u0430\u043a \u0443\u0436 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0447\u0442\u043e \u044f \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0441\u044c \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u043d\u0430 ios \u0438 android, \u0430 \u0442\u0430\u043a \u0436\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 backend-\u043a\u043e\u0434\u0430 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 Navibit. \u042d\u0442\u043e \u043f\u043e\u043a\u0430 \u0435\u0449\u0435 \u043c\u0430\u043b\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430\u044f \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0433\u043e\u0442\u043e\u0432\u0438\u0442\u0441\u044f \u0432\u044b\u0439\u0442\u0438 \u043d\u0430 \u0440\u044b\u043d\u043e\u043a \u043f\u0440\u043e\u0434\u0430\u0436\u0438 \u0441\u0442\u0440\u043e\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u043e\u0432. \u0423 \u043d\u0430\u0441 \u043e\u0447\u0435\u043d\u044c \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u0438 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043b\u043e\u0436\u0438\u0442\u0441\u044f \u043d\u0430 \u043c\u043e\u0438 (\u0435\u0449\u0435 \u043d\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435) \u043f\u043b\u0435\u0447\u0438.<\/p>\n<p>  \u0412 \u043c\u043e\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u0435 \u0447\u0430\u0441\u0442\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0434\u043d\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 ios \u0438 android, \u0438 \u043a\u0430\u043a \u0432\u044b \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442\u0435, \u0432 \u0441\u0438\u043b\u0443 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c, \u0447\u0430\u0441\u0442\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u0438\u0441\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437. \u042d\u0442\u043e \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u0437\u0430\u0434, \u043a\u043e\u0433\u0434\u0430 \u044f \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043b\u0441\u044f \u0441 clean architecture, \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u0430 \u0432 \u0433\u043e\u043b\u043e\u0432\u0443 \u0442\u0430\u043a\u0430\u044f \u043c\u044b\u0441\u043b\u044c: \u044f\u0437\u044b\u043a\u0438 kotlin \u0438 swift \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u043e\u0445\u043e\u0436\u0438, \u043e\u0434\u043d\u0430\u043a\u043e \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f, \u043d\u043e \u0432 clean architecture \u0435\u0441\u0442\u044c domain \u0441\u043b\u043e\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d \u043a \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435, \u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0447\u0438\u0441\u0442\u0443\u044e \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0443. \u0427\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u0437\u044f\u0442\u044c \u0432\u0435\u0441\u044c domain \u0441\u043b\u043e\u0439 \u0438\u0437 android \u0438 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0435\u0433\u043e \u0432 ios, \u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c\u0438? <\/p>\n<p>  \u0427\u0442\u043e \u0436\u0435, \u0437\u0430\u0434\u0443\u043c\u0430\u043d\u043e \u2014 \u0441\u0434\u0435\u043b\u0430\u043d\u043e. \u042f \u043d\u0430\u0447\u0430\u043b \u043f\u0435\u0440\u0435\u043d\u043e\u0441. \u0418 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0434\u0435\u044f \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u0432\u043e\u0435\u043c \u0432\u0435\u0440\u043d\u043e\u0439. \u0421\u0430\u043c\u0438 \u043f\u043e\u0441\u0443\u0434\u0438\u0442\u0435. \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443 \u0432\u043e\u0442 \u043e\u0434\u0438\u043d \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u043e\u0440 \u043d\u0430 kotlin \u0438 swift:<\/p>\n<p>  <b>Kotlin (Android)<\/b><\/p>\n<pre><code>class AuthInteractor @Inject internal constructor(private val authRepository: AuthRepository,                      private val profileRepository: ProfileRepository) {      fun auth(login: String, password: String, cityId: Int): Single&lt;Auth&gt; = authRepository.auth(login.trim { it &lt;= ' ' }, password.trim { it &lt;= ' ' }, cityId, cloudToken)      fun restore(login: String, password: String, cityId: Int, confirmHash: String): Single&lt;AuthInfo&gt; = authRepository.restore(login.trim { it &lt;= ' ' }, password.trim { it &lt;= ' ' }, cityId, confirmHash)      fun restore(password: String, confirmHash: String): Single&lt;AuthInfo&gt; = authRepository.restore(password.trim { it &lt;= ' ' }, confirmHash)      fun getToken(): String = authRepository.checkIsAuth()      fun register(login: String,                  family: String,                  name: String,                  password: String,                  cityId: Int,                  confirmHash: String): Single&lt;AuthInfo&gt; =             authRepository.register(login.trim { it &lt;= ' ' },                     family.trim { it &lt;= ' ' },                     name.trim { it &lt;= ' ' },                     password.trim { it &lt;= ' ' },                     cityId, confirmHash)      fun checkLoginAvailable(login: String): Single&lt;LoginAvailable&gt; = authRepository.checkLoginAvailable(login)      fun saveTempCityInfo(authCityInfo: AuthCityInfo?) = authRepository.saveTempCityInfo(authCityInfo)      fun checkPassword(password: String): Single&lt;AuthInfo&gt; = authRepository.checkPassword(password)      fun auth(auth: Auth) {         authRepository.saveToken(auth.token!!)         profileRepository.saveProfile(auth.name!!, auth.phone!!, auth.location!!)     }      companion object {         const val AUTH_ERROR = &quot;HTTP 401 Unauthorized&quot;     } } <\/code><\/pre>\n<p>  <b>Swift (iOS):<\/b><\/p>\n<pre><code>class AuthInteractor {          public static let AUTH_ERROR = &quot;HTTP 401 Unauthorized&quot;          private let authRepository: AuthRepository     private let profileRepository: ProfileRepository     private let cloudMessagingRepository: CloudMessagingRepository          init(authRepository: AuthRepository,             profileRepository: ProfileRepository,             cloudMessagingRepository: CloudMessagingRepository) {         self.authRepository = authRepository         self.profileRepository = profileRepository         self.cloudMessagingRepository = cloudMessagingRepository     }          func auth(login: String, password: String, cityId: Int) -&gt; Observable&lt;Auth&gt; {         return authRepository.auth(login: login.trim(), password: password.trim(), cityId: cityId, cloudMessagingToken: cloudMessagingRepository.getCloudToken())     }          func restore(login: String, password: String, cityId: Int, confirmHash: String) -&gt; Observable&lt;AuthInfo&gt; {         return authRepository.restore(login: login.trim(), password: password.trim(), cityId: cityId, confirmHash: confirmHash)     }          func restore(password: String, confirmHash: String) -&gt; Observable&lt;AuthInfo&gt; {         return authRepository.restore(password: password.trim(), confirmHash: confirmHash)     }          func getToken() -&gt; String {         return authRepository.checkIsAuth()     }          func register(login: String,             family: String,             name: String,             password: String,             cityId: Int,             confirmHash: String) -&gt; Observable&lt;AuthInfo&gt; {         return authRepository.register(login: login.trim(),                                     family: family.trim(),                                     name: name.trim(),                                     password: password.trim(),                                     cityId: cityId,                                     confirmHash: confirmHash)     }          func checkLoginAvailable(login: String) -&gt; Observable&lt;LoginAvailable&gt; {         return authRepository.checkLoginAvailable(login: login)     }          func saveTempCityInfo(authCityInfo: AuthCityInfo?) {         authRepository.saveTempCityInfo(authCityInfo: authCityInfo)     }          func checkPassword(password: String) -&gt; Observable&lt;AuthInfo&gt; {         return authRepository.checkPassword(password: password)     }          func auth(auth: Auth) {         authRepository.saveToken(token: auth.token)         profileRepository.saveProfile(name: auth.name, phone: auth.phone, location: auth.location)     } } <\/code><\/pre>\n<p>  \u0418\u043b\u0438 \u0436\u0435 \u0432\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432 \u043d\u0430 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430\u0445:<\/p>\n<p>  <b>Kotlin (Android)<\/b><\/p>\n<pre><code>interface AuthRepository {      fun auth(login: String, password: String, cityId: Int, cloudMessagingToken: String): Single&lt;Auth&gt;      fun register(login: String,                  family: String,                  name: String,                  password: String,                  cityId: Int,                  confirmHash: String): Single&lt;AuthInfo&gt;      fun restore(login: String, password: String, cityId: Int, confirmHash: String): Single&lt;AuthInfo&gt;      fun restore(password: String, confirmHash: String): Single&lt;AuthInfo&gt;      fun checkLoginAvailable(login: String): Single&lt;LoginAvailable&gt;      fun sendCode(login: String): Single&lt;CodeCheck&gt;      fun checkCode(hash: String, code: String): Single&lt;CodeConfirm&gt;      fun checkIsAuth(): String      fun saveToken(token: String)      fun removeToken()      fun notifyConfirmHashListener(confirmHash: String)      fun getResendTimer(time: Long): Observable&lt;Long&gt;      fun checkPassword(password: String): Single&lt;AuthInfo&gt;      fun saveTempCityInfo(authCityInfo: AuthCityInfo?)      fun saveTempConfirmInfo(codeConfirmInfo: CodeConfirmInfo)      fun getTempCityInfo(): AuthCityInfo?      fun getConfirmHashListener(): Observable&lt;String&gt;      fun getTempConfirmInfo(): CodeConfirmInfo? } <\/code><\/pre>\n<p>  <b>Swift (iOS):<\/b><\/p>\n<pre><code>protocol AuthRepository {          func auth(login: String, password: String, cityId: Int, cloudMessagingToken: String) -&gt; Observable&lt;Auth&gt;          func register(login: String, family: String, name: String, password: String, cityId: Int, confirmHash: String) -&gt; Observable&lt;AuthInfo&gt;          func restore(login: String, password: String, cityId: Int, confirmHash: String) -&gt; Observable&lt;AuthInfo&gt;          func restore(password: String, confirmHash: String) -&gt; Observable&lt;AuthInfo&gt;          func checkLoginAvailable(login: String) -&gt; Observable&lt;LoginAvailable&gt;          func sendCode(login: String) -&gt; Observable&lt;CodeCheck&gt;          func checkCode(hash: String, code: String) -&gt; Observable&lt;CodeConfirm&gt;          func checkIsAuth() -&gt;String          func saveToken(token: String)          func removeToken()          func notifyConfirmHashListener(confirmHash: String)          func getResendTimer(time: Int) -&gt; Observable&lt;Int&gt;          func checkPassword(password: String) -&gt; Observable&lt;AuthInfo&gt;          func saveTempCityInfo(authCityInfo: AuthCityInfo?)          func saveTempConfirmInfo(codeConfirmInfo: CodeConfirmInfo)          func getTempCityInfo() -&gt; AuthCityInfo?          func getConfirmHashListener() -&gt; Observable&lt;String&gt;          func getTempConfirmInfo() -&gt; CodeConfirmInfo? } <\/code><\/pre>\n<p>  \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0434\u0435\u043b\u043e \u043e\u0431\u0441\u0442\u043e\u0438\u0442 \u0438 \u0441 presentation \u0441\u043b\u043e\u0435\u043c, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u0440\u0435\u0437\u0435\u043d\u0442\u0435\u0440\u044b \u0438 view-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u043d\u0430 \u043e\u0431\u0435\u0438\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430\u0445 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0442\u0430\u043a\u043e\u043c\u0443 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0443, \u043c\u043e\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u043b\u0430\u0441\u044c \u043f\u043e\u0447\u0442\u0438 \u0432\u0434\u0432\u043e\u0435, \u0442\u0430\u043a \u043a\u0430\u043a \u0438\u0437-\u0437\u0430 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043d\u0430 \u043e\u0431\u0435\u0438\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430\u0445 \u0443\u0436\u0435 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u044b domain \u0438 presentation \u0441\u043b\u043e\u0438, \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0434\u0435\u043b\u043e \u0437\u0430 \u043c\u0430\u043b\u044b\u043c \u2014 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c ui \u0438 data \u0441\u043b\u043e\u0438. <\/p>\n<p>  \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0442\u043e \u0447\u0442\u043e \u0434\u043e\u0447\u0438\u0442\u0430\u043b\u0438 \u0434\u043e \u043a\u043e\u043d\u0446\u0430. \u041d\u0430\u0434\u0435\u044e\u0441\u044c \u0434\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u0440\u0438\u043d\u0435\u0441\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u0443 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0442\u0441\u044f \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439. \u0412\u0441\u0435\u0433\u043e \u043d\u0430\u0438\u043b\u0443\u0447\u0448\u0435\u0433\u043e.<\/p><\/div>\n<p>        <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d()}}}t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>     <br \/> \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\/post\/419173\/\"> https:\/\/habr.com\/post\/419173\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div data-io-article-url=\"https:\/\/habr.com\/post\/419173\/\" class=\"post__text post__text-html js-mediator-article\">\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442. \u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u0441\u0442\u0430\u0442\u0435\u0439 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043d\u0430 \u0442\u0435\u043c\u0443 clean architecture. \u0422\u043e \u0435\u0441\u0442\u044c \u0447\u0438\u0441\u0442\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0443\u0434\u043e\u0431\u043d\u044b\u0435 \u0432 \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0435\u043d\u0438\u0438 \u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438. \u041f\u0440\u043e \u0441\u0430\u043c\u0443 \u0447\u0438\u0441\u0442\u0443\u044e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 \u0442\u0430\u043a\u0438\u0445 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u0442\u0430\u0442\u044c\u044f\u0445 \u043a\u0430\u043a: <a href=\"https:\/\/habr.com\/company\/mobileup\/blog\/335382\/\">\u0417\u0430\u0431\u043b\u0443\u0436\u0434\u0435\u043d\u0438\u044f Clean Architecture<\/a> \u0438\u043b\u0438 <a href=\"https:\/\/habr.com\/post\/269589\/\">\u0427\u0438\u0441\u0442\u0430\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430<\/a>, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435 \u0432\u0438\u0436\u0443 \u0441\u043c\u044b\u0441\u043b\u0430 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c \u0442\u043e, \u0447\u0442\u043e \u0443\u0436\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e.   <\/p>\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-287690","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/287690","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=287690"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/287690\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=287690"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=287690"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=287690"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}