{"id":256904,"date":"2015-05-10T11:19:02","date_gmt":"2015-05-10T07:19:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=256904"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=256904","title":{"rendered":"\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043c\u043e\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0427\u0430\u0441\u0442\u044c 1. Web-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435"},"content":{"rendered":"<p>     \t \u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442. \u042d\u0442\u043e \u043f\u0435\u0440\u0432\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u0438\u0437 \u0446\u0438\u043a\u043b\u0430 \u00ab\u041a\u0430\u043a \u044f \u0434\u0435\u043b\u0430\u044e \u0441\u0432\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442\u00bb. \u0417\u0434\u0435\u0441\u044c \u043f\u043e\u0439\u0434\u0435\u0442 \u0440\u0435\u0447\u044c \u043d\u0435 \u043e \u0441\u0430\u043c\u043e\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0435, \u0430 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043e\u043d \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f.<\/p>\n<p>  \u041a\u0440\u0430\u0442\u043a\u043e \u043e\u0431 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u0432\u0441\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430:<\/p>\n<ol>\n<li> \u0421\u043b\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0438: \u0421\u0423\u0411\u0414 PostgreSQL 9.4 <\/li>\n<li> \u0421\u0440\u0435\u0434\u043d\u0438\u0439 \u0441\u043b\u043e\u0439: Node.js (Express) + Redis. \u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f REST API, \u0448\u0430\u0440\u0434\u0438\u043d\u0433 (\u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435) <\/li>\n<li> \u041a\u043b\u0438\u0435\u043d\u0442\u044b:\n<ul>\n<li>web-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/li>\n<li>\u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><a name=\"habracut\"><\/a><br \/>   \u0421\u0440\u0430\u0437\u0443 \u0441\u043a\u0430\u0436\u0443, \u0447\u0442\u043e <a href=\"https:\/\/api.finex.io\">API \u0441\u0435\u0440\u0432\u0438\u0441\u0430<\/a> \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043e\u0442\u043a\u0440\u044b\u0442\u044b \u043a\u0430\u043a \u0438 <a href=\"https:\/\/github.com\/maksim-amko\/finex.io\">\u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 Web-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/a> (\u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 github)<\/p>\n<p>   \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c\u0441\u044f Web-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e:<\/p>\n<ul>\n<li><strong>CoffeeScript<\/strong>. \u0422\u0430\u043a \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c, \u0442\u043e \u044f \u0438\u0437\u0443\u0447\u0430\u043b Marionette.js \u043f\u043e <a href=\"http:\/\/www.backbonerails.com\/series\">\u0441\u043a\u0440\u0438\u043d\u043a\u0430\u0441\u0442\u0430\u043c \u043e\u0442 Brian Mann<\/a>, \u0430 \u043e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b Ruby On Rails \u0438 CoffeeScript. \u041f\u043e\u0437\u0436\u0435 \u044f \u043e\u0442\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043e\u0442 Ruby On Rails, \u0430 \u0432\u043e\u0442 CoffeeScript \u043f\u0440\u0438\u0436\u0438\u043b\u0441\u044f. <\/li>\n<li> <strong>Marionette.js<\/strong> \u2014 MVC \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a (\u0434\u043b\u044f \u0437\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u044c <a href=\"http:\/\/habrahabr.ru\/post\/207730\/\">\u0437\u0434\u0435\u0441\u044c<\/a>) <\/li>\n<li> <strong>Gulp<\/strong> \u2014 \u0441\u0431\u043e\u0440\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 <\/li>\n<li> <strong>Bower<\/strong> \u2014 \u043f\u0430\u043a\u0435\u0442\u043d\u044b\u0439 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 <\/li>\n<\/ul>\n<p>   \u0427\u0442\u043e \u0438\u0437 \u0441\u0435\u0431\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u044d\u0442\u043e web-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435? \u042d\u0442\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0445 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 (\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f, \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438, \u0441\u0431\u0440\u043e\u0441 \u043f\u0430\u0440\u043e\u043b\u044f, \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u0430) \u0438 \u043e\u0434\u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 (Single-Page Application).<\/p>\n<h5> \u0424\u0430\u0439\u043b\u043e\u0432\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/h5>\n<p>  <\/p>\n<ul>\n<li><strong>_<\/strong> \u2014 \u0433\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0441\u0430\u0439\u0442\u0430<\/li>\n<li><strong>_&lt;page_name&gt;<\/strong> \u2014 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f<\/li>\n<li><strong>_&lt;page_name&gt;__&lt;sub_page_name&gt;<\/strong> \u2014 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f<\/li>\n<li><strong>bower_components<\/strong><\/li>\n<li><strong>lib<\/strong> \u2014 \u043e\u0431\u0449\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446<\/li>\n<li><strong>node_modules<\/strong><\/li>\n<li><strong>public<\/strong> \u2014 \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442<\/li>\n<\/ul>\n<p>  <\/p>\n<h5> \u0424\u0430\u0439\u043b\u043e\u0432\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b<\/h5>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/files\/77a\/990\/e6f\/77a990e6f637478aa3f80a6ab84a7fc9.png\" alt=\"\u0424\u0430\u0439\u043b\u043e\u0432\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b\"\/><\/p>\n<p>  \u0424\u0430\u0439\u043b <em>app\/assets\/javascripts\/app.coffee<\/em>&gt; \u2014 \u044d\u0442\u043e \u00ab\u0442\u043e\u0447\u043a\u0430 \u0432\u0445\u043e\u0434\u0430\u00bb \u0434\u043b\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b.<\/p>\n<p>  \u041f\u0430\u043f\u043a\u0430 <em>app\/assets\/javascripts\/backbone<\/em> \u043d\u0443\u0436\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f SPA.<\/p>\n<ul>\n<li><strong>apps<\/strong> \u2014 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043c\u043e\u0434\u0443\u043b\u0438-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0421\u0432\u043e\u0435\u0433\u043e \u0440\u043e\u0434\u0430 \u044d\u0442\u043e \u00ab\u043a\u0438\u0440\u043f\u0438\u0447\u0438\u043a\u0438\u00bb, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u0442\u0440\u043e\u0438\u0442\u0441\u044f web-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u041e\u043d\u0438 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0435 \u0434\u0440\u0443\u0433 \u043e\u0442 \u0434\u0440\u0443\u0433\u0430 \u0438 \u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438 \u0438\u0434\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0435\u0440\u0435\u0437 \u0448\u0438\u043d\u0443 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439. <\/li>\n<li><strong>entities<\/strong> \u2014 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0438 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438<\/li>\n<li><strong>lib<\/strong> \u2014 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438<\/li>\n<\/ul>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0428\u0430\u0431\u043b\u043e\u043d \u0434\u043b\u044f index.html<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"html\">&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt;     &lt;meta charset=&quot;utf-8&quot;&gt;     &lt;link href=&quot;\/_&lt;page_name&gt;[\/&lt;sub_page_name&gt;]\/assets\/app.css&quot; media=&quot;screen&quot; rel=&quot;stylesheet&quot;\/&gt; &lt;\/head&gt; &lt;body&gt;   &lt;script src=&quot;\/_&lt;page_name&gt;[\/&lt;sub_page_name&gt;]\/assets\/app.js&quot;&gt;&lt;\/script&gt; &lt;\/body&gt; &lt;\/html&gt; <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<h5> \u0414\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h5>\n<p>   \u0412\u0441\u0435 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u0435 <em>App.entities<\/em>. \u0414\u043e\u0441\u0442\u0443\u043f \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u043a \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044f\u043c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043a\u0430\u043a \u043f\u0440\u044f\u043c\u043e\u0439 (<em>App.entities.projects<\/em>), \u0442\u0430\u043a \u0438 \u0447\u0435\u0440\u0435\u0437 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u0443\u044e \u0448\u0438\u043d\u0443 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439: <em>App.request(&#8216;project:entities&#8217;)<\/em><\/p>\n<p>  \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u0435\u0441\u0442\u044c \u0434\u0432\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438:<\/p>\n<ul>\n<li><em>App.request(&#8216;project:entities&#8217;)<\/em> \u2014 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044f \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439<\/li>\n<li><em>App.request(&#8216;project:new:entity&#8217;)<\/em> \u2014 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043d\u043e\u0432\u0430\u044f \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c<\/li>\n<\/ul>\n<p>  <\/p>\n<h5> \u0417\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h5>\n<p>  <\/p>\n<ul>\n<li> \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0441\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0432\u0445\u043e\u0434\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e. \u0415\u0441\u043b\u0438 \u0432\u0441\u0435 \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435, \u0442\u043e \u0437\u0430\u043f\u0440\u043e\u0441 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0442\u043e\u043a\u0435\u043d \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0431\u0443\u0434\u0443\u0449\u0438\u043c\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438 \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443. \u042d\u0442\u043e\u0442 \u0442\u043e\u043a\u0435\u043d \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u0432 <em>sessionStorage<\/em> \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u0438 \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 <em>\/i<\/em>. \u042d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c SPA. <\/li>\n<li> \u041e\u0442\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u0445\u043e\u0434\u0430 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 <em>\/i<\/em>, \u0433\u0434\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0442\u043e\u043a\u0435\u043d\u0430 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 <em>sessionStorage<\/em>. \u0415\u0441\u043b\u0438 \u0432\u0441\u0435 \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435, \u0442\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 (\u0441\u043c. Marionette.Application). <\/li>\n<li> \u0414\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u043e\u0434\u0438\u043d \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u043e\u0432 \u0438 \u0434\u0440\u0443\u0433\u043e\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438. <\/li>\n<li> \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f \u043c\u043e\u0434\u0443\u043b\u0438-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0431\u043e\u043a\u043e\u0432\u043e\u0433\u043e \u043c\u0435\u043d\u044e \u0438 \u0448\u0430\u043f\u043a\u0438. <\/li>\n<\/ul>\n<p>  <\/p>\n<h5> \u041c\u043e\u0434\u0443\u043b\u0438-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h5>\n<p>   \u0412\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u044c\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u2014 \u0433\u043b\u0430\u0432\u043d\u044b\u043c \u0440\u0435\u0433\u0438\u043e\u043d\u043e\u043c. \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f \u043e\u043d\u0438 \u0447\u0435\u0440\u0435\u0437 \u0441\u043c\u0435\u043d\u0443 \u0430\u0434\u0440\u0435\u0441\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 (\u0441\u043c. Marionette.AppRouter)<\/p>\n<p>   \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043c\u043e\u0434\u0443\u043b\u044c \u00ab\u041f\u0440\u043e\u0435\u043a\u0442\u044b\u00bb (<em>backbone\/apps\/references_projects<\/em>).<\/p>\n<p>  <img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/37f\/c1f\/f96\/37fc1ff968ae4fe38ed624515c8e1042.png\" alt=\"\u0424\u0430\u0439\u043b\u043e\u0432\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043c\u043e\u0434\u0443\u043b\u044f\"\/><\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 (\u0444\u0430\u0439\u043b backbone\/entities\/project.coffee)<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"coffeescript\">@CashFlow.module 'Entities', (Entities, App, Backbone, Marionette, $, _) -&gt;   class Entities.Project extends Entities.Model     idAttribute: 'idProject'     urlRoot: App.getServer() + '\/projects'      defaults:       idUser: null       idProject: null       name: ''       writers: []       note: ''      parse: (response, options)-&gt;       if not _.isUndefined response.project         response = response.project       response    # --------------------------------------------------------------------------------    class Entities.Projects extends Entities.Collection     model: Entities.Project     url: 'projects'      parse: (response, options)-&gt;       response.projects      initialize: -&gt;       @on 'change:name', =&gt;         @sort()      comparator: (project) -&gt;       project.get('name')    API =     newProjectEntity: -&gt;       new Entities.Project      getProjectEntities: (options = {})-&gt;       _.defaults options,         force: false       {force} = options        if !App.entities.projects         App.entities.projects = new Entities.Projects         force = true        projects = App.entities.projects        if force         projects.fetch           reset: true        projects    # --------------------------------------------------------------------------------    App.reqres.setHandler 'project:new:entity', -&gt;     API.newProjectEntity()    App.reqres.setHandler 'project:entities', (options)-&gt;     API.getProjectEntities(options)     <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  \u041c\u043e\u0434\u0443\u043b\u044c \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437:<\/p>\n<ul>\n<li> <strong>\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0444\u0430\u0439\u043b<\/strong>. \u0417\u0434\u0435\u0441\u044c \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0440\u043e\u0443\u0442\u0435\u0440\u044b \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 \u043e\u0431\u0449\u0443\u044e \u0448\u0438\u043d\u0443 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 (\u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043c\u043e\u0434\u0443\u043b\u044f, \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u0440\u0443\u0433\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0441 \u043d\u0438\u043c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c)\n<div class=\"spoiler\"><b class=\"spoiler_title\">references_projects_app.coffee<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"coffeescript\">@CashFlow.module 'ReferencesProjectsApp', (ReferencesProjectsApp, App, Backbone, Marionette, $, _) -&gt;   class ReferencesProjectsApp.Router extends Marionette.AppRouter     appRoutes:       'references\/projects': 'list'    API =     list: -&gt;       ReferencesProjectsApp.list()    App.addInitializer -&gt;     new ReferencesProjectsApp.Router       controller: API    @list = (project) -&gt;     new ReferencesProjectsApp.List.Controller       project: project    @edit = (project, region) -&gt;     new ReferencesProjectsApp.Edit.Controller       project: project       region: region    # --------------------------------------------------------------------------------    App.reqres.setHandler 'project:edit', (project, region = App.request 'dialog:region') -&gt;     isNew = project.isNew()     editController = ReferencesProjectsApp.edit project, region      editController.on 'form:after:save', (model) -&gt;       if isNew         projects = App.request 'project:entities'         projects.add model       editController.form.formLayout.trigger 'dialog:close'      editController             <\/code><\/pre>\n<\/p><\/div>\n<\/div>\n<\/li>\n<li> <strong>\u041f\u043e\u0434\u043c\u043e\u0434\u0443\u043b\u0438<\/strong>. \u041f\u043e\u0434\u043c\u043e\u0434\u0443\u043b\u044c \u2014 \u044d\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f: \u043f\u043e\u043a\u0430\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 (list), \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 (edit), \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435(copy) \u0438 \u0442.\u0434. <\/li>\n<\/ul>\n<p>  \u041f\u043e\u0434\u043c\u043e\u0434\u0443\u043b\u044c \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437:<\/p>\n<ul>\n<li> <strong>controller.coffee<\/strong> \u2014 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 layout \u043c\u043e\u0434\u0443\u043b\u044f\n<div class=\"spoiler\"><b class=\"spoiler_title\">controller.coffee<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"coffeescript\">@CashFlow.module 'ReferencesProjectsApp.List', (List, App, Backbone, Marionette, $, _) -&gt;   class List.Controller extends App.Controllers.Application     initialize: (options = {})-&gt;        projects = App.request 'project:entities'        @layout = @getLayoutView projects        # \u043f\u043e\u0441\u043b\u0435 \u043f\u043e\u043a\u0430\u0437\u0430 layout \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043f\u0430\u043d\u0435\u043b\u044c \u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432       @listenTo @layout, 'show', =&gt;         @showPanel projects         @showList projects        # \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c layout \u0432 \u0433\u043b\u0430\u0432\u043d\u043e\u043c \u0440\u0435\u0433\u0438\u043e\u043d\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f       # \u043f\u0440\u0438 \u0441\u043c\u0435\u043d\u0435 layout (\u043a\u043e\u0433\u0434\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u043d\u0430\u0447\u043d\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c)       # \u0432\u0441\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0437\u0430\u043a\u0440\u044b\u0442\u044b       @show @layout      getLayoutView: (projects) -&gt;       new List.Layout         collection: projects      showPanel: (projects) -&gt;       panelView = @getPanelView projects       @show panelView,         region: @layout.panelRegion      getPanelView: (projects) -&gt;       new List.Panel         collection: projects      showList: (projects) -&gt;       listView = @getListView projects       @show listView,         region: @layout.listRegion      getListView: (projects) -&gt;       new List.Projects         collection: projects              <\/code><\/pre>\n<\/p><\/div>\n<\/div>\n<\/li>\n<li><strong>view.coffee<\/strong> \u2014 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f\n<div class=\"spoiler\"><b class=\"spoiler_title\">view.coffee<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"coffeescript\">@CashFlow.module 'ReferencesProjectsApp.List', (List, App, Backbone, Marionette, $, _) -&gt;   class List.Layout extends App.Views.Layout     template: 'references_projects\/list\/layout'      # \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0434\u0432\u0430 \u0440\u0435\u0433\u0438\u043e\u043d\u0430 \u0434\u043b\u044f \u043f\u0430\u043d\u0435\u043b\u0438 \u0441 \u043a\u043d\u043e\u043f\u043a\u0430\u043c\u0438 \u0438 \u0434\u043b\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b     regions:       panelRegion: '[name=panel-region]'       listRegion: '[name=list-region]'    # --------------------------------------------------------------------------------    class List.Panel extends App.Views.ItemView     template: 'references_projects\/list\/_panel'      ui:       btnAdd: '.btn[name=btnAdd]'       btnDel: '.btn[name=btnDel]'       btnRefresh: '.btn[name=btnRefresh]'      events:       'click @ui.btnAdd': 'add'       'click @ui.btnDel': 'del'       'click @ui.btnRefresh': 'refresh'      collectionEvents:       'sync': 'render'      add: -&gt;       model = App.request 'project:new:entity'       App.request 'project:edit', model      del: -&gt;       model = @collection.getFirstChosen()       if confirm('\u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442?')         model.destroy()      refresh: -&gt;       App.request 'project:entities',         force: true    # --------------------------------------------------------------------------------   # View \u0434\u043b\u044f \u0441\u0442\u0440\u043e\u043a\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044b   class List.Project extends App.Views.ItemView     template: 'references_projects\/list\/_project'     tagName: 'tr'      modelEvents:       'change': 'render'      events:       'click a': -&gt;         @model.choose()         App.request 'project:edit', @model     # --------------------------------------------------------------------------------    # View, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u043d, \u0435\u0441\u043b\u0438 \u043d\u0435\u0442 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432   class List.Empty extends App.Views.ItemView     template: 'references_projects\/list\/_empty'     tagName: 'tr'    #-----------------------------------------------------------------------    # CompositeView \u0434\u043b\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432   class List.Projects extends App.Views.CompositeView     template: 'references_projects\/list\/_projects'     childView: List.Project     emptyView: List.Empty     childViewContainer: 'tbody'      collectionEvents:       'sync': 'render'              <\/code><\/pre>\n<\/p><\/div>\n<\/div>\n<\/li>\n<li>\u041f\u0430\u043f\u043a\u0430 <strong>templates<\/strong> \u2014 \u0448\u0430\u0431\u043b\u043e\u043d\u044b, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u043f\u0440\u0438 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0439\n<ul>\n<li><strong>layout.eco<\/strong> \u2014 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0440\u0435\u0433\u0438\u043e\u043d\u044b, \u0433\u0434\u0435 \u0431\u0443\u0434\u0443\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u0441\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438 \u0438\u0445 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435\n<div class=\"spoiler\"><b class=\"spoiler_title\">layout.eco<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"html\">&lt;div name=&quot;panel-region&quot; id=&quot;ribbon&quot;&gt; &lt;\/div&gt;  &lt;div name=&quot;list-region&quot;&gt; &lt;\/div&gt;                     <\/code><\/pre>\n<\/p><\/div>\n<\/div>\n<\/li>\n<li><strong>_panel.eco<\/strong> \u2014 \u043f\u0430\u043d\u0435\u043b\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432\n<div class=\"spoiler\"><b class=\"spoiler_title\">_panel.eco<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"html\">&lt;div class=&quot;row&quot;&gt;     &lt;div class=&quot;col-sm-9&quot;&gt;         &lt;h3 class=&quot;page-title&quot;&gt;             \u0421\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0438 &lt;span&gt;&gt; \u041f\u0440\u043e\u0435\u043a\u0442\u044b&lt;\/span&gt;         &lt;\/h3&gt;     &lt;\/div&gt; &lt;\/div&gt; &lt;div class=&quot;btn-toolbar&quot; role=&quot;toolbar&quot;&gt;     &lt;div class=&quot;btn-group&quot;&gt;         &lt;button type=&quot;button&quot; name=&quot;btnAdd&quot; class=&quot;btn btn-default&quot;&gt;             &lt;i class=&quot;fa fa-plus&quot;&gt;&lt;\/i&gt;             \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c         &lt;\/button&gt;         &lt;button type=&quot;button&quot; name=&quot;btnDel&quot; class=&quot;btn btn-default&quot;&gt;             &lt;i class=&quot;fa fa-trash-o&quot;&gt;&lt;\/i&gt;             \u0423\u0434\u0430\u043b\u0438\u0442\u044c         &lt;\/button&gt;     &lt;\/div&gt;      &lt;div class=&quot;btn-group&quot;&gt;         &lt;button type=&quot;button&quot; name=&quot;btnRefresh&quot; class=&quot;btn btn-default&quot;&gt;             &lt;i class=&quot;fa fa-refresh&quot;&gt;&lt;\/i&gt;             \u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c         &lt;\/button&gt;     &lt;\/div&gt;      &lt;div class=&quot;btn-group&quot;&gt;         &lt;button type=&quot;button&quot; name=&quot;btnCopy&quot; class=&quot;btn btn-default&quot;&gt;             &lt;i class=&quot;fa fa-copy&quot;&gt;&lt;\/i&gt;             \u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c         &lt;\/button&gt;         &lt;button type=&quot;button&quot; name=&quot;btnMerge&quot; class=&quot;btn btn-default&quot;&gt;             &lt;i class=&quot;fa fa-code-fork fa-rotate-270 &quot;&gt;&lt;\/i&gt;             \u041e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c         &lt;\/button&gt;     &lt;\/div&gt; &lt;\/div&gt;                     <\/code><\/pre>\n<\/p><\/div>\n<\/div>\n<\/li>\n<li> <strong>_projects.eco<\/strong> \u2014 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0431\u0435\u0437 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e\n<div class=\"spoiler\"><b class=\"spoiler_title\">_projects.eco<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"html\">&lt;div class=&quot;row&quot;&gt;     &lt;div class=&quot;col-xs-12 col-sm-11 col-md-10 col-lg-9&quot;&gt;         &lt;table class=&quot;table table-hover table-condensed &quot;&gt;             &lt;thead&gt;             &lt;tr&gt;                 &lt;th&gt;\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435&lt;\/th&gt;                 &lt;th&gt;\u0412\u043b\u0430\u0434\u0435\u043b\u0435\u0446&lt;\/th&gt;                 &lt;th&gt;\u0414\u043e\u0441\u0442\u0443\u043f&lt;\/th&gt;                 &lt;th&gt;\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435&lt;\/th&gt;             &lt;\/tr&gt;             &lt;\/thead&gt;             &lt;tbody&gt;             &lt;\/tbody&gt;         &lt;\/table&gt;     &lt;\/div&gt; &lt;\/div&gt;                     <\/code><\/pre>\n<\/p><\/div>\n<\/div>\n<\/li>\n<li><strong>_project.eco<\/strong> \u2014 \u0441\u0442\u0440\u043e\u043a\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u044b\n<div class=\"spoiler\"><b class=\"spoiler_title\">_project.eco<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"html\">&lt;td&gt;     &lt;a href=&quot;#&quot;&gt;         &lt;%= @name %&gt;     &lt;\/a&gt; &lt;\/td&gt; &lt;td&gt;     &lt;%= CashFlow.entities.users.get(@idUser).get('name') %&gt; &lt;\/td&gt; &lt;td&gt;     &lt;% for idUser in @writers: %&gt;     &lt;span class=&quot;tag&quot;&gt;     &lt;%= CashFlow.entities.users.get(idUser).get('name') %&gt;     &lt;\/span&gt;     &lt;% end %&gt; &lt;\/td&gt; &lt;td&gt;     &lt;%= @note %&gt; &lt;\/td&gt;                                         <\/code><\/pre>\n<\/p><\/div>\n<\/div>\n<\/li>\n<li><strong>_empty.eco<\/strong> \u2014 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435, \u0447\u0442\u043e \u043d\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0445\n<div class=\"spoiler\"><b class=\"spoiler_title\">_empty.eco<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"html\">&lt;td colspan=&quot;4&quot;&gt;     &lt;div class=&quot;well well-sm text-center&quot;&gt;         \u041d\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0445     &lt;\/div&gt; &lt;\/td&gt;                     <\/code><\/pre>\n<\/p><\/div>\n<\/div>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>  <\/p>\n<h5> \u0421\u0431\u043e\u0440\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/h5>\n<p>   \u041d\u0430 \u043f\u0435\u0440\u0432\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b Ruby On Rails. \u041c\u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0430\u0441\u044c \u0438\u0434\u0435\u044f \u0444\u0430\u0439\u043b\u043e\u043f\u0440\u043e\u0432\u043e\u0434\u0430 (asset pipeline). \u041d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0446\u0435\u043b\u044b\u0439 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0434\u0438 \u0444\u0430\u0439\u043b\u043e\u043f\u0440\u043e\u0432\u043e\u0434\u0430 \u2014 \u043d\u0435 \u043b\u0443\u0447\u0448\u0430\u044f \u0438\u0434\u0435\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f Gulp, \u043d\u0430\u043f\u0438\u0441\u0430\u043b <strike>\u0441\u0432\u043e\u0439 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434<\/strike> \u0441\u0432\u043e\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0444\u0430\u0439\u043b\u043e\u043f\u0440\u043e\u0432\u043e\u0434\u0430.<\/p>\n<p>   \u0418\u0442\u0430\u043a, \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u0440\u0435\u0436\u0438\u043c\u0430 \u0441\u0431\u043e\u0440\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430: <em>development<\/em> \u0438 <em>production<\/em>. \u0412 production mode \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441\u0436\u0430\u0442\u0438\u0435 \u0441\u0442\u0438\u043b\u0435\u0439 \u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043a \u0438\u043c\u0435\u043d\u0438 asset-\u0444\u0430\u0439\u043b\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0445\u0435\u0448-\u0441\u0443\u043c\u043c\u0430 \u043e\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 (app.js \u2192 app-4f2474f8.js).<\/p>\n<p>   \u0415\u0449\u0435 \u043e\u0434\u043d\u0430 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0441\u0431\u043e\u0440\u043a\u0438 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e gulp-\u0437\u0430\u0434\u0430\u0447\u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e \u0431\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0431\u043e\u0440\u043a\u0443 \u043d\u043e\u0432\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0447\u0442\u043e \u0438 \u043a\u0430\u043a \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c.<\/p>\n<p>  \u0415\u0441\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438:<\/p>\n<ul>\n<li> <strong>scripts:&lt;page_name&gt;<\/strong> \u2014 \u0441\u0431\u043e\u0440\u043a\u0430 app.js \u0434\u043b\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b (\u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 CoffeeLint, \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f CoffeeScript, \u0441\u0436\u0430\u0442\u0438\u0435) <\/li>\n<li> <strong>styles:&lt;page_name&gt;<\/strong> \u2014 \u0441\u0431\u043e\u0440\u043a\u0430 \u0441\u0442\u0438\u043b\u0435\u0439 app.css (\u0438\u043c\u043f\u043e\u0440\u0442 css-\u0444\u0430\u0439\u043b\u043e\u0432, \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f SASS, \u043c\u0438\u043d\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f) <\/li>\n<li> <strong>html:&lt;page_name&gt;<\/strong> \u2014 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f html-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b (\u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u0441\u0431\u043e\u0440\u043a\u0438, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u043e\u0432, \u0437\u0430\u043c\u0435\u043d\u0430 \u0438\u043c\u0435\u043d\u0438 \u0444\u0430\u0439\u043b\u043e\u0432 \u0434\u043b\u044f app.css \u0438 app.js) <\/li>\n<li> <strong>fonts:&lt;page_name&gt;<\/strong> \u2014 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0448\u0440\u0438\u0444\u0442\u043e\u0432 <\/li>\n<li> <strong>cp:&lt;page_name&gt;<\/strong> \u2014 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u043e\u0432 <\/li>\n<li> <strong>build:&lt;page_name&gt;<\/strong> \u2014 \u0441\u0431\u043e\u0440\u043a\u0430 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b <\/li>\n<li> <strong>build<\/strong> \u2014 \u0441\u0431\u043e\u0440\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 <\/li>\n<li> <strong>watch<\/strong> \u2014 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0435 \u0437\u0430 \u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0444\u0430\u0439\u043b\u0430 <\/li>\n<\/ul>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435. \u041d\u0435 \u0432\u0441\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447 \u0434\u043b\u044f \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code>  {     name: '',     tasks: {       scripts: {         src: [           'bower_components\/jquery1x\/dist\/jquery.js',           'bower_components\/bootstrap-sass\/assets\/javascripts\/bootstrap\/transition.js',           'bower_components\/bootstrap-sass\/assets\/javascripts\/bootstrap\/collapse.js',           'bower_components\/social-likes\/social-likes.min.js',           'lib\/assets\/javascripts\/**\/*.+(coffee|js)',           '_\/app\/assets\/javascripts\/**\/*.+(coffee|js)'         ],         dest: 'public\/assets'       },       styles: {         src: ['_\/app\/assets\/stylesheets\/app.scss'],         dest: 'public\/assets'       },       html: {         src: ['_\/app\/index.html'],         dest: 'public'       },       fonts: {         src: ['bower_components\/font-awesome\/fonts\/fontawesome-webfont.*'],         dest: 'public\/assets'       },       cp: {         src: ['_\/cp\/*'],         dest: 'public'       }     },     build: ['scripts:', 'styles:', ['html:', 'fonts:', 'cp:']]   }     <\/code><\/pre>\n<\/p><\/div>\n<\/div>\n<p>   \u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435: \u0442\u0430\u043a\u0436\u0435 \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0438 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447 \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b. <br \/>   \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0437\u0430\u0434\u0430\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e: <em>[&#8216;scripts:&#8217;, &#8216;styles:&#8217;, [&#8216;html:&#8217;, &#8216;fonts:&#8217;, &#8216;cp:&#8217;]]<\/em>. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0441\u043d\u0430\u0447\u0430\u043b\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0441\u044f \u0437\u0430\u0434\u0430\u0447\u0430 <em>&#8216;scripts:&#8217;<\/em>, \u043f\u043e\u0442\u043e\u043c <em>&#8216;styles:&#8217;<\/em>, \u0430 \u0443\u0436\u0435 \u0437\u0430\u0442\u0435\u043c \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u0441\u044f \u0437\u0430\u0434\u0430\u0447\u0438 <em>&#8216;html:&#8217;<\/em>, <em>&#8216;fonts:&#8217;<\/em> \u0438 <em>&#8216;cp:&#8217;<\/em><\/p>\n<p>   \u0424\u0430\u0439\u043b <a href=\"https:\/\/github.com\/maksim-amko\/finex.io\/blob\/master\/gulpfile.js\">gulpfile.js<\/a> \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u043d\u0430 github.<\/p>\n<p>  \u0421\u0441\u044b\u043b\u043a\u0438:<\/p>\n<ul>\n<li> <a href=\"http:\/\/habrahabr.ru\/post\/207730\/\">\u041e\u0442 Backbone.js \u043a Marionette.js<\/a> <\/li>\n<li> <a href=\"http:\/\/www.backbonerails.com\/series\">\u0421\u043a\u0440\u0438\u043d\u043a\u0430\u0441\u0442\u044b \u043f\u043e Marionette.js (\u0438 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e) \u043e\u0442 Brian Mann<\/a> <\/li>\n<li> <a href=\"https:\/\/finex.io\">\u0421\u0430\u043c \u043f\u0440\u043e\u0435\u043a\u0442<\/a> <\/li>\n<li> <a href=\"https:\/\/api.finex.io\">API \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/a> <\/li>\n<li> <a href=\"https:\/\/github.com\/maksim-amko\/finex.io\">\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434<\/a> <\/li>\n<\/ul>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/megamozg.ru\/post\/15264\/\"> http:\/\/megamozg.ru\/post\/15264\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>     \t \u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442. \u042d\u0442\u043e \u043f\u0435\u0440\u0432\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u0438\u0437 \u0446\u0438\u043a\u043b\u0430 \u00ab\u041a\u0430\u043a \u044f \u0434\u0435\u043b\u0430\u044e \u0441\u0432\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442\u00bb. \u0417\u0434\u0435\u0441\u044c \u043f\u043e\u0439\u0434\u0435\u0442 \u0440\u0435\u0447\u044c \u043d\u0435 \u043e \u0441\u0430\u043c\u043e\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0435, \u0430 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043e\u043d \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f.<\/p>\n<p>  \u041a\u0440\u0430\u0442\u043a\u043e \u043e\u0431 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u0432\u0441\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430:<\/p>\n<ol>\n<li> \u0421\u043b\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0438: \u0421\u0423\u0411\u0414 PostgreSQL 9.4 <\/li>\n<li> \u0421\u0440\u0435\u0434\u043d\u0438\u0439 \u0441\u043b\u043e\u0439: Node.js (Express) + Redis. \u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f REST API, \u0448\u0430\u0440\u0434\u0438\u043d\u0433 (\u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435) <\/li>\n<li> \u041a\u043b\u0438\u0435\u043d\u0442\u044b:\n<ul>\n<li>web-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/li>\n<li>\u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/li>\n<\/ul>\n<\/li>\n<\/ol>\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-256904","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/256904","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=256904"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/256904\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=256904"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=256904"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=256904"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}