{"id":172333,"date":"2013-03-12T12:04:03","date_gmt":"2013-03-12T08:04:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=172333"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=172333","title":{"rendered":"<span class=\"post_title\">Pilot: \u043c\u043d\u043e\u0433\u043e\u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 javascript \u0440\u043e\u0443\u0442\u0435\u0440<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t\u0421 \u043a\u0430\u0436\u0434\u044b\u043c \u0434\u043d\u0435\u043c \u0441\u0430\u0439\u0442\u044b \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u0432\u0441\u0435 \u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u043d\u0435\u0435. \u0423\u0436\u0435 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u00ab\u043e\u0436\u0438\u0432\u0438\u0442\u044c\u00bb \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u2014 \u0432\u0441\u0435 \u0447\u0430\u0449\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0435 \u043e\u0434\u043d\u043e\u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u042f\u0440\u043a\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u044e\u0431\u0430\u044f web-\u043f\u043e\u0447\u0442\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"https:\/\/e.mail.ru\/\">Mail.Ru<\/a>), \u0433\u0434\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u044b \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0430\u043c \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0442 \u043d\u0435 \u043a \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b, \u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u043a \u0441\u043c\u0435\u043d\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f. \u0410 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0437\u0430\u0434\u0430\u0447\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0438\u0445 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u044b\u043b\u0430 \u043f\u0440\u0435\u0440\u043e\u0433\u0430\u0442\u0438\u0432\u043e\u0439 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043b\u043e\u0436\u0438\u0442\u0441\u044f \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442. \u041e\u0431\u044b\u0447\u043d\u043e \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0440\u0435\u0448\u0430\u044e\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u043e\u0441\u0442\u0435\u043d\u044c\u043a\u043e\u0433\u043e \u0440\u043e\u0443\u0442\u0435\u0440\u0430, \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u0438 \u0434\u0430\u043b\u044c\u0448\u0435 \u043d\u0435 \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u044e\u0442, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u043d\u0430 back-end \u044d\u0442\u043e\u0439 \u0442\u0435\u043c\u0435 \u0443\u0434\u0435\u043b\u044f\u044e\u0442 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u0432\u043e\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0431\u0435\u043b.<\/p>\n<p>  <a name=\"habracut\"><\/a> <\/p>\n<h2>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0440\u043e\u0443\u0442\u0438\u043d\u0433?<\/h2>\n<p>  \u042d\u0442\u043e, \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u0441\u0430\u043c\u0430\u044f \u043d\u0435\u0434\u043e\u043e\u0446\u0435\u043d\u0435\u043d\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c JavaScript-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f :]<\/p>\n<p>  \u041d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0440\u043e\u0443\u0442\u0438\u043d\u0433 \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u041f\u0440\u043e\u0449\u0435 \u0433\u043e\u0432\u043e\u0440\u044f, \u044d\u0442\u043e \u043f\u043e\u0438\u0441\u043a \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u043f\u043e \u0437\u0430\u043f\u0440\u043e\u0448\u0435\u043d\u043d\u043e\u043c\u0443 URL \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439.<\/p>\n<p>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443: \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0434\u043d\u043e\u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u00ab\u0413\u0430\u043b\u0435\u0440\u0435\u044f\u00bb, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u0442\u044c \u0438\u0437 \u0442\u0440\u0435\u0445 \u044d\u043a\u0440\u0430\u043d\u043e\u0432:  <\/p>\n<ul>\n<li>\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u2014 \u0432\u044b\u0431\u043e\u0440 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432 \u0436\u0438\u0432\u043e\u043f\u0438\u0441\u0438<\/li>\n<li>\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0433\u0430\u043b\u0435\u0440\u0435\u0438 \u2014 \u0432\u044b\u0432\u043e\u0434 \u043a\u0430\u0440\u0442\u0438\u043d \u0441 \u043f\u043e\u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043d\u043e\u0439 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0435\u0439 \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435<\/li>\n<li>\u0414\u0435\u0442\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f<\/li>\n<\/ul>\n<p>  \u0421\u0445\u0435\u043c\u0430\u0442\u0438\u0447\u043d\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:  <\/p>\n<pre><code class=\"html\">&lt;div id=&quot;app&quot;&gt;     &lt;div id=&quot;app-index&quot; style=&quot;display: none&quot;&gt;...&lt;\/div&gt;     &lt;div id=&quot;app-gallery&quot; style=&quot;display: none&quot;&gt;...&lt;\/div&gt;     &lt;div id=&quot;app-artwork&quot; style=&quot;display: none&quot;&gt;...&lt;\/div&gt; &lt;\/div&gt;<\/code><\/pre>\n<p>  \u041a\u0430\u0436\u0434\u043e\u043c\u0443 \u044d\u043a\u0440\u0430\u043d\u0443 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0439 URL, \u0438 \u0440\u043e\u0443\u0442\u0435\u0440, \u0438\u0445 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0438\u0439, \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0430\u043a:   <\/p>\n<pre><code class=\"javascript\">var Router = {      routes: {           &quot;\/&quot;: &quot;indexPage&quot;,           &quot;\/gallery\/:tag\/&quot;: &quot;galleryPage&quot;,           &quot;\/gallery\/:tag\/:perPage\/&quot;: &quot;galleryPage&quot;,           &quot;\/gallery\/:tag\/:perPage\/page\/:page\/&quot;: &quot;galleryPage&quot;,           &quot;\/artwork\/:id\/&quot;: &quot;artworkPage&quot;,      } };<\/code><\/pre>\n<p>  \u0412 \u043e\u0431\u044a\u0435\u043a\u0442\u0435 `routes` \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0437\u0430\u0434\u0430\u044e\u0442\u0441\u044f \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u044b: \u043a\u043b\u044e\u0447 \u2014 \u0448\u0430\u0431\u043b\u043e\u043d \u043f\u0443\u0442\u0438, \u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u2014 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438-\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430.<\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u044e\u0447\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 `Router.routes` \u0432 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u043c\u0435\u0442\u043e\u0434 `Router.init`:  <\/p>\n<pre><code class=\"javascript\">var Router = {      routes: { \/* ... *\/ },      init: function (){           this._routes = [];           for( var route in this.routes ){                var methodName = this.routes[route];                this._routes.push({                     pattern: new RegExp('^'+route.replace(\/:\\w+\/, '(\\\\w+)')+'$'),                     callback: this[methodName]                });           }      } };<\/code><\/pre>\n<p>  \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0442\u044c \u043f\u043e\u0438\u0441\u043a \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430 \u0438 \u0432\u044b\u0437\u043e\u0432 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430:   <\/p>\n<pre><code class=\"javascript\">var Router = {      routes: { \/* \u2026 *\/ },      init: function (){ \/* \u2026 *\/ },      nav: function (path){           var i = this._routes.length;           while( i-- ){                var args = path.match(this._routes[i].pattern);                if( args ){                     this._routes[i].callback.apply(this, args.slice(1));                }           }      } };<\/code><\/pre>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u0432\u0441\u0451 \u0433\u043e\u0442\u043e\u0432\u043e, \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0440\u043e\u0443\u0442\u0435\u0440 \u0438 \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438. \u0412\u0430\u0436\u043d\u043e \u043d\u0435 \u0437\u0430\u0431\u044b\u0442\u044c \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u0438\u0442\u044c \u0441\u043e\u0431\u044b\u0442\u0438\u0435 `click` \u0441\u043e \u0432\u0441\u0435\u0445 \u0441\u0441\u044b\u043b\u043e\u043a \u0438 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043d\u0430 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440.<\/p>\n<pre><code class=\"javascript\">Router.init(); Router.nav(&quot;\/&quot;);   \/\/ \u041f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435 \u043a\u043b\u0438\u043a\u0438 $(&quot;body&quot;).on(&quot;click&quot;, &quot;a&quot;, function (evt){      Router.nav(evt.currentTarget.href);      evt.preventDefault(); }); <\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435, \u043d\u0438\u0447\u0435\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0433\u043e; \u0434\u0443\u043c\u0430\u044e, \u043c\u043d\u043e\u0433\u0438\u043c \u0437\u043d\u0430\u043a\u043e\u043c \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434. \u041e\u0431\u044b\u0447\u043d\u043e \u0432\u0441\u0435 \u043e\u0442\u043b\u0438\u0447\u0438\u044f \u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f\u0445 \u0441\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u043a \u0444\u043e\u0440\u043c\u0430\u0442\u0443 \u0437\u0430\u043f\u0438\u0441\u0438 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430 \u0438 \u0435\u0433\u043e \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0432 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435.<\/p>\n<p>  \u0412\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u043a \u043d\u0430\u0448\u0435\u043c\u0443 \u043f\u0440\u0438\u043c\u0435\u0440\u0443. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435, \u0447\u0442\u043e \u0432 \u043d\u0435\u043c \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u2014 \u044d\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0449\u0438\u0445 \u0437\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430. \u041e\u0431\u044b\u0447\u043d\u043e \u0432 \u043d\u0438\u0445 \u0438\u0434\u0435\u0442 \u0441\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0430\u043a:  <\/p>\n<pre><code class=\"javascript\">var Router = {      routes: { \/*...*\/ },      init: function (){ \/*...*\/ },      nav: function (url){ \/*...*\/ },        indexPage: function (){           ManagerView.set(&quot;index&quot;);      },      galleryPage: function (tag, perPage, page){           var query = {                tag: tag,                page: page,                perPage: perPage           };           api.find(query, function (items){                ManagerView.set(&quot;gallery&quot;, items);           });      },      artworkPage: function (id){           api.findById(id, function (item){                ManagerView.set(&quot;artwork&quot;, item);           });      } };<\/code><\/pre>\n<p>  \u041d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0435\u043f\u043b\u043e\u0445\u043e, \u043d\u043e \u0435\u0441\u0442\u044c \u0438 \u043f\u043e\u0434\u0432\u043e\u0434\u043d\u044b\u0435 \u043a\u0430\u043c\u043d\u0438. \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e, \u0438 \u043f\u0440\u0438 \u0431\u044b\u0441\u0442\u0440\u043e\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0438 \u043c\u0435\u0436\u0434\u0443 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430\u043c\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u0442\u043e, \u0447\u0442\u043e \u043e\u0436\u0438\u0434\u0430\u043b\u043e\u0441\u044c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0442\u0430\u043a\u0443\u044e \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e: \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043a\u043b\u0438\u043a\u043d\u0443\u043b \u043d\u0430 \u0441\u0441\u044b\u043b\u043a\u0443 \u0432\u0442\u043e\u0440\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0433\u0430\u043b\u0435\u0440\u0435\u0438, \u043d\u043e \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b\u0441\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435\u043c \u0441 \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0438 \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0435\u0433\u043e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e. \u0412 \u0438\u0442\u043e\u0433\u0435 \u0443\u0448\u043b\u043e \u0434\u0432\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u041e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0432 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435, \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u043c\u0435\u0441\u0442\u043e \u043a\u0430\u0440\u0442\u0438\u043d\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u0432\u0442\u043e\u0440\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0433\u0430\u043b\u0435\u0440\u0435\u0438.<\/p>\n<p>  \u042d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0448\u0438\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438; \u043a\u0430\u0436\u0434\u044b\u0439 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 \u0441\u0432\u043e\u0439 \u043f\u0443\u0442\u044c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c `abort` \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u043b\u043e\u0433\u0438\u043a\u0443 \u0432 `ManagerView.set`.<\/p>\n<p>  \u0427\u0442\u043e \u0436\u0435 \u0434\u0435\u043b\u0430\u0435\u0442 `ManagerView`? \u041c\u0435\u0442\u043e\u0434 `set(name, data)` \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0434\u0432\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430: \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u00ab\u044d\u043a\u0440\u0430\u043d\u0430\u00bb \u0438 \u00ab\u0434\u0430\u043d\u043d\u044b\u0435\u00bb \u0434\u043b\u044f \u0435\u0433\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0437\u0430\u0434\u0430\u0447\u0430 \u0441\u0438\u043b\u044c\u043d\u043e \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0430, \u0438 \u043c\u0435\u0442\u043e\u0434 `set` \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u043d\u0443\u0436\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043f\u043e id. \u041e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0432\u0438\u0434\u0430 \u043a\u0430\u043a \u043f\u043e\u0441\u0442\u0444\u0438\u043a\u0441 `\u00abapp-\u00bb+name`, \u0430 \u0434\u0430\u043d\u043d\u044b\u0435 \u2014 \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f html. \u0422\u0430\u043a\u0436\u0435 `ManagerView` \u0434\u043e\u043b\u0436\u0435\u043d \u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u044d\u043a\u0440\u0430\u043d\u0430 \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c, \u043a\u043e\u0433\u0434\u0430 \u043d\u0430\u0447\u0430\u043b\u0441\u044f\/\u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f\/\u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0441\u044f \u043c\u0430\u0440\u0448\u0440\u0443\u0442, \u0447\u0442\u043e\u0431\u044b \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u0438\u043c \u0432\u0438\u0434\u043e\u043c.<\/p>\n<p>  \u0412\u043e\u0442 \u043c\u044b \u0438 \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u043e\u0434\u043d\u043e\u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0441\u043e \u0441\u0432\u043e\u0438\u043c `Router` \u0438 `ManagerView`, \u043d\u043e \u043f\u0440\u043e\u0439\u0434\u0435\u0442 \u0432\u0440\u0435\u043c\u044f, \u0438 \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0440\u0430\u0437\u0434\u0435\u043b \u00ab\u0421\u0442\u0430\u0442\u044c\u0438\u00bb, \u0433\u0434\u0435 \u0431\u0443\u0434\u0443\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u00ab\u0440\u0430\u0431\u043e\u0442\u00bb \u0438 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u043d\u0438\u0445. \u041f\u0440\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0435 \u043d\u0430 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u00ab\u0440\u0430\u0431\u043e\u0442\u044b\u00bb \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443 \u00ab\u041d\u0430\u0437\u0430\u0434 \u043a \u0441\u0442\u0430\u0442\u044c\u0435\u00bb \u0438\u043b\u0438 \u00ab\u041d\u0430\u0437\u0430\u0434 \u0432 \u0433\u0430\u043b\u0435\u0440\u0435\u044e\u00bb, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u043e\u0433\u043e, \u043e\u0442\u043a\u0443\u0434\u0430 \u043f\u0440\u0438\u0448\u0435\u043b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c. \u041d\u043e \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c? \u041d\u0438 `ManagerView`, \u043d\u0438 `Router` \u043d\u0435 \u043e\u0431\u043b\u0430\u0434\u0430\u044e\u0442 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438.<\/p>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u043e\u0441\u0442\u0430\u043b\u0441\u044f \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u0432\u0430\u0436\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u2014 \u044d\u0442\u043e \u0441\u0441\u044b\u043b\u043a\u0438. \u041f\u043e\u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043d\u0430\u044f \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044f, \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0440\u0430\u0437\u0434\u0435\u043b\u044b \u0438 \u0442.\u043f., \u043a\u0430\u043a \u0438\u0445 \u00ab\u0441\u0442\u0440\u043e\u0438\u0442\u044c\u00bb? \u00ab\u0417\u0430\u0448\u0438\u0442\u044c\u00bb \u043f\u0440\u044f\u043c\u043e \u0432 \u043a\u043e\u0434? \u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c URL \u043f\u043e \u043c\u043d\u0435\u043c\u043e\u043d\u0438\u043a\u0435 \u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c? \u041f\u0435\u0440\u0432\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0441\u043e\u0432\u0441\u0435\u043c \u043f\u043b\u043e\u0445\u043e\u0439, \u0432\u0442\u043e\u0440\u043e\u0439 \u043b\u0443\u0447\u0448\u0435, \u043d\u043e \u043d\u0435 \u0438\u0434\u0435\u0430\u043b\u0435\u043d. \u0421 \u043c\u043e\u0435\u0439 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f, \u043d\u0430\u0438\u043b\u0443\u0447\u0448\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u2014 \u044d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u0434\u0430\u0442\u044c `id` \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430 \u0438 \u043c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c URL \u043f\u043e ID \u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c. \u042d\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u043e \u0442\u0435\u043c, \u0447\u0442\u043e \u043c\u0430\u0440\u0448\u0440\u0443\u0442 \u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f URL \u0435\u0441\u0442\u044c \u043e\u0434\u043d\u043e \u0438 \u0442\u043e \u0436\u0435, \u043a \u0442\u043e\u043c\u0443 \u0436\u0435 \u044d\u0442\u043e\u0442 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043d\u0435 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u043b\u043e\u0433\u0438\u043a\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f URL.<\/p>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435, \u0442\u0430\u043a\u043e\u0439 \u0440\u043e\u0443\u0442\u0435\u0440 \u043d\u0435 \u0440\u0435\u0448\u0430\u0435\u0442 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447, \u043f\u043e\u044d\u0442\u043e\u043c\u0443, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0432\u044b\u0434\u0443\u043c\u044b\u0432\u0430\u0442\u044c \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434, \u044f \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u043b\u0441\u044f \u0432 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u0438\u043a, \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439 \u043a \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e\u043c\u0443 (\u0432 \u043c\u043e\u0451\u043c \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0438) \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u0443:  <\/p>\n<ul>\n<li>\u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0433\u0438\u0431\u043a\u0438\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u0430\u043a \u0443 Express)<\/li>\n<li>\u0440\u0430\u0431\u043e\u0442\u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0441 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c, \u0430 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 (\u043a\u0430\u043a \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435)<\/li>\n<li>\u0441\u043e\u0431\u044b\u0442\u0438\u044f \u00ab\u043d\u0430\u0447\u0430\u043b\u0430\u00bb, \u00ab\u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u00bb\u0438 \u00ab\u043a\u043e\u043d\u0446\u0430\u00bb \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430 (\/gallery\/cubism\/ -&gt; \/gallery\/cubism\/12\/page\/2 -&gt; \/artwork\/123\/)<\/li>\n<li>\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u043d\u0430 \u043e\u0434\u0438\u043d \u043c\u0430\u0440\u0448\u0440\u0443\u0442<\/li>\n<li>\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f ID \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430\u043c \u0438 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u043f\u043e \u043d\u0438\u043c<\/li>\n<li>\u0438\u043d\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f `data \u2190\u2192 view` (\u043f\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438)<\/li>\n<\/ul>\n<p>  \u041a\u0430\u043a \u0432\u044b \u0443\u0436\u0435 \u0434\u043e\u0433\u0430\u0434\u0430\u043b\u0438\u0441\u044c, \u044f \u043d\u0435 \u043d\u0430\u0448\u0435\u043b \u0442\u043e, \u0447\u0435\u0433\u043e \u0445\u043e\u0442\u0435\u043b, \u0445\u043e\u0442\u044f \u043f\u043e\u043f\u0430\u0434\u0430\u043b\u0438\u0441\u044c \u043e\u0447\u0435\u043d\u044c \u0434\u043e\u0441\u0442\u043e\u0439\u043d\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a:  <\/p>\n<ul>\n<li><a href=\"http:\/\/millermedeiros.github.com\/crossroads.js\/\">Crossroads.js<\/a> \u2014 \u043e\u0447\u0435\u043d\u044c \u043c\u043e\u0449\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430\u043c\u0438<\/li>\n<li><a href=\"https:\/\/github.com\/mtrpcic\/pathjs\">Path.js<\/a> \u2014 \u0435\u0441\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u00ab\u043d\u0430\u0447\u0430\u043b\u0430\u00bb \u0438 \u00ab\u043a\u043e\u043d\u0446\u0430\u00bb \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430, 1KB (Closure compiler + gzipped)<\/li>\n<li><a href=\"http:\/\/haithembelhaj.github.com\/RouterJs\/\">Router.js<\/a> \u2014 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439, \u0432\u0441\u0435\u0433\u043e 443 \u0431\u0430\u0439\u0442\u0430 (Closure compiler + gzipped)<\/li>\n<\/ul>\n<p>  <\/p>\n<h2>Pilot<\/h2>\n<p>  \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0441\u0451 \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f Pilot. \u041e\u043d \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0442\u0440\u0435\u0445 \u0447\u0430\u0441\u0442\u0435\u0439:  <\/p>\n<ol>\n<li><b>Pilot<\/b> \u2014 \u0441\u0430\u043c \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440<\/li>\n<li><b>Pilot.Route<\/b> \u2014 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430<\/li>\n<li><b>Pilot.View<\/b> \u2014 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430, \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u0442 Pilot.Route<\/li>\n<\/ol>\n<p>  \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u044b, \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0449\u0438\u0435 \u0437\u0430 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u044b. HTML-\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u0439 \u0436\u0435, \u0447\u0442\u043e \u0438 \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u0442\u0430\u0442\u044c\u0438.<\/p>\n<pre><code class=\"javascript\">\/\/ \u041e\u0431\u044a\u0435\u043a\u0442, \u0433\u0434\u0435 \u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u044b var page = {};    \/\/ \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0434\u043b\u044f \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b pages.index = Pilot.View.extend({      el: &quot;#app-index&quot; });    \/\/ \u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0433\u0430\u043b\u0435\u0440\u0435\u0438 pages.gallery = Pilot.View.extend({      el: &quot;#app-gallery&quot;,      template: function (data\/**Object*\/){           \/* \u0448\u0430\u0431\u043b\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 this.getData() *\/           return  html;      },      loadData: function (req\/**Object*\/){           \/\/ app.find \u2014 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 $.Deferred();           return app.find(req.params, this.bound(function (items){                this.setData(items);           }));      },      onRoute: function (evt\/**$.Event*\/, req\/**Object*\/){           \/\/ \u041c\u0435\u0442\u043e\u0434 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438 routerstart \u0438 routeend           this.render();      } });    \/\/ \u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f pages.artwork = Pilot.View.extend({      el: &quot;#app-artwork&quot;,      template: function (data\/**Object*\/){           \/* \u0448\u0430\u0431\u043b\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 this.getData() *\/           return  html;      },      loadData: function (req\/**Object*\/){           return api.findById(req.params.id, this.bound(function (data){                this.setData(data);           }));      },      onRoute: function (evt\/**$.Event*\/, req\/**Object*\/){           this.render();      } });<\/code><\/pre>\n<p>  \u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430\u043c\u0438 \u0432\u043b\u0435\u0447\u0435\u0442 \u0437\u0430 \u0441\u043e\u0431\u043e\u0439 \u0441\u043c\u0435\u043d\u0443 \u044d\u043a\u0440\u0430\u043d\u043e\u0432, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e Pilot.View. \u041f\u043e\u043c\u0438\u043c\u043e \u0440\u0430\u0431\u043e\u0442\u044b \u0441 DOM-\u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438, \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d \u043d\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u044f routestart \u0438 routeend. \u041f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u044d\u0442\u0438\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 Pilot.View \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0441 \u043d\u0438\u043c DOM-\u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430, \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u0435\u043c\u0443 `display: none` \u0438\u043b\u0438 \u0443\u0431\u0438\u0440\u0430\u044f \u0435\u0433\u043e. \u0421\u0430\u043c \u0443\u0437\u0435\u043b \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e `el`.<\/p>\n<p>  \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0442\u0440\u0438 \u0442\u0438\u043f\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439: routestart, routechange \u0438 routeend. \u0418\u0445 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0440\u043e\u0443\u0442\u0435\u0440 \u043d\u0430 \u043a\u043e\u0442\u0440\u043e\u043b\u043b\u0435\u0440(\u044b). \u0421\u0445\u0435\u043c\u0430\u0442\u0438\u0447\u043d\u043e \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<p>  \u0415\u0441\u0442\u044c \u0442\u0440\u0438 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430 \u0438 \u0438\u0445 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u044b:<\/p>\n<pre><code class=\"javascript\">  &quot;\/&quot;  -- pages.index   &quot;\/gallery\/:page?&quot;  -- pages.gallery   &quot;\/artwork\/:id\/&quot;  -- pages.artwork <\/code><\/pre>\n<p>  \u041a\u0430\u0436\u0434\u043e\u043c\u0443 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0443 \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e URL. \u0415\u0441\u043b\u0438 \u043d\u043e\u0432\u044b\u0439 URL \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0442\u0435\u043a\u0443\u0449\u0435\u043c\u0443 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0443, \u0442\u043e \u0440\u043e\u0443\u0442\u0435\u0440 \u0433\u0435\u043d\u0435\u0440\u0438\u0442 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 routechage. \u0415\u0441\u043b\u0438 \u043c\u0430\u0440\u0448\u0440\u0443\u0442 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f, \u0442\u043e \u0435\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 routeend, \u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u043d\u043e\u0432\u043e\u0433\u043e \u2014 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 routestart.<\/p>\n<pre><code class=\"javascript\">  &quot;\/&quot; -- pages.index.routestart   &quot;\/gallery\/&quot;  --   pages.index.routeend, pages.gallery.routestart   &quot;\/gallery\/2\/&quot;  --   pages.gallery.routechange   &quot;\/gallery\/3\/&quot;  --   pages.gallery.routechange   &quot;\/artwork\/123\/&quot;  --   pages.artwork.routestart, pages.gallery.routeend <\/code><\/pre>\n<p>  \u041f\u043e\u043c\u0438\u043c\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 (`this.el`), \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u0435\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0443 Pilot.View \u0435\u0441\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0437\u0430\u0434\u0430\u0447\u0438:<\/p>\n<p>  <b>template(data)<\/b> \u2014 \u043c\u0435\u0442\u043e\u0434 \u0448\u0430\u0431\u043b\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438, \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442\u0441\u044f HTML. \u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0435, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0432 loadData.<\/p>\n<p>  <b>loadData(req)<\/b> \u2014 \u043f\u043e\u0436\u0430\u043b\u0443\u0439, \u0441\u0430\u043c\u044b\u0439 \u0432\u0430\u0436\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430. \u0412\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f URL, \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u0423 \u043d\u0435\u0433\u043e \u0435\u0441\u0442\u044c \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c: \u0435\u0441\u043b\u0438 \u0432\u0435\u0440\u043d\u0443\u0442\u044c $.Deferred, \u0440\u043e\u0443\u0442\u0435\u0440 \u043d\u0435 \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u0442 \u043d\u0430 \u044d\u0442\u043e\u0442 URL, \u043f\u043e\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u0431\u0440\u0430\u043d\u044b.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">req \u2014 \u0437\u0430\u043f\u0440\u043e\u0441<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"javascript\">{      url: &quot;http:\/\/domain.ru\/gallery\/cubism\/20\/page\/3&quot;,      path: &quot;\/gallery\/cubism\/20\/page\/123&quot;,      search: &quot;&quot;,      query: {},      params: { tag: &quot;cubism&quot;, perPage: 20, page: 123 },      referrer: &quot;http:\/\/domain.ru\/gallery\/cubism\/20\/page\/2&quot; }<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <b>onRoute(evt, req)<\/b> \u2014 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0435. \u0412\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 routestart \u0438\u043b\u0438 routechange. \u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u044b\u0437\u043e\u0432\u0430 \u043c\u0435\u0442\u043e\u0434\u0430 render.<\/p>\n<p>  <b>render()<\/b> \u2014 \u043c\u0435\u0442\u043e\u0434 \u0434\u043b\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f HTML \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 (`this.el`). \u0412\u044b\u0437\u044b\u0432\u0430\u0435\u0442 this.template(this.getData()).<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0440\u043e\u0443\u0442\u0435\u0440:   <\/p>\n<pre><code class=\"javascript\">var GuideRouter = Pilot.extend({      init: function (){           \/\/ \u0417\u0430\u0434\u0430\u0435\u043c \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u044b \u0438 \u0438\u0445 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u044b:           this                .route(&quot;index&quot;, &quot;\/&quot;, pages.index)                .route(&quot;gallery&quot;, &quot;\/gallery\/:tag\/:prePage?(\/page\/:page\/)?&quot;, pages.gallery)                .route(&quot;artwork&quot;, &quot;\/artwork\/:id\/&quot;, pages.artwork)           ;      } });   var Guide = new GuideRouter({      \/\/ \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442, \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u043a\u043b\u0438\u043a\u0438 \u043d\u0430 \u0441\u0441\u044b\u043b\u043a\u0430\u0445      el: &quot;#app&quot;,       \/\/ \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c HistoryAPI      useHistory: true });   \/\/ \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0440\u043e\u0443\u0442\u0435\u0440 Guide.start();<\/code><\/pre>\n<p>  \u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0440\u043e\u0443\u0442\u0435\u0440 \u0438 \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 `init` \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u044b. \u041c\u0430\u0440\u0448\u0440\u0443\u0442 \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u043c `route`. \u041e\u043d \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0442\u0440\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430: id \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430, \u043f\u0430\u0442\u0442\u0435\u0440\u043d \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0440.<\/p>\n<p>  \u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430, \u043b\u0443\u043a\u0430\u0432\u0438\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0443, \u043f\u043e\u0437\u0430\u0438\u043c\u0441\u0442\u0432\u043e\u0432\u0430\u043d \u0443 Express. \u041e\u043d \u043f\u043e\u0434\u043e\u0448\u0435\u043b \u043f\u043e \u0432\u0441\u0435\u043c \u043f\u0443\u043d\u043a\u0442\u0430\u043c, \u0438 \u0442\u0435\u043c, \u043a\u0442\u043e \u0443\u0436\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0441 <a href=\"http:\/\/expressjs.com\">Express<\/a>, \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0449\u0435. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u2014 \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0433\u0440\u0443\u043f\u043f\u044b; \u043e\u043d\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0433\u0438\u0431\u0447\u0435 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u043f\u0430\u0442\u0442\u0435\u0440\u043d \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430 \u0438 \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u043f\u0440\u0438 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u043f\u043e id.<\/p>\n<p>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043c\u0430\u0440\u0448\u0440\u0443\u0442, \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0449\u0438\u0439 \u0437\u0430 \u0433\u0430\u043b\u0435\u0440\u0435\u044e:  <\/p>\n<pre><code class=\"javascript\">\/\/ \u0412\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432 \u0441\u043a\u043e\u0431\u043a\u0430\u0445 \u0438 \u0435\u0441\u0442\u044c \u0433\u0440\u0443\u043f\u043f\u0430 this.route(&quot;gallery&quot;, &quot;\/gallery\/:tag\/:prePage?(\/page\/:page\/)?&quot;, \u2026)   \/\/ \u0421\u043a\u043e\u0431\u043a\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u0447\u0430\u0441\u0442\u044c \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u0430, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0441 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 `page`. \/\/ \u0415\u0441\u043b\u0438 \u043e\u043d\u0430 \u043d\u0435 \u0437\u0430\u0434\u0430\u043d\u0430, \u0442\u043e \u0432\u0435\u0441\u044c \u0431\u043b\u043e\u043a \u043d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f. Guide.getUrl(&quot;gallery&quot;, { tag: &quot;cubism&quot; }); \/\/ &quot;\/gallery\/cubism\/&quot;; Guide.getUrl(&quot;gallery&quot;, { tag: &quot;cubism&quot;, page:  2 }); \/\/ &quot;\/gallery\/cubism\/page\/2\/&quot;; Guide.getUrl(&quot;gallery&quot;, { tag: &quot;cubism&quot;, page:  2, perPage: 20 }); \/\/ &quot;\/gallery\/cubism\/20\/page\/2\/&quot;;<\/code><\/pre>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e: \u043c\u0430\u0440\u0448\u0440\u0443\u0442 \u0438 URL \u0435\u0441\u0442\u044c \u043e\u0434\u043d\u043e \u0438 \u0442\u043e \u0436\u0435. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u044f\u0432\u043d\u044b\u0445 URL \u0432 \u043a\u043e\u0434\u0435 \u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043b URL. \u0414\u043b\u044f \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u043d\u0430 \u043d\u0443\u0436\u043d\u044b\u0439 \u043c\u0430\u0440\u0448\u0440\u0443\u0442, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f Guide.go(id, params).<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0438\u043d\u0441\u0442\u0430\u043d\u0441 GuideRouter \u0441 \u043e\u043f\u0446\u0438\u044f\u043c\u0438 \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u0430 \u0441\u0441\u044b\u043b\u043e\u043a \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f History API. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e Pilot \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 location.hash, \u043d\u043e \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c history.pushState. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c Pilot.pushState = true. \u041d\u043e, \u0435\u0441\u043b\u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 location.hash \u0438\u043b\u0438 history.pushState, \u0442\u043e \u0434\u043b\u044f \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0439 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 History API \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u0438\u0444\u0438\u043b, \u043b\u0438\u0431\u043e \u043b\u044e\u0431\u0443\u044e \u0434\u0440\u0443\u0433\u0443\u044e \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443. \u041f\u0440\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0434\u0432\u0430 \u043c\u0435\u0442\u043e\u0434\u0430 \u2014 Pilot.getLocation() \u0438 Pilot.setLocation(req).<\/p>\n<p>   \u0412\u043e\u0442 \u0432 \u0446\u0435\u043b\u043e\u043c \u0438 \u0432\u0441\u0451. \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438.<br \/>  \u0416\u0434\u0443 \u0432\u0430\u0448\u0438\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432, issue \u0438 \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u043e\u0442\u0434\u0430\u0447\u0438 :]<\/p>\n<p>  <\/p>\n<h6>\u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438<\/h6>\n<p>\u2014 <a href=\"http:\/\/rubaxa.github.com\/Pilot\/#app\">\u041f\u0440\u0438\u043c\u0435\u0440<\/a> (<a href=\"http:\/\/rubaxa.github.com\/Pilot\/example\/app.js\">app.js<\/a>)<br \/>  \u2014 <a href=\"http:\/\/rubaxa.github.com\/Pilot\/\">\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f<\/a><br \/>  \u2014 <a href=\"https:\/\/github.com\/RubaXa\/Pilot\">\u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438<\/a><br \/>  \u2014 <a href=\"https:\/\/gist.github.com\/RubaXa\/5057568\">jquery.leaks.js<\/a> (\u0443\u0442\u0438\u043b\u0438\u0442\u0430 \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 <a href=\"http:\/\/ibnrubaxa.blogspot.ru\/2013\/03\/jquery-memory-leaks.html\">jQuery.cache<\/a>)    \t \t\t   \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/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:\/\/habrahabr.ru\/company\/mailru\/blog\/172333\/\"> http:\/\/habrahabr.ru\/company\/mailru\/blog\/172333\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t\u0421 \u043a\u0430\u0436\u0434\u044b\u043c \u0434\u043d\u0435\u043c \u0441\u0430\u0439\u0442\u044b \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u0432\u0441\u0435 \u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u043d\u0435\u0435. \u0423\u0436\u0435 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u00ab\u043e\u0436\u0438\u0432\u0438\u0442\u044c\u00bb \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u2014 \u0432\u0441\u0435 \u0447\u0430\u0449\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0435 \u043e\u0434\u043d\u043e\u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u042f\u0440\u043a\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u044e\u0431\u0430\u044f web-\u043f\u043e\u0447\u0442\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"https:\/\/e.mail.ru\/\">Mail.Ru<\/a>), \u0433\u0434\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u044b \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0430\u043c \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0442 \u043d\u0435 \u043a \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b, \u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u043a \u0441\u043c\u0435\u043d\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f. \u0410 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0437\u0430\u0434\u0430\u0447\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0438\u0445 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u044b\u043b\u0430 \u043f\u0440\u0435\u0440\u043e\u0433\u0430\u0442\u0438\u0432\u043e\u0439 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043b\u043e\u0436\u0438\u0442\u0441\u044f \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442. \u041e\u0431\u044b\u0447\u043d\u043e \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0440\u0435\u0448\u0430\u044e\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u043e\u0441\u0442\u0435\u043d\u044c\u043a\u043e\u0433\u043e \u0440\u043e\u0443\u0442\u0435\u0440\u0430, \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u0438 \u0434\u0430\u043b\u044c\u0448\u0435 \u043d\u0435 \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u044e\u0442, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u043d\u0430 back-end \u044d\u0442\u043e\u0439 \u0442\u0435\u043c\u0435 \u0443\u0434\u0435\u043b\u044f\u044e\u0442 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u0432\u043e\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0431\u0435\u043b.<\/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-172333","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/172333","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=172333"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/172333\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=172333"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=172333"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=172333"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}