{"id":282718,"date":"2016-12-19T18:20:04","date_gmt":"2016-12-19T15:20:04","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=282718"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=282718","title":{"rendered":"\u041a\u0430\u043a \u043d\u0435 \u043f\u0438\u0441\u0430\u0442\u044c \u043b\u0438\u0448\u043d\u0435\u0433\u043e"},"content":{"rendered":"<p><img decoding=\"async\" align=\"left\" src=\"http:\/\/jeta.brooth.org\/static\/images\/jeta.png\"\/> \u0412\u0441\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u044b \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0441 <em>boiler-plate<\/em> \u043a\u043e\u0434\u043e\u043c. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e Android-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u044b. \u041f\u0438\u0441\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u2014 \u0434\u0435\u043b\u043e \u043d\u0435\u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u043d\u043e\u0435 \u0438, \u044f \u0443\u0432\u0435\u0440\u0435\u043d, \u0447\u0442\u043e \u043d\u0435\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0431\u044b \u044d\u0442\u043e \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u043b\u043e \u0443\u0434\u043e\u0432\u043e\u043b\u044c\u0441\u0442\u0432\u0438\u0435. \u0412 \u043e\u0434\u0438\u043d \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u0434\u0435\u043d\u044c \u044f \u043d\u0430\u0447\u0430\u043b \u0438\u0441\u043a\u0430\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u044f. \u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0438\u0434\u0435\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u0430: \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0438 \u043f\u043e\u0437\u0436\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0432 \u0440\u0430\u043d\u0442\u0430\u0439\u043c\u0435, \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043d\u0435 \u043d\u0430\u0448\u043b\u043e\u0441\u044c, \u0438 \u044f \u043f\u0440\u0438\u043d\u044f\u043b\u0441\u044f \u0437\u0430 \u0434\u0435\u043b\u043e. \u041f\u0435\u0440\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0431\u044b\u043b\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u043a\u0430\u043a \u043e\u0434\u0438\u043d \u0438\u0437 \u043f\u043e\u0434\u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432. \u0411\u043e\u043b\u0435\u0435 \u0434\u0432\u0443\u0445 \u043b\u0435\u0442 \u044f \u0431\u044b\u043b \u0434\u043e\u0432\u043e\u043b\u0435\u043d \u044d\u0442\u0438\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c. \u041e\u043d\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a, \u043a\u0430\u043a \u044f \u044d\u0442\u043e\u0433\u043e \u043e\u0436\u0438\u0434\u0430\u043b. \u0412\u0440\u0435\u043c\u044f \u0448\u043b\u043e, \u043c\u043e\u0434\u0443\u043b\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u044f\u043b\u0441\u044f \u043d\u043e\u0432\u044b\u043c\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438, \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043b\u0441\u044f, \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b\u0441\u044f. \u0412 \u0446\u0435\u043b\u043e\u043c <a href=\"https:\/\/en.wikipedia.org\/wiki\/Proof_of_concept\">PoC<\/a> \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u043c, \u0438 \u044f \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u0441 \u043a\u043e\u043c\u044c\u044e\u043d\u0438\u0442\u0438.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<p>\u0421\u043f\u0443\u0441\u0442\u044f 8 \u043c\u0435\u0441\u044f\u0446\u0435\u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e \u0432\u0435\u0447\u0435\u0440\u0430\u043c, \u044f \u043d\u0430 \u0425\u0430\u0431\u0440\u0435 \u0441\u043e \u0441\u0432\u043e\u0438\u043c \u043f\u0435\u0440\u0432\u044b\u043c \u0432 \u0436\u0438\u0437\u043d\u0438 \u043f\u043e\u0441\u0442\u043e\u043c. \u0418\u0442\u0430\u043a, <a href=\"http:\/\/jeta.brooth.org\">Jeta<\/a> \u2014 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0430 <code>javax.annotation.processing<\/code>. <em>Open-Source<\/em>, <em>Apache 2.0<\/em>, \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043d\u0430 GitHub, \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u044b \u043d\u0430 jCenter, tutorials, samples, unit-tests, \u0432 \u043e\u0431\u0449\u0435\u043c \u0432\u0441\u0435 \u043a\u0430\u043a \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043e.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440. \u0412 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0432\u0445\u043e\u0434\u0438\u0442 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f <code>@Log<\/code>. \u0421 \u0435\u0435 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442\u0441\u044f \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043b\u043e\u0433\u0433\u0435\u0440\u043e\u0432 \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043b\u0430\u0441\u0441\u0430.<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">public class LogSample {     @Log     Logger logger; }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0430\u043a, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430, Jeta \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043a\u043b\u0430\u0441\u0441 <code>LogSample_Metacode<\/code> \u0441 \u043c\u0435\u0442\u043e\u0434\u043e\u043c <code>applyLogger<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">public class LogSample_Metacode implements LogMetacode&lt;LogSample&gt; {     @Override     public void applyLogger(LogSample master, NamedLoggerProvider provider) {         master.logger = (Logger) provider.getLogger(\u201cLogSample\u201d);     } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0418\u0437 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043f\u043e \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 <code>@Log<\/code> \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442 \u043b\u043e\u0433\u0433\u0435\u0440 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u201cLogSample\u201d \u0430\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c\u0443 \u043f\u043e\u043b\u044e. \u041e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c <code>NamedLoggerProvider<\/code> \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043b\u043e\u0433\u0433\u0435\u0440\u044b \u0438\u0437 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u0432\u0430\u0448\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u043c\u0438\u043c\u043e \u043d\u0435\u044f\u0432\u043d\u043e\u0433\u043e \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u044f \u043b\u043e\u0433\u0433\u0435\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u043e\u0435, \u043a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u0438\u0437 \u043f\u0440\u0438\u043c\u0435\u0440\u0430, \u0431\u0435\u0440\u0435\u0442\u0441\u044f \u0438\u0437 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043a\u043b\u0430\u0441\u0441\u0430, \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438, \u043a\u0430\u043a \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <code>@Log(\u201cREST\u201d)<\/code>.<\/p>\n<p>  <\/p>\n<p>\u042d\u0442\u043e\u0442 \u043f\u0440\u0438\u0435\u043c \u0438\u0437\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u0442 \u043a\u043e\u043f\u0438-\u043f\u0430\u0441\u0442\u044b \u0441\u0442\u0440\u043e\u043a\u0438 \u0442\u0438\u043f\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">private final Logger logger = LoggerFactory.getLogger(LogSample.class);<\/code><\/pre>\n<p>  <\/p>\n<p>\u0447\u0442\u043e \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0438\u0437\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0435\u043a\u0442 \u043e\u0442 \u043b\u043e\u0433\u0433\u0435\u0440\u043e\u0432 \u0441 \u0438\u043c\u0435\u043d\u0430\u043c\u0438 \u201c\u0441\u043e\u0441\u0435\u0434\u043e\u0432\u201d, \u0442\u0430\u043a \u043a\u0430\u043a \u0447\u0430\u0441\u0442\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u044b \u0437\u0430\u0431\u044b\u0432\u0430\u044e\u0442 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0439 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u043a\u043b\u0430\u0441\u0441.<\/p>\n<p>  <\/p>\n<p>\u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u044d\u0442\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u043e\u043d \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u0443\u044e \u0438\u0434\u0435\u044e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 \u2014 \u043c\u0435\u043d\u044c\u0448\u0435 \u043a\u043e\u0434\u0430, \u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>  <\/p>\n<p>\u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0446\u0435\u043b\u044c Jeta \u2014 \u044d\u0442\u043e \u0438\u0437\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u0442 \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u043d\u0430 \u043f\u0440\u0438\u0435\u043c\u0435, \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c \u0432\u044b\u0448\u0435, \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a <a href=\"http:\/\/jeta.brooth.org\/guide\/inject.html\">Dependency Injection<\/a>, <a href=\"http:\/\/jeta.brooth.org\/guide\/event-bus.html\">Event Bus<\/a>, <a href=\"http:\/\/jeta.brooth.org\/guide\/validator.html\">Validators<\/a> \u0438 \u0434\u0440. \u041d\u0443\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0432\u0441\u0435 \u043e\u043d\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430\u043c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 \u2014 \u0431\u0435\u0437 <em>Java Reflection<\/em> \u0438, \u043f\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438, \u0432\u0441\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u043d\u0430 \u0441\u0442\u0430\u0434\u0438\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438.<\/p>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0442\u0430\u043a \u0436\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u0438\u0437\u0431\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u043e\u0442 \u0432\u044b\u0434\u0443\u043c\u0430\u043d\u043d\u043e\u0433\u043e <em>boiler-plate<\/em> \u043a\u0435\u0439\u0441\u0430. \u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043a\u043e\u0435-\u0447\u0442\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0435, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e <em>Data Binding<\/em> (\u0434\u0430\u043b\u0435\u0435 DB). \u0425\u043e\u0442\u044f, \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0440\u0430\u0437\u043d\u0438\u0446\u044b \u0442\u0443\u0442 \u043d\u0435\u0442, \u0438 \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u0438\u0437\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u043e\u0442 \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430.<\/p>\n<p>  <\/p>\n<h3 id=\"data-binding\">Data-Binding.<\/h3>\n<p>  <\/p>\n<p>Android \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u044b, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0443\u0436\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 \u044d\u0442\u0438\u043c \u0442\u0435\u0440\u043c\u0438\u043d\u043e\u043c. \u041d\u0435 \u0442\u0430\u043a \u0434\u0430\u0432\u043d\u043e Google \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u043b\u0430 <a href=\"https:\/\/developer.android.com\/topic\/libraries\/data-binding\/index.html\">Data Binding Library<\/a>. \u0414\u043b\u044f \u0442\u0435\u0445 \u0438\u0437 \u0412\u0430\u0441, \u043a\u0442\u043e \u043d\u0435 \u0437\u043d\u0430\u043a\u043e\u043c \u0441 \u044d\u0442\u0438\u043c \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u043e\u043c, \u044f \u0443\u0432\u0435\u0440\u0435\u043d, \u0447\u0442\u043e \u043d\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442 \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0442\u0440\u0443\u0434\u0430 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u0435\u0433\u043e \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0435\u0439 \u0438\u0437 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435. \u0422\u0430\u043a \u0436\u0435 \u043f\u0440\u0438\u0432\u043e\u0436\u0443 \u0434\u0432\u0430 \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u0430 \u0441 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u044d\u043a\u0441\u043a\u0443\u0440\u0441\u0430\u043c\u0438 \u043f\u043e Android \u0438 Data-Binding, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Android<\/b><\/p>\n<div class=\"spoiler_text\">\n<p>\u042d\u043a\u0440\u0430\u043d, \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 Android-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <em>Activity<\/em>. \u042d\u0442\u043e Java \u043a\u043b\u0430\u0441\u0441 \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043e\u0442 <code>android.app.Activity<\/code>. \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0430\u043a\u0442\u0438\u0432\u0438\u0442\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 <em>XML<\/em>-\u0444\u0430\u0439\u043b \u0441 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u043e\u0439, \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0439 <em>Layout<\/em>. \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 Activity \u0438\u0437 \u201cHello, World\u201d \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f:<\/p>\n<p>  <\/p>\n<pre><code class=\"xml\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;  &lt;LinearLayout xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;    android:layout_width=&quot;match_parent&quot;    android:layout_height=&quot;match_parent&quot;&gt;    &lt;TextView        android:id=&quot;@+id\/text1&quot;        android:layout_width=&quot;wrap_content&quot;        android:layout_height=&quot;wrap_content&quot; \/&gt; &lt;\/LinearLayout&gt;<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"java\">public class MainActivity extends Activity {    @Override    protected void onCreate(Bundle savedInstanceState) {        super.onCreate(savedInstanceState);        setContentView(R.layout.activity_main);        TextView text1 = (TextView) findViewById(R.id.text1);        text1.setText(&quot;Hello World!&quot;);    } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u0442\u0440\u043e\u043a\u0430 <code>setContentView(R.layout.activity_main)<\/code> \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u0442 \u0430\u043a\u0442\u0438\u0432\u0438\u0442\u0438 \u0438 \u043b\u0435\u0439\u0430\u0443\u0442 \u0447\u0435\u0440\u0435\u0437 <code>R<\/code> \u0444\u0430\u0439\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438. \u0422\u0430\u043a, \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043b\u0435\u0439\u0430\u0443\u0442\u0430 <code>activity_main.xml<\/code>, R-\u0444\u0430\u0439\u043b \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u043a\u043b\u0430\u0441\u0441 <em>layout<\/em> c \u043f\u043e\u043b\u0435\u043c <em>activity_main<\/em> \u0438 \u043a\u0430\u043a\u0438\u043c-\u0442\u043e \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u043c \u0447\u0438\u0441\u043b\u043e\u0432\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c. \u0414\u043b\u044f <em>TextView<\/em>, \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043c\u044b \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u043b\u0438 <code>id = text1<\/code>, \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u043a\u043b\u0430\u0441\u0441 <code>id<\/code> \u0438 \u043f\u043e\u043b\u0435 <code>text1<\/code>, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e.<\/p>\n<\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Data Binding<\/b><\/p>\n<div class=\"spoiler_text\">\n<p>Data-binding \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0438\u0441\u0430\u0442\u044c <em>DSL<\/em> \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432\u043d\u0443\u0442\u0440\u0438 <em>XML<\/em>-\u0444\u0430\u0439\u043b\u0430. \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0441 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0430\u0439\u0442\u0430 <a href=\"https:\/\/developer.android.com\/topic\/libraries\/data-binding\/index.html\">developer.android.com<\/a>:<\/p>\n<p>  <\/p>\n<pre><code class=\"xml\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt; &lt;layout xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;&gt;    &lt;data&gt;        &lt;variable name=&quot;user&quot; type=&quot;com.example.User&quot;\/&gt;    &lt;\/data&gt;    &lt;LinearLayout        android:orientation=&quot;vertical&quot;        android:layout_width=&quot;match_parent&quot;        android:layout_height=&quot;match_parent&quot;&gt;        &lt;TextView android:layout_width=&quot;wrap_content&quot;            android:layout_height=&quot;wrap_content&quot;            android:text=&quot;@{user.firstName}&quot;\/&gt;        &lt;TextView android:layout_width=&quot;wrap_content&quot;            android:layout_height=&quot;wrap_content&quot;            android:text=&quot;@{user.lastName}&quot;\/&gt;    &lt;\/LinearLayout&gt; &lt;\/layout&gt;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0430\u043a, \u0432 \u043d\u0443\u0436\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442, \u043c\u044b \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u043c \u043e\u0431\u044a\u0435\u043a\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (<code>com.example.User<\/code>) \u0441 \u043b\u0435\u0439\u0430\u0443\u0442\u043e\u043c \u0438 data-binding \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b. \u0422\u0430\u043a, \u043f\u0435\u0440\u0432\u044b\u0439 <code>TextView<\/code> \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442 \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0430 \u0432\u0442\u043e\u0440\u043e\u0439 \u0435\u0433\u043e \u0444\u0430\u043c\u0438\u043b\u0438\u044e.<\/p>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0441\u0432\u043e\u0439 Data-Binding, \u043f\u0440\u0430\u0432\u0434\u0430, \u043f\u043e\u043a\u0430 \u0431\u0435\u0437 \u043f\u0440\u0435\u0444\u0435\u0440\u0430\u043d\u0441\u0430, \u043d\u0443 \u0430 \u0432 \u043a\u043e\u043d\u0446\u0435 \u0432\u0430\u0441 \u0436\u0434\u0435\u0442 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432.<\/p>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c \u043a\u0430\u043a \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c, \u043f\u0430\u0440\u0430 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0439 \u043f\u043e Jeta.<\/p>\n<p>  <\/p>\n<ol>\n<li>\n<p>\u0412\u0441\u0435 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0435 \u0434\u043b\u044f \u0430\u043d\u0434\u0440\u043e\u0438\u0434\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u044b\u043d\u0435\u0441\u0435\u043d\u044b \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u2014 <a href=\"http:\/\/jeta.brooth.org\/guide\/androjeta\/overview.html\">Androjeta<\/a>. \u041e\u043d\u0430 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u0442 Jeta \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u0432\u0441\u0435, \u0447\u0442\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0432 Jeta, \u0442.\u0435. \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u0433\u043e Java-\u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0442\u0430\u043a \u0436\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0432 Androjeta.<\/p>\n<p>  <\/li>\n<li>\u0412 \u0442\u0435\u0440\u043c\u0438\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <em>Metacode<\/em>. \u041a\u043b\u0430\u0441\u0441, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u0430-\u043a\u043e\u0434, \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <em>Master<\/em>. \u0415\u0449\u0435 \u0435\u0441\u0442\u044c <em>Controller<\/em>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u043c\u0435\u0442\u0430-\u043a\u043e\u0434 \u043a \u043c\u0430\u0441\u0442\u0435\u0440\u0443, \u0438 <em>Metasitory<\/em> \u2014 \u044d\u0442\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0441\u0441\u044b\u043b\u043e\u043a \u043d\u0430 \u0432\u0441\u0435 <em>Metacode<\/em>-\u043a\u043b\u0430\u0441\u0441\u044b. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <em>Metasitory<\/em> \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u044b \u043d\u0430\u0445\u043e\u0434\u044f\u0442 \u043d\u0443\u0436\u043d\u044b\u0439 \u043c\u0435\u0442\u0430-\u043a\u043e\u0434.<\/li>\n<\/ol>\n<p>  <\/p>\n<h3 id=\"1-databinding-proekt\">1. <code>DataBinding<\/code> \u043f\u0440\u043e\u0435\u043a\u0442<\/h3>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u0430\u043c\u044b\u0439 \u043e\u0431\u044b\u0447\u043d\u044b\u0439 Android \u043f\u0440\u043e\u0435\u043a\u0442 \u0441 \u043e\u0434\u043d\u043e\u0439 \u0430\u043a\u0442\u0438\u0432\u0438\u0442\u0438 \u0438 \u0441 pojo-\u043a\u043b\u0430\u0441\u0441\u043e\u043c <code>User<\/code>. \u041d\u0430\u0448\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u2014 \u043a \u043a\u043e\u043d\u0446\u0443 \u0441\u0442\u0430\u0442\u044c\u0438 \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0438\u043c\u044f \u0438 \u0444\u0430\u043c\u0438\u043b\u0438\u044e \u044e\u0437\u0435\u0440\u0430 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 UI-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c <em>DB<\/em>. \u0414\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438 \u044f \u0431\u0443\u0434\u0443 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u044b \u0441\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/i.gyazo.com\/57cd4a549be62a2a02b90ec95fce5ae4.png\" alt=\"project\"\/><\/p>\n<p>  <\/p>\n<h3 id=\"2-common-modul\">2. <code>common<\/code> \u043c\u043e\u0434\u0443\u043b\u044c<\/h3>\n<p>  <\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043a\u043e\u0434\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043d\u0430 \u0441\u0442\u0430\u0434\u0438\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438, \u0438 \u0432\u0441\u0435 \u0441\u043e\u043f\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438, \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043c\u043e\u0434\u0443\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0438 \u0432 \u0440\u0430\u043d\u0442\u0430\u0439\u043c\u0435 \u0438 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u043e\u0434\u0430-\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438. \u0417\u0430\u043c\u0435\u0447\u0443, \u0447\u0442\u043e \u044d\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u044b\u0439 Java-\u043c\u043e\u0434\u0443\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0434\u0432\u0430 \u0444\u0430\u0439\u043b\u0430 \u2014 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044e <code>DataBind<\/code> \u0438 Metacode-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 <code>DataBindMetacode<\/code>.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/i.gyazo.com\/e13048bb58d052ef16fea8d7f7939dd1.png\" alt=\"common module\"\/><\/p>\n<p>  <\/p>\n<h3 id=\"3-apt-modul\">3. <code>apt<\/code> \u043c\u043e\u0434\u0443\u043b\u044c<\/h3>\n<p>  <\/p>\n<p><em>apt<\/em> \u043c\u043e\u0434\u0443\u043b\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u043a\u043e\u0434\u0430-\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u043b\u0430\u0441\u0441\u044b. \u041a\u0430\u043a \u0443\u0436\u0435 \u0431\u044b\u043b\u043e \u0441\u043a\u0430\u0437\u0430\u043d\u043e, \u044d\u0442\u043e\u0442 \u043c\u043e\u0434\u0443\u043b\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 <em>common<\/em> \u0438 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0441\u0442\u0430\u0434\u0438\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438. \u041a\u0430\u043a \u0438 <em>common<\/em>, \u044d\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u044b\u0439 Java-\u043c\u043e\u0434\u0443\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u2014 <code>DataBindProcessor<\/code>. \u0418\u043c\u0435\u043d\u043d\u043e \u0432 \u044d\u0442\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c <code>DataBind<\/code> \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044e, \u043f\u0430\u0440\u0441\u0438\u0442\u044c <em>XML<\/em>-\u043b\u0435\u0439\u0430\u0443\u0442 \u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043c\u0435\u0442\u0430-\u043a\u043e\u0434. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0447\u0442\u043e <em>apt<\/em> \u043c\u043e\u0434\u0443\u043b\u044c \u0442\u0430\u043a\u0436\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 <code>org.brooth.androjeta:androjeta-apt:+:noapt<\/code>, \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u044f \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043a\u043b\u0430\u0441\u0441\u0430\u043c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/i.gyazo.com\/c669e2da3ec3fdf313a59132c53f1e62.png\" alt=\"apt module\"\/><\/p>\n<p>  <\/p>\n<h3 id=\"4-podgotavlivaem-app\">4. \u041f\u043e\u0434\u0433\u043e\u0442\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c <code>app<\/code><\/h3>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043c\u0435\u0442\u0430-\u043a\u043e\u0434\u0430, \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u041f\u0435\u0440\u0432\u044b\u0439 \u0434\u0435\u043b\u043e\u043c \u043c\u044b \u0438\u0437\u043c\u0435\u043d\u0438\u043c \u043d\u0430\u0448 \u043b\u0435\u0439\u0430\u0443\u0442:<\/p>\n<p>  <\/p>\n<pre><code class=\"xml\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;  &lt;LinearLayout     xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;     xmlns:androjeta=&quot;http:\/\/schemas.jeta.brooth.org\/androjeta&quot;     android:orientation=&quot;vertical&quot;     android:layout_width=&quot;match_parent&quot;     android:layout_height=&quot;match_parent&quot;&gt;      &lt;TextView         android:id=&quot;@+id\/firstName&quot;         androjeta:setText=&quot;master.user.firstName&quot;         android:layout_width=&quot;wrap_content&quot;         android:layout_height=&quot;wrap_content&quot; \/&gt;      &lt;TextView         android:id=&quot;@+id\/lastName&quot;         androjeta:setText=&quot;master.user.lastName&quot;         android:layout_width=&quot;wrap_content&quot;         android:layout_height=&quot;wrap_content&quot; \/&gt; &lt;\/LinearLayout&gt;<\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u0435: \u043c\u044b \u043e\u0431\u044a\u044f\u0432\u0438\u043b\u0438 \u0441\u0432\u043e\u0439 <em>namespace<\/em> \u0441 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043e\u043c \u201candrojeta\u201d \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0434\u0432\u0443\u043c <code>TextView<\/code> \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b <code>androjeta:setText<\/code> \u0441 <em>DB<\/em>-\u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c\u0438. \u0422\u0430\u043a \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u043d\u0430\u0439\u0442\u0438 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u044d\u0442\u0438 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432 <code>DataBindProcessor<\/code>, \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043c\u0435\u0442\u0430-\u043a\u043e\u0434.<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">package org.brooth.androjeta.samples.databinding;  import android.app.Activity; import android.os.Bundle;  @DataBind(layout = &quot;activity_main&quot;) public class MainActivity extends Activity {      final User user = new User(&quot;John&quot;, &quot;Smith&quot;);      @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_main);         MetaHelper.applyDataBinding(this);     } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0443\u0442 \u0432\u0430\u0436\u043d\u044b\u043c \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0434\u0432\u0435 \u0432\u0435\u0449\u0438. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u043d\u0430 \u0430\u043a\u0442\u0438\u0432\u0438\u0442\u0438 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044e <code>@DataBind<\/code>, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0440\u0430\u043d\u0435\u0435 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0432 <em>common<\/em> \u043c\u043e\u0434\u0443\u043b\u0435. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043d\u0430 \u0441\u0442\u0430\u0434\u0438\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 Jeta \u043d\u0430\u0439\u0434\u0435\u0442 \u044d\u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0441 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0441\u0442 \u0435\u0433\u043e \u0432 <code>DataBindProcessor<\/code>. \u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043c\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 \u043b\u0435\u0439\u0430\u0443\u0442, \u043c\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c <code>MetaHelper.applyDataBind(this)<\/code>. C \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0430\u043a\u0438\u0445 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043f\u0440\u043e\u0449\u0435 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u043c\u0435\u0442\u0430-\u043a\u043e\u0434\u0443. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u044d\u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0441.<\/p>\n<p>  <\/p>\n<pre><code>package org.brooth.androjeta.samples.databinding;  import org.brooth.jeta.metasitory.MapMetasitory; import org.brooth.jeta.metasitory.Metasitory;  public class MetaHelper {     private static MetaHelper instance = new MetaHelper(&quot;org.brooth.androjeta.samples&quot;);     private final Metasitory metasitory;      private MetaHelper(String metaPackage) {         metasitory = new MapMetasitory(metaPackage);     }      public static void applyDataBinding(Object master) {         new DataBindController&lt;&gt;(instance.metasitory, master).apply();     } }<\/code><\/pre>\n<p>  <\/p>\n<p><em>MetaHelper<\/em> \u2014 \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441. \u042d\u0442\u043e \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a \u043c\u0435\u0442\u0430-\u043a\u043e\u0434\u0443. \u041e\u043d \u0441\u043b\u0443\u0436\u0438\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0439 \u043e\u0431 \u044d\u0442\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043d\u0430 <a href=\"http:\/\/jeta.brooth.org\/guide\/meta-helper.html\">\u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435<\/a>. \u0422\u0443\u0442 \u0436\u0435 \u043d\u0430\u043c \u0432\u0430\u0436\u043d\u043e, \u0447\u0442\u043e \u043c\u0435\u0442\u043e\u0434 <code>applyDataBinding<\/code> \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 <code>DataBindController<\/code>-\u0443:<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">package org.brooth.androjeta.samples.databinding;  import org.brooth.jeta.MasterController; import org.brooth.jeta.metasitory.Metasitory;  public class DataBindController&lt;M&gt; extends MasterController&lt;M, DataBindMetacode&lt;M&gt;&gt; {      public DataBindController(Metasitory metasitory, M master) {         super(metasitory, master, DataBind.class);     }      public void apply() {         for(DataBindMetacode&lt;M&gt; metacode : metacodes)             metacode.apply(master);     } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u0430\u043f\u043e\u043c\u043d\u044e, \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u044b \u2014 \u044d\u0442\u043e \u043a\u043b\u0430\u0441\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442 \u043c\u0435\u0442\u0430-\u043a\u043e\u0434 \u043a \u043c\u0430\u0441\u0442\u0435\u0440\u0430\u043c. \u0411\u043e\u043b\u044c\u0448\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u0430 <a href=\"http:\/\/jeta.brooth.org\/guide\/meta-helper.html\">\u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435<\/a>.<\/p>\n<p>  <\/p>\n<p>\u041d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u043c \u0448\u0430\u0433\u0435 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c <code>DataBindProcessor<\/code> \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 Jeta \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043c\u0435\u0442\u0430-\u043a\u043e\u0434\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u043c \u043f\u0430\u043a\u0435\u0442\u0435 app \u043c\u043e\u0434\u0443\u043b\u044f (<code>app\/src\/main\/java<\/code>) \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b <code>jeta.properties<\/code> \u0441 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c:<\/p>\n<p>  <\/p>\n<pre><code>processors.add = org.brooth.androjeta.samples.databinding.apt.DataBindProcessor metasitory.package = org.brooth.androjeta.samples application.package = org.brooth.androjeta.samples.databinding<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u0438 \u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 \u043d\u0430 <a href=\"http:\/\/jeta.brooth.org\/guide\/config.html\">\u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435<\/a>.<\/p>\n<p>  <\/p>\n<h3 id=\"5-databindprocessor\">5. DataBindProcessor<\/h3>\n<p>  <\/p>\n<p>\u0414\u0443\u043c\u0430\u044e, \u0438\u0437\u043b\u0438\u0448\u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0448\u0430\u0433 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430, \u0442.\u043a. \u043d\u0438\u0447\u0435\u0433\u043e \u0438\u043d\u043d\u043e\u0432\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043e\u043d\u0438 \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442. \u0414\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b: \u043c\u044b \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043c\u0441\u044f <em>SAX<\/em>-\u043f\u0430\u0440\u0441\u0435\u0440\u043e\u043c \u043f\u043e <em>XML<\/em>-\u043b\u0435\u0439\u0430\u0443\u0442\u0443, \u043d\u0430\u0445\u043e\u0434\u0438\u043c <em>DB<\/em>-\u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 Java-\u043a\u043e\u0434.<\/p>\n<p>  <\/p>\n<p>\u041d\u0443\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e Jeta \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 <a href=\"https:\/\/github.com\/square\/javapoet\">JavaPoet<\/a> \u2014 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u043e\u0442 <a href=\"http:\/\/square.github.io\">Square<\/a> \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 Java-\u043a\u043e\u0434\u0430. \u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043f\u0440\u043e\u0439\u0442\u0438\u0441\u044c \u043f\u043e <em>README<\/em>, \u0435\u0441\u043b\u0438 \u0441\u043e\u0431\u0435\u0440\u0435\u0442\u0435\u0441\u044c \u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440. \u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u043e\u0436\u0443 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 <code>DataBindProcessor<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">package org.brooth.androjeta.samples.databinding.apt;  import com.squareup.javapoet.ClassName; import com.squareup.javapoet.MethodSpec; import com.squareup.javapoet.ParameterizedTypeName; import com.squareup.javapoet.TypeSpec;  import org.brooth.androjeta.samples.databinding.DataBind; import org.brooth.androjeta.samples.databinding.DataBindMetacode; import org.brooth.jeta.apt.ProcessingContext; import org.brooth.jeta.apt.ProcessingException; import org.brooth.jeta.apt.RoundContext; import org.brooth.jeta.apt.processors.AbstractProcessor; import org.xml.sax.Attributes; import org.xml.sax.SAXException; import org.xml.sax.helpers.DefaultHandler;  import java.io.File; import java.io.FileNotFoundException;  import javax.lang.model.element.Modifier; import javax.lang.model.element.TypeElement; import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory;  public class DataBindProcessor extends AbstractProcessor {     private static final String XMLNS_PREFIX = &quot;xmlns:&quot;;     private static final String ANDROID_NAMESPACE = &quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;;     private static final String ANDROJETA_NAMESPACE = &quot;http:\/\/schemas.jeta.brooth.org\/androjeta&quot;;      private ClassName textViewClassname;     private ClassName rCLassName;      private String layoutsPath;      private String androidPrefix;     private String androjetaPrefix;     private String componentId;     private String componentExpression;      public DataBindProcessor() {         super(DataBind.class);     }      @Override     public void init(ProcessingContext processingContext) {         super.init(processingContext);         layoutsPath = processingContext.processingEnv().getOptions().get(&quot;layoutsPath&quot;);         if (layoutsPath == null)             throw new ProcessingException(&quot;'layoutsPath' not defined&quot;);          String appPackage = processingContext.processingProperties().getProperty(&quot;application.package&quot;);         if (appPackage == null)             throw new ProcessingException(&quot;'application.package' not defined&quot;);          textViewClassname = ClassName.bestGuess(&quot;android.widget.TextView&quot;);         rCLassName = ClassName.bestGuess(appPackage + &quot;.R&quot;);     }      @Override     public boolean process(TypeSpec.Builder builder, final RoundContext roundContext) {         TypeElement element = roundContext.metacodeContext().masterElement();         ClassName masterClassName = ClassName.get(element);         builder.addSuperinterface(ParameterizedTypeName.get(                 ClassName.get(DataBindMetacode.class), masterClassName));          final MethodSpec.Builder methodBuilder = MethodSpec.                 methodBuilder(&quot;apply&quot;)                 .addAnnotation(Override.class)                 .addModifiers(Modifier.PUBLIC)                 .returns(void.class)                 .addParameter(masterClassName, &quot;master&quot;);          String layoutName = element.getAnnotation(DataBind.class).layout();         String layoutPath = layoutsPath + File.separator + layoutName + &quot;.xml&quot;;         File layoutFile = new File(layoutPath);         if (!layoutFile.exists())             throw new ProcessingException(new FileNotFoundException(layoutPath));          androidPrefix = null;         androjetaPrefix = null;          try {             SAXParserFactory factory = SAXParserFactory.newInstance();             SAXParser saxParser = factory.newSAXParser();             saxParser.parse(layoutFile, new DefaultHandler() {                         @Override                         public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {                             for (int i = 0; i &lt; attributes.getLength(); i++) {                                 if (androidPrefix == null &amp;&amp;                                         attributes.getQName(i).startsWith(XMLNS_PREFIX) &amp;&amp;                                         attributes.getValue(i).equals(ANDROID_NAMESPACE)) {                                     androidPrefix = attributes.getQName(i).substring(XMLNS_PREFIX.length());                                     continue;                                 }                                  if (androjetaPrefix == null &amp;&amp;                                         attributes.getQName(i).startsWith(XMLNS_PREFIX) &amp;&amp;                                         attributes.getValue(i).equals(ANDROJETA_NAMESPACE)) {                                     androjetaPrefix = attributes.getQName(i).substring(XMLNS_PREFIX.length());                                     continue;                                 }                                  if (componentId == null &amp;&amp; androidPrefix != null &amp;&amp;                                         attributes.getQName(i).equals(androidPrefix + &quot;:id&quot;)) {                                     componentId = attributes.getValue(i).substring(&quot;@+id\/&quot;.length());                                     continue;                                 }                                  if (componentExpression == null &amp;&amp; androjetaPrefix != null &amp;&amp;                                         attributes.getQName(i).equals(androjetaPrefix + &quot;:setText&quot;)) {                                     componentExpression = attributes.getValue(i);                                 }                             }                         }                          @Override                         public void endElement(String uri, String localName, String qName) throws SAXException {                             if (componentExpression == null)                                 return;                              if (componentId == null)                                 throw new ProcessingException(&quot;Failed to process expression '&quot; +                                         componentExpression + &quot;', component has no id&quot;);                              methodBuilder.addStatement(&quot;(($T) master.findViewById($T.id.$L))\\n\\t.setText($L)&quot;,                                     textViewClassname, rCLassName, componentId, componentExpression);                              componentId = null;                             componentExpression = null;                         }                     }             );          } catch (Exception e) {             throw new ProcessingException(e);         }          builder.addMethod(methodBuilder.build());         return false;     } }<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"6-ispolzovanie\">6. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435<\/h3>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0443\u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u0438\u043c\u0441\u044f, \u0447\u0442\u043e \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">.\/gradlew assemble<\/code><\/pre>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432 \u0432\u044b\u0432\u043e\u0434\u0435 \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043e\u0448\u0438\u0431\u043e\u043a, \u0438 \u0432\u044b \u0432\u0438\u0434\u0438\u0442\u0435 \u0437\u0430\u043f\u0438\u0441\u044c:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">Note: Metacode built in Xms<\/code><\/pre>\n<p>  <\/p>\n<p>\u0437\u043d\u0430\u0447\u0438\u0442 \u0432\u0441\u0435 \u041e\u041a, \u0438 \u043f\u043e \u043f\u0443\u0442\u0438 <code>\/app\/build\/generated\/source\/apt\/<\/code> \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/i.gyazo.com\/c66234cabfef512a8f8f0b36f3179cf2.png\" alt=\"metacode\"\/><\/p>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e, \u043c\u0435\u0442\u0430-\u043a\u043e\u0434 \u043e\u0442\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d \u0438 \u0445\u043e\u0440\u043e\u0448\u043e \u0447\u0438\u0442\u0430\u0435\u043c, \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0435\u0433\u043e \u043b\u0435\u0433\u043a\u043e \u043e\u0442\u043b\u0430\u0436\u0438\u0432\u0430\u0442\u044c. \u0422\u0430\u043a \u0436\u0435, \u0432\u0430\u0436\u043d\u044b\u043c \u043f\u043b\u044e\u0441\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e, \u0447\u0442\u043e \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0430\u0442\u0441\u044f \u043d\u0430 \u0441\u0442\u0430\u0434\u0438\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438. \u0422\u0430\u043a, \u0435\u0441\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c <code>@DataBind<\/code> \u043d\u0430 Activity \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0435\u0442 \u043f\u043e\u043b\u044f <code>user<\/code>, \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043b\u0435\u0439\u0430\u0443\u0442\u0430 \u0438\u043b\u0438 \u043e\u0448\u0438\u0431\u0438\u0442\u044c\u0441\u044f \u0432 <em>DB<\/em>-\u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0438, \u0442\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u043d\u0435 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0438 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0435 \u0441\u043e\u0431\u0435\u0440\u0435\u0442\u0441\u044f.<\/p>\n<p>  <\/p>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0438, \u043a\u0430\u043a \u043e\u0436\u0438\u0434\u0430\u0435\u0442\u0441\u044f, \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435 <em>user<\/em>.<\/p>\n<p>  <\/p>\n<h3 id=\"7-zaklyuchenie-\">7. \u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 .<\/h3>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0448\u0443 \u043e\u0442\u043d\u0435\u0441\u0442\u0438\u0441\u044c \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443 \u0438\u043c\u0435\u043d\u043d\u043e \u043a\u0430\u043a \u043a <em>Proof-Of-Concept<\/em>, \u0430 \u043d\u0435 \u043a\u0430\u043a \u043a \u0433\u043e\u0442\u043e\u0432\u043e\u043c\u0443 \u0440\u0435\u0448\u0435\u043d\u0438\u044e. \u041a \u0442\u043e\u043c\u0443 \u0436\u0435, \u0435\u0433\u043e \u0437\u0430\u0434\u0430\u0447\u0430 \u2014 \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430, \u0438 \u043d\u0435 \u0444\u0430\u043a\u0442, \u0447\u0442\u043e <em>Jeta-DB<\/em> \u043f\u043e\u0439\u0434\u0435\u0442 \u0432 \u043b\u0430\u0439\u0432.<\/p>\n<p>  <\/p>\n<p>\u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043e\u0431\u0435\u0449\u0430\u043d\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432. \u041d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445, \u0447\u0442\u043e \u0431\u044b \u0432\u044b \u0445\u043e\u0442\u0435\u043b\u0438 \u0432\u0438\u0434\u0435\u0442\u044c \u0432 <em>Data-Binding<\/em>-\u0435. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432\u0430\u043c \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u043a\u0430\u043a\u0438\u0445 \u2014 \u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043e\u0442 Google. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u043a\u0430\u043a\u043e\u0433\u043e-\u0442\u043e \u0435\u0449\u0435 <em>boiler-plate<\/em> \u043a\u0435\u0439\u0441\u0430. \u0422\u0430\u043a\u0436\u0435, \u0431\u0443\u0434\u0443 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u0435\u043d \u0437\u0430 \u043b\u044e\u0431\u044b\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f \u0438\u043b\u0438 \u043f\u043e\u0436\u0435\u043b\u0430\u043d\u0438\u044f. \u042f, \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0441\u0430\u043c\u043e\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435 \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0432 \u0431\u0443\u0434\u0443\u0449\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445.<\/p>\n<p>  <\/p>\n<p>\u0421\u043f\u0430\u0441\u0438\u0431\u043e, \u0447\u0442\u043e \u0434\u043e\u0447\u0438\u0442\u0430\u043b\u0438 \u0434\u043e \u043a\u043e\u043d\u0446\u0430.<br \/>  Happy code-generating! \ud83d\ude42<\/p>\n<p>  <\/p>\n<p>\u00bb <a href=\"http:\/\/jeta.brooth.org\">\u041e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0430\u0439\u0442<\/a><br \/>  \u00bb <a href=\"https:\/\/github.com\/brooth\/androjeta-samples\/tree\/master\/data-binding\">\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043d\u0430 GitHub<\/a><br \/>  \u00bb <a href=\"https:\/\/github.com\/brooth\/jeta\">Jeta \u043d\u0430 GitHub<\/a><br \/>  \u00bb <a href=\"https:\/\/github.com\/brooth\/androjeta\">Androjeta \u043d\u0430 GitHub<\/a><\/p>\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:\/\/habrahabr.ru\/post\/317970\/\"> https:\/\/habrahabr.ru\/post\/317970\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p><img decoding=\"async\" align=\"left\" src=\"http:\/\/jeta.brooth.org\/static\/images\/jeta.png\"\/> \u0412\u0441\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u044b \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0441 <em>boiler-plate<\/em> \u043a\u043e\u0434\u043e\u043c. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e Android-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u044b. \u041f\u0438\u0441\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u2014 \u0434\u0435\u043b\u043e \u043d\u0435\u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u043d\u043e\u0435 \u0438, \u044f \u0443\u0432\u0435\u0440\u0435\u043d, \u0447\u0442\u043e \u043d\u0435\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0431\u044b \u044d\u0442\u043e \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u043b\u043e \u0443\u0434\u043e\u0432\u043e\u043b\u044c\u0441\u0442\u0432\u0438\u0435. \u0412 \u043e\u0434\u0438\u043d \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u0434\u0435\u043d\u044c \u044f \u043d\u0430\u0447\u0430\u043b \u0438\u0441\u043a\u0430\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u044f. \u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0438\u0434\u0435\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u0430: \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0438 \u043f\u043e\u0437\u0436\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0432 \u0440\u0430\u043d\u0442\u0430\u0439\u043c\u0435, \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043d\u0435 \u043d\u0430\u0448\u043b\u043e\u0441\u044c, \u0438 \u044f \u043f\u0440\u0438\u043d\u044f\u043b\u0441\u044f \u0437\u0430 \u0434\u0435\u043b\u043e. \u041f\u0435\u0440\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0431\u044b\u043b\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u043a\u0430\u043a \u043e\u0434\u0438\u043d \u0438\u0437 \u043f\u043e\u0434\u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432. \u0411\u043e\u043b\u0435\u0435 \u0434\u0432\u0443\u0445 \u043b\u0435\u0442 \u044f \u0431\u044b\u043b \u0434\u043e\u0432\u043e\u043b\u0435\u043d \u044d\u0442\u0438\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c. \u041e\u043d\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a, \u043a\u0430\u043a \u044f \u044d\u0442\u043e\u0433\u043e \u043e\u0436\u0438\u0434\u0430\u043b. \u0412\u0440\u0435\u043c\u044f \u0448\u043b\u043e, \u043c\u043e\u0434\u0443\u043b\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u044f\u043b\u0441\u044f \u043d\u043e\u0432\u044b\u043c\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438, \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043b\u0441\u044f, \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b\u0441\u044f. \u0412 \u0446\u0435\u043b\u043e\u043c <a href=\"https:\/\/en.wikipedia.org\/wiki\/Proof_of_concept\">PoC<\/a> \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u043c, \u0438 \u044f \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u0441 \u043a\u043e\u043c\u044c\u044e\u043d\u0438\u0442\u0438.<\/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-282718","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/282718","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=282718"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/282718\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=282718"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=282718"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=282718"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}