{"id":292010,"date":"2019-07-12T15:01:28","date_gmt":"2019-07-12T15:01:28","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=292010"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=292010","title":{"rendered":"\u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043e\u0448\u0438\u0431\u043e\u043a \u0432 Dart"},"content":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\n<p>\u041f\u0440\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0435 \u043d\u0430 \u043d\u043e\u0432\u0443\u044e \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044e, \u043c\u044b \u043b\u0438\u0448\u0430\u0435\u043c\u0441\u044f \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u0412 \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u0441\u043b\u0443\u0447\u0430\u044f \u043c\u044b \u0432\u044b\u043d\u0443\u0436\u0434\u0435\u043d\u044b \u0441\u043c\u0438\u0440\u0438\u0442\u044c\u0441\u044f \u0441 \u0438\u0445 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435\u043c \u0438\u0437-\u0437\u0430 \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439, \u043d\u043e \u043f\u0440\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0441 \u0441\u043e\u0431\u043e\u0439. \u0420\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044f android \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0437\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u044f \u0431\u0440\u0430\u043b <a href=\"https:\/\/fernandocejas.com\/2018\/05\/07\/architecting-android-reloaded\/\">\u043f\u0440\u0438\u043c\u0435\u0440<\/a> \u0447\u0438\u0441\u0442\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0439 Fernando Cejas. \u0420\u0430\u0437\u0431\u0438\u0440\u0430\u044f\u0441\u044c \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u043c\u0438 \u0432\u043e Flutter \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u044f \u0440\u0435\u0448\u0438\u043b \u043e\u0442\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u044d\u0442\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u0432 \u043f\u043e\u043b\u044c\u0437\u0443 BLoC. \u041a \u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u0448\u0430\u0431\u043b\u043e\u043d\u0443 \u044f \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u0440\u0438\u0432\u044b\u043a, \u043e\u043d \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0445\u043e\u0436 \u043d\u0430 MVVM, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0440\u0430\u043d\u0435\u0435, \u043d\u043e \u0441 \u043e\u0434\u043d\u043e\u0439 \u0434\u0435\u0442\u0430\u043b\u044c\u044e \u044f \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u0445\u043e\u0442\u0435\u043b \u043c\u0438\u0440\u0438\u0442\u044c\u0441\u044f. \u041f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u044f \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u043b \u043b\u043e\u0432\u0438\u0442\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f, \u043a\u0430\u0441\u0442\u0438\u0442\u044c \u0438\u0445 \u043a \u043a\u0430\u043a\u043e\u043c\u0443-\u0442\u043e \u0442\u0438\u043f\u0443 \u0438 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0432\u0438\u0438 \u0441 \u0442\u0438\u043f\u043e\u043c, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435. \u041d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0437\u0430\u0445\u043b\u0430\u043c\u043b\u044f\u0435\u0442 \u0431\u043b\u043e\u043a \u0438 \u044f \u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u0442\u0438\u043f Either \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u0440\u0430\u043d\u0435\u0435 \u0432 android \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 Fernando.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<p>Either \u043f\u0440\u0438\u0448\u0435\u043b \u0438\u0437 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u041e\u043d \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432:<\/p>\n<p>  <\/p>\n<ul>\n<li>Left (\u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435\u0443\u0434\u0430\u0447\u0438);<\/li>\n<li>Right (\u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0443\u0441\u043f\u0435\u0445\u0430).<\/li>\n<\/ul>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0411\u0430\u0437\u043e\u0432\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f Either<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">\/\/\/ Signature of callbacks that have no arguments and return right or left value. typedef Callback&lt;T&gt; = void Function(T value);  \/\/\/ Represents a value of one of two possible types (a disjoint union). \/\/\/ Instances of [Either] are either an instance of [Left] or [Right]. \/\/\/ FP Convention dictates that: \/\/\/   [Left] is used for \"failure\". \/\/\/   [Right] is used for \"success\". abstract class Either&lt;L, R&gt; {   Either() {     if (!isLeft &amp;&amp; !isRight)       throw Exception('The ether should be heir Left or Right.');   }    \/\/\/ Represents the left side of [Either] class which by convention is a \"Failure\".   bool get isLeft =&gt; this is Left&lt;L, R&gt;;    \/\/\/ Represents the right side of [Either] class which by convention is a \"Success\"   bool get isRight =&gt; this is Right&lt;L, R&gt;;    L get left {     if (this is Left&lt;L, R&gt;)       return (this as Left&lt;L, R&gt;).value;     else       throw Exception('Illegal use. You should check isLeft() before calling ');   }    R get right {     if (this is Right&lt;L, R&gt;)       return (this as Right&lt;L, R&gt;).value;     else       throw Exception('Illegal use. You should check isRight() before calling');   }    void either(Callback&lt;L&gt; fnL, Callback&lt;R&gt; fnR) {     if (isLeft) {       final left = this as Left&lt;L, R&gt;;       fnL(left.value);     }      if (isRight) {       final right = this as Right&lt;L, R&gt;;       fnR(right.value);     }   } }  class Left&lt;L, R&gt; extends Either&lt;L, R&gt; {   final L value;    Left(this.value); }  class Right&lt;L, R&gt; extends Either&lt;L, R&gt; {   final R value;    Right(this.value); }<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u043e\u0432\u0441\u0435\u043c \u0431\u0430\u0437\u043e\u0432\u0430\u044f, \u0443\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u044f\u043c \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u0430\u0445, \u043d\u043e \u0441\u043e \u0441\u0432\u043e\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f. \u042f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u044d\u0442\u043e\u0442 \u0442\u0438\u043f \u043a\u0430\u043a \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u0441\u0435\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f, \u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u043f\u0435\u0440\u0435\u043d\u0435\u0441 \u0432 \u0441\u043b\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445. \u042d\u0442\u043e \u0438\u0437\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0431\u043b\u043e\u043a\u0430 \u043e\u0442 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 try\/catch, \u0437\u0430 \u0441\u0447\u0435\u0442 \u0447\u0435\u0433\u043e \u043a\u043e\u0434 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u0447\u0438\u0442\u0430\u0435\u043c.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u0438\u043c\u0435\u0440 \u0441 try\/catch<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">class ContactBloc {   final ContactRepository contactRepository;    ContactBloc(this.contactRepository);    @override   Stream&lt;ContactState&gt; mapEventToState(ContactEvent event) async* {     if (event is GetContactEvent) {       yield LoadContactState();       try {         var contact = contactRepository.getById(event.id);         yield ContactIsShowingState(contact);       } on NetworkConnectionException catch (e) {         yield NetworkExceptionState(e);       } catch (e) {         yield UnknownExceptionState(e);       }     }   } }  abstract class ContactRepository {   Future&lt;Contact&gt;getById(int id); }<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u0438\u043c\u0435\u0440 \u0441 either<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">class ContactBloc {   final ContactRepository contactRepository;    ContactBloc(this.contactRepository);    @override   Stream&lt;ContactState&gt; mapEventToState(ContactEvent event) async* {     if (event is GetContactEvent) {       yield LoadContactState();       final either = contactRepository.getById(event.id);       if (either.isRight) {         final contact = either.right;         yield ContactIsShowingState(contact);       } else {         final failure = either.left;         if (failure is NetworkFailure) yield NetworkFailureState(failure);         if (failure is UnknownFailure) yield UnknownFailureState(failure);       }     }   } }  abstract class ContactRepository {   Future&lt;Either&lt;Failure, Contact&gt;&gt;getById(int id); }<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u041f\u043e \u043f\u043e\u0432\u043e\u0434\u0443 \u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u0438, \u043a\u0442\u043e-\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0432\u043e\u0437\u0440\u0430\u0437\u0438\u0442\u044c. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043a\u043e\u043c\u0443-\u0442\u043e \u043f\u0440\u0438\u0432\u044b\u0447\u0435\u043d try\/catch \u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e \u0441\u0432\u043e\u0435\u043c\u0443 \u043f\u0440\u0430\u0432, \u043f\u043e \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u044d\u0442\u043e \u0432\u043a\u0443\u0441\u043e\u0432\u0449\u0438\u043d\u0430. \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e, \u0447\u0442\u043e \u043c\u044b \u0441\u0430\u043c\u0438 \u043c\u043e\u0436\u0435\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u044e Failure \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u0432 \u043b\u0435\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438. \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u044b\u0439 Failure, \u043e\u0442 \u043d\u0435\u0433\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0431\u0449\u0438\u0435 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0444\u0438\u0447 ServerFailure, NetworkFailure \u0438 \u043a\u0430\u043a\u0438\u0435-\u043d\u0438\u0431\u0443\u0434\u044c \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0435 \u0434\u043b\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0444\u0438\u0447\u0438 ContactFailure, \u0441 \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a\u0430\u043c\u0438. \u0412 \u0431\u043b\u043e\u043a\u0435 \u043c\u044b \u0442\u043e\u0447\u043d\u043e \u0431\u0443\u0434\u0435\u043c \u0437\u043d\u0430\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u0438\u0437 Failure \u043e\u0436\u0438\u0434\u0430\u0442\u044c.<\/p>\n<p>  <\/p>\n<p>\u041c\u0438\u043d\u0443\u0441\u043e\u043c \u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 Failure \u043d\u0430 Dart, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0442\u0441\u0443\u0442\u0441\u0432\u0438\u0435 <a href=\"https:\/\/kotlinlang.org\/docs\/reference\/sealed-classes.html\">sealed classes<\/a> \u043a\u0430\u043a \u0432 kotlin, \u0438\u043d\u0430\u0447\u0435 \u0431\u044b \u043d\u0435 \u0431\u044b\u043b\u043e \u044d\u0442\u0438\u0445 if&#8217;\u043e\u0432 \u0441 \u043a\u0430\u0441\u0442\u0438\u043d\u0433\u043e\u043c. \u042f\u0437\u044b\u043a \u043c\u043e\u043b\u043e\u0434, \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0438 \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u043f\u0440\u0438\u0434\u0435\u0442 \u0432\u0440\u0435\u043c\u044f \u0438 \u0443 \u043d\u0430\u0441 \u043f\u043e\u044f\u0432\u044f\u0442\u0441\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0435 \u0431\u043e\u043b\u0435\u0435 \u043b\u0430\u043a\u043e\u043d\u0438\u0447\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438.<\/p>\n<p>  <\/p>\n<p>\u041a\u043e\u043c\u0443-\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043d\u0435 \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u0434\u0430\u043d\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0447\u0442\u0435\u0442 \u0435\u0435 \u0431\u0435\u0441\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u043e\u0439, \u043d\u043e \u044f \u043b\u0438\u0448\u044c \u0445\u043e\u0442\u0435\u043b \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c \u0412\u0430\u0441 \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043e\u0448\u0438\u0431\u043e\u043a \u0432 Dart, \u0445\u043e\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0442\u0430\u043a\u0438\u043c \u0438\u0437\u044f\u0449\u043d\u044b\u043c \u043a\u0430\u043a \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u0430\u0445.<\/p>\n<p>  <\/p>\n<p>\u0420\u0435\u0441\u0443\u0440\u0441\u044b:<\/p>\n<p>  <\/p>\n<p><a href=\"https:\/\/github.com\/baihu92\/EitherType\">\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434<\/a><\/p>\n<\/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\/ru\/post\/459757\/\"> https:\/\/habr.com\/ru\/post\/459757\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\n<p>\u041f\u0440\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0435 \u043d\u0430 \u043d\u043e\u0432\u0443\u044e \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044e, \u043c\u044b \u043b\u0438\u0448\u0430\u0435\u043c\u0441\u044f \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u0412 \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u0441\u043b\u0443\u0447\u0430\u044f \u043c\u044b \u0432\u044b\u043d\u0443\u0436\u0434\u0435\u043d\u044b \u0441\u043c\u0438\u0440\u0438\u0442\u044c\u0441\u044f \u0441 \u0438\u0445 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435\u043c \u0438\u0437-\u0437\u0430 \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439, \u043d\u043e \u043f\u0440\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0441 \u0441\u043e\u0431\u043e\u0439. \u0420\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044f android \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0437\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u044f \u0431\u0440\u0430\u043b <a href=\"https:\/\/fernandocejas.com\/2018\/05\/07\/architecting-android-reloaded\/\">\u043f\u0440\u0438\u043c\u0435\u0440<\/a> \u0447\u0438\u0441\u0442\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0439 Fernando Cejas. \u0420\u0430\u0437\u0431\u0438\u0440\u0430\u044f\u0441\u044c \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u043c\u0438 \u0432\u043e Flutter \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u044f \u0440\u0435\u0448\u0438\u043b \u043e\u0442\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u044d\u0442\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u0432 \u043f\u043e\u043b\u044c\u0437\u0443 BLoC. \u041a \u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u0448\u0430\u0431\u043b\u043e\u043d\u0443 \u044f \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u0440\u0438\u0432\u044b\u043a, \u043e\u043d \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0445\u043e\u0436 \u043d\u0430 MVVM, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0440\u0430\u043d\u0435\u0435, \u043d\u043e \u0441 \u043e\u0434\u043d\u043e\u0439 \u0434\u0435\u0442\u0430\u043b\u044c\u044e \u044f \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u0445\u043e\u0442\u0435\u043b \u043c\u0438\u0440\u0438\u0442\u044c\u0441\u044f. \u041f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u044f \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u043b \u043b\u043e\u0432\u0438\u0442\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f, \u043a\u0430\u0441\u0442\u0438\u0442\u044c \u0438\u0445 \u043a \u043a\u0430\u043a\u043e\u043c\u0443-\u0442\u043e \u0442\u0438\u043f\u0443 \u0438 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0432\u0438\u0438 \u0441 \u0442\u0438\u043f\u043e\u043c, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435. \u041d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0437\u0430\u0445\u043b\u0430\u043c\u043b\u044f\u0435\u0442 \u0431\u043b\u043e\u043a \u0438 \u044f \u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u0442\u0438\u043f Either \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u0440\u0430\u043d\u0435\u0435 \u0432 android \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 Fernando.<\/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-292010","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/292010","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=292010"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/292010\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=292010"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=292010"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=292010"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}