{"id":200192,"date":"2013-10-31T12:22:04","date_gmt":"2013-10-31T08:22:04","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=200192"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=200192","title":{"rendered":"<span class=\"post_title\">\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043a\u043b\u0438\u043d\u0435\u0442-\u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u043d\u0430 javascript (\u0447\u0430\u0441\u0442\u044c 1 \u2014 \u043a\u043b\u0438\u0435\u043d\u0442)<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/9a5\/6f0\/070\/9a56f00707c1056770964beeaff388a2.png\" alt=\"image\" align=\"left\"\/><\/p>\n<p>  \u041e \u0447\u0435\u043c \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f. \u042f \u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043e\u043f\u044b\u0442\u043e\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 phonegap. \u0412 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0446\u0435\u043b\u044b\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441 \u0441 RESTfull \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c, \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c\u0438, \u0434\u0430 \u0435\u0449\u0435 \u0445\u043e\u0441\u0442\u0438\u0442\u0441\u044f \u043d\u0430 PaaS. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043e\u043f\u0438\u0448\u0443 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (html5 single page app, \u0437\u0430\u0432\u0435\u0440\u043d\u0443\u0442\u043e\u0435 \u0432 phonegap), \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0433\u043e (nodejs \u0441 swagger-node-express + node-orm2), \u0438 \u043a\u0430\u043a \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432\u0441\u0435 \u044d\u0442\u043e \u043d\u0430 openshift PaaS.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0414\u043b\u044f \u043d\u0435\u0442\u0435\u0440\u043f\u0435\u043b\u0438\u0432\u044b\u0445:<br \/>  <a href=\"http:\/\/myconference.php.poltava.ua\/\">\u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/a><br \/>  <a href=\"https:\/\/github.com\/peinguin\/MyConference\">\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434<\/a><\/p>\n<p>  \u0414\u0443\u043c\u0430\u044e, \u0441\u0430\u0439\u0442 \u0441\u0440\u0430\u0437\u0443 \u043b\u044f\u0436\u0435\u0442 \u043e\u0442 \u0445\u0430\u0431\u0440\u0430\u044d\u0444\u0444\u0435\u043a\u0442\u0430. \u042d\u0442\u043e \u0442\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0430\u043a\u043a\u0430\u0443\u043d\u0442 \u0441 \u0432\u0441\u0435\u0433\u043e-\u043b\u0438\u0448\u0442 \u0434\u0432\u0443\u043c\u044f \u0441\u043b\u043e\u0442\u0430\u043c\u0438 \u0434\u043b\u044f \u043d\u043e\u0434\u044b. \u041d\u043e \u043e\u0431 \u044d\u0442\u043e\u043c \u0432 \u043a\u043e\u043d\u0446\u0435.<\/p>\n<p>  \u0425\u043e\u0447\u0443 \u0441\u0440\u0430\u0437\u0443 \u0443\u0442\u043e\u0447\u043d\u0438\u0442\u044c \u2014 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0435 \u0437\u0430\u043a\u043e\u043d\u0447\u0435\u043d, \u043d\u043e \u0443\u0436\u0435 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043f\u043b\u044e\u0441 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u0438 \u0438 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043d\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u041d\u0430\u0447\u043d\u0435\u043c, \u043f\u043e\u0436\u0430\u043b\u0443\u0439, \u0441 \u0441\u0430\u043c\u043e\u0433\u043e \u0433\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u2014 \u043a\u043b\u0438\u0435\u043d\u0442\u0430. \u042f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b (ex)twitter bootstrap, \u044f \u043f\u043e\u043d\u0438\u043c\u0430\u044e \u0447\u0442\u043e \u0448\u0430\u0431\u043b\u043e\u043d \u043f\u043e\u043a\u0430 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u2014 \u043d\u043e \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u044d\u0442\u043e js \u043b\u043e\u0433\u0438\u043a\u0430. \u0421\u0430\u043c\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u043d\u0430 require.js, \u0445\u043e\u0442\u044f \u044f \u0441\u0430\u043c \u043d\u0435 \u043f\u0440\u043e\u0442\u0438\u0432 \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0441\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0435 \u0444\u0430\u0439\u043b\u044b \u0431\u044b\u0441\u0442\u0440\u043e \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0430\u0442\u0441\u044f, \u0430 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u0430, \u0432\u043e\u043e\u0431\u0449\u0435-\u0442\u043e, \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 javascript \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 \u044f \u0432\u044b\u0431\u0440\u0430\u043b marionette.<br \/>  \u0421\u0435\u0439\u0447\u0430\u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e \u0434\u0432\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u044f: Auth \u0438 Conferences.<br \/>  \u041e\u0442\u043a\u043b\u044e\u0447\u0438\u043b \u0430\u0432\u0442\u043e\u0441\u0442\u0430\u0440\u0442:<\/p>\n<pre><code class=\"javascript\">this.startWithParent = false; <\/code><\/pre>\n<p>  \u0418 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e \u0438\u0445 \u043f\u043e\u0441\u043b\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0433\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f.<\/p>\n<pre><code class=\"javascript\">require(     [         'css!bootstrap_css',         'bootstrap',         'app\/modules\/conferences',         'app\/modules\/auth',     ],     function () {         app.start();     } );    <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"javascript\">MyConference.addInitializer(function(options){     mainLayout = new MainLayout;     MyConference.mainView.show(mainLayout);     var headerView = new HeaderView;     headerView.MyConference = MyConference;     mainLayout.header.show(headerView);      MyConference.Conferences.start();     MyConference.Auth.start(); }); <\/code><\/pre>\n<p>  Auth \u2014 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f\/\u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f. \u0425\u043e\u0447\u0443 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0441\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e. \u042f \u0432\u0441\u0435\u0433\u0434\u0430 \u0441\u0430\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e \u0438 \u043d\u0435 \u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0441\u044c \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u043c\u0438 \u0430\u0433\u0440\u0435\u0433\u0430\u0442\u043e\u0440\u0430\u043c\u0438, \u043d\u0435\u0437\u043d\u0430\u044e \u0445\u043e\u0440\u043e\u0448\u043e \u044d\u0442\u043e \u0438\u043b\u0438 \u043f\u043b\u043e\u0445\u043e. \u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e Google, LinkedIn, Facebook, Twitter, \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u0437\u044f\u0442\u044c \u043c\u043e\u0439 \u043a\u043e\u0434, \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0443 \u0441\u0435\u0431\u044f \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0445\u043e\u0436\u0435\u0435. \u0421\u0443\u0442\u044c \u0441\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e js \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u044e Api key, \u0430 \u043f\u043e\u0442\u043e\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u044e \u0435\u0433\u043e \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 facebook:<\/p>\n<pre><code class=\"javascript\">var afterInit = function(){     var sendAccessToken = function(response){         $.post(             cfg.baseUrl + 'auth.json\/facebook',             {FacebookKEY: response.authResponse.accessToken},             function(data, message, xhr){                 process_social_resporce(model, data, xhr);             },             &quot;text&quot;         );     }      FB.getLoginStatus(function(response) {         if(response.status == &quot;not_authorized&quot; || response.status == &quot;unknown&quot;){             FB.login(function(response, a) {                 if (response.authResponse) {                     sendAccessToken(response);                 } else {                     console.log(response, a)                 }             }, {scope:'email'});         }else{             sendAccessToken(response);         }     }); }  window.fbAsyncInit = function() {     FB.init({       appId      : cfg.facebookAppId, \/\/ App ID       status     : true, \/\/ check login status       cookie     : true, \/\/ enable cookies to allow the server to access the session       xfbml      : true  \/\/ parse XFBML     });     afterInit(); };  \/\/ Load the SDK asynchronously (function(d){      var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];      if (d.getElementById(id)) {return afterInit();}      js = d.createElement('script'); js.id = id; js.async = true;      js.src = &quot;\/\/connect.facebook.net\/en_US\/all.js&quot;;      ref.parentNode.insertBefore(js, ref); }(document)); <\/code><\/pre>\n<p>  \u0414\u043b\u044f \u043f\u043e\u0441\u0442\u043e\u0432\/\u043b\u0430\u0439\u043a\u043e\u0432 \u043c\u043d\u0435 \u044d\u0442\u043e\u0442 \u043a\u043b\u044e\u0447 \u043d\u0435 \u043d\u0443\u0436\u0435\u043d, \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u0447\u0442\u043e \u044d\u0442\u043e \u0437\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c. \u0422\u0430\u043a \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c offline \u0434\u043e\u0441\u0442\u0443\u043f, \u0442\u043e \u0442\u0430\u043a\u043e\u0439 \u043c\u0435\u0442\u043e\u0434 \u043c\u043e\u0436\u0435\u0442 \u043d\u0435 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0438\u0437-\u0437\u0430 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u044e\u0447, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 js \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c \u043d\u0435 \u0432\u044b\u0434\u0430\u044e\u0442.<br \/>  \u041e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u0441 twitter. \u0423 \u043d\u0435\u0433\u043e \u043d\u0435\u0442 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043d\u043e\u0439 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0439 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u0443\u044e. \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u043a\u043e\u0448\u043a\u043e, \u0442\u0430\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0438 \u043f\u043e\u0442\u043e\u043c \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0435 \u043e\u043a\u043d\u043e \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u043e\u0442\u0432\u0435\u0442 \u0441 \u0434\u043e\u0447\u0435\u0440\u043d\u0435\u0433\u043e. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0435 \u0432\u043e \u0432\u0441\u0435\u0445 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430\u0445, \u0442\u0430\u043a \u0447\u0442\u043e, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0435\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c. \u041d\u043e \u0432 android \u043f\u0440\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e.<\/p>\n<pre><code class=\"javascript\">var childWin = window.open(cfg.baseUrl + 'auth.json\/twitter\/'+Storage.get('API_KEY'), 'Twitter Auth', &quot;height=640,width=480&quot;); childWin.onunload = function(){     var check = function(){         if(childWin.document){             var body = childWin.document.getElementsByTagName(&quot;body&quot;)[0];             if(!model.isNew() || body.textContent.length &gt; 0){                 process_social_resporce(model, body.textContent);                 childWin.close();             }else{                 setTimeout(check, 100);             }         }else{             setTimeout(check, 100);         }     }     setTimeout(check, 100); } <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c\u0443 \u043c\u043e\u0434\u0443\u043b\u044e \u2014 Conferences. \u0417\u0434\u0435\u0441\u044c, \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u0432\u0441\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e. \u041e\u043f\u0438\u0441\u044b\u0432\u0430\u044e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0440 \u0437 \u0440\u043e\u0443\u0442\u0430\u043c\u0438.<\/p>\n<pre><code class=\"javascript\">var ConferencesController = Marionette.Controller.extend(new function(){     return {         main: function(){             MyConference.mainView.currentView.header.currentView.setHeader('Conferences');              var conferencesCollection = new ConferencesCollection;              var spinnerView = new SpinnerView();             spinnerView.render();             conferencesCollection.fetch({                 error: function(){                     console.log('error');                 },                 success: function(collection){                     var mainView = new MainView;                     mainView.collection = conferencesCollection;                     MyConference.mainView.currentView.content.show(mainView);                     spinnerView.remove();                 }             })         },         conference: function(id){             var conferenceModel = new ConferenceModel;             conferenceModel.set('id', id);             conferenceModel.fetch({                 error: function(){                     var conferenceNotFoundView = new ConferenceNotFoundView;                     MyConference.mainView.currentView.content.show(conferenceNotFoundView);                 },                 success: function(conference){                     var conferenceFullView = new ConferenceFullView;                     conferenceFullView.model = conference;                     MyConference.mainView.currentView.content.show(conferenceFullView);                 }             });         },         streams: function(conference_id){             ShowStreams(                 conference_id,                 function(){                     ShowStream(                         MyConference.                             mainView.                                 currentView.                                     content.                                         currentView.                                             model.                                                 streams.                                                     at(0).                                                         get('id')                     );                 }             );         },         stream: function(id){             ShowStream(id);         }     } });  var MainRouter = Backbone.Marionette.AppRouter.extend({     appRoutes: {         &quot;conference\/:id&quot;: &quot;conference&quot;,         &quot;conferences&quot;: &quot;main&quot;,         &quot;&quot;: &quot;main&quot;,         &quot;streams\/:conference_id&quot;: &quot;streams&quot;,         &quot;stream\/:id&quot;: &quot;stream&quot;     },     controller: new ConferencesController }); <\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e, \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043e\u0431\u044b\u0447\u043d\u0430\u044f \u0431\u0435\u043a\u0431\u043e\u043d\u043e\u0432\u0441\u043a\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c\/\u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044f, \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u0432\u044c\u044e\u0445\u0443. \u0421\u043f\u0438\u0441\u043e\u043a \u043a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0439 \u044d\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u044b\u0439 CollectionView. \u0414\u0435\u0442\u0430\u043b\u044c\u043d\u0435\u0435 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u044e\u0441\u044c \u0434\u043b\u044f View \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0433\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0438. \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 OpenStreetMap \u0438 GoogleMaps \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u0432\u0440\u0443\u0447\u043d\u0443\u044e. \u041c\u043e\u0436\u043d\u043e, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Leaflet, \u043d\u043e \u044f \u043d\u0435 \u0443\u0432\u0435\u0440\u0435\u043d, \u0447\u0442\u043e \u0433\u0443\u0433\u043b\u0443 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u043f\u0440\u044f\u043c\u043e\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0438\u0445 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430\u043c. \u0422\u0430\u043a \u0436\u0435 \u0442\u0430\u043c \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430\/pdf \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u0438\u043b\u0438 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0444\u0430\u0439\u043b, \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c. \u0418 \u0432\u0432\u0435\u0440\u0445\u0443 \u0441\u043f\u0440\u0430\u0432\u0430 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u043e\u043a\u043b\u0430\u0434\u043e\u0432.<br \/>  \u0415\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0437\u0430\u043b\u043e\u0433\u0438\u043d\u0435\u043d, \u043e\u043d \u0432\u0438\u0434\u0438\u0442 \u0442\u0440\u0438 \u043a\u043d\u043e\u043f\u043a\u0438, \u00ab\u043f\u043e\u0439\u0442\u0438\u00bb \u043d\u0430 \u043a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u044e, \u0432 \u0438\u0437\u0431\u0440\u0430\u043d\u043d\u043e\u0435 \u0438 \u043e\u0442\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f. \u0414\u0435\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u044f \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043b \u043d\u0435 \u043e\u0442 ItemView, \u0430 \u043e\u0442 Layout, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b \u0431\u043b\u043e\u043a, \u043a\u0443\u0434\u0430 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u0442\u044c \u044d\u0442\u0438 \u0442\u0440\u0438 \u043a\u043d\u043e\u043f\u043a\u0438.<\/p>\n<pre><code class=\"javascript\">regions: {     decision: &quot;#decision&quot; }, <\/code><\/pre>\n<p>  \u0418 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e \u0442\u0443 \u0438\u043b\u0438 \u0438\u043d\u0443\u044e \u0432\u044c\u044e\u0445\u0443.<\/p>\n<pre><code class=\"javascript\">if(MyConference.Auth.getUser().isNew()){     var view = new GuestDecisionView; }else{     var desisionModel = new DecisionModel(view.model.get('decision'));     var view = new LoggedInDecisionView({model: desisionModel});     view.parent = this; } this.decision.show(view); <\/code><\/pre>\n<p>  \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u043e\u0435\u0442 \u043d\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0435. \u0415\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0434\u0430\u0442\u044c \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u00abcordova platform add android\u00bb<\/p>\n<pre><code class=\"bash\">cordova platform add android <\/code><\/pre>\n<p>  \u041f\u043e\u0442\u043e\u043c<\/p>\n<pre><code class=\"bash\">cordova build android <\/code><\/pre>\n<p>  \u0414\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u0438\u043b\u0438<\/p>\n<pre><code class=\"bash\">cordova run android <\/code><\/pre>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0443 \u0441\u0435\u0431\u044f \u043d\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0435.<\/p>\n<p>  \u041a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u0446\u0435\u043b\u044c\u044e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 Google play, Apple App Store \u0438 Windows Store. \u041d\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043c\u043e\u0435\u0439 \u0434\u0435\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f web, \u0430 \u043d\u0435 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u0430\u044f, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0435\u0449\u0435 \u043d\u0435 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d \u043a\u0430\u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043d\u0438 \u0432 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u044d\u0442\u0438\u0445 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u043e\u0432.<\/p>\n<p>  \u041d\u0430\u0434\u0435\u044e\u0441\u044c \u043a\u043e\u043c\u0443-\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u0430 \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f. \u042f \u043f\u044b\u0442\u0430\u043b\u0441\u044f \u043d\u0435 \u0441\u0438\u043b\u044c\u043d\u043e \u0435\u0435 \u0440\u0430\u0437\u0434\u0443\u0432\u0430\u0442\u044c, \u043d\u043e \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0432\u0441\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b. \u0411\u0443\u0434\u0443 \u0440\u0430\u0434 \u043a\u0440\u0438\u0442\u0438\u043a\u0435, \u043f\u043e\u0436\u0435\u043b\u0430\u043d\u0438\u044f\u043c, pull request&#8217;\u0430\u043c \u0432 <a href=\"https:\/\/github.com\/peinguin\/MyConference\">\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439<\/a>. \u0418\u0437-\u0437\u0430 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430 \u0432\u044b\u0448\u043b\u043e \u043c\u043d\u043e\u0433\u043e, \u044f \u0435\u0433\u043e \u0440\u0430\u0437\u0431\u0438\u043b \u043d\u0430 \u0434\u0432\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u2014 \u043a\u043b\u0438\u0435\u043d\u0442 \u0438 \u0441\u0435\u0440\u0432\u0435\u0440. \u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043e\u043f\u0438\u0448\u0443 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 restfull \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0430 nodejs \u0441 orm\u2019\u043e\u043c \u0430\u0432\u0442\u043e\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0435\u0439 \u0438 memcached\u2019\u043e\u043c. \u0418 \u043a\u0430\u043a \u044f \u0434\u0435\u043f\u043b\u043e\u0438\u043b \u0432\u0441\u0435 \u044d\u0442\u043e \u043d\u0430 PaaS \u043e\u0442 RedHat \u2014 <a href=\"https:\/\/www.openshift.com\/\">openshift<\/a>.    \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\/post\/200192\/\"> http:\/\/habrahabr.ru\/post\/200192\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/9a5\/6f0\/070\/9a56f00707c1056770964beeaff388a2.png\" alt=\"image\" align=\"left\"\/><\/p>\n<p>  \u041e \u0447\u0435\u043c \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f. \u042f \u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043e\u043f\u044b\u0442\u043e\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 phonegap. \u0412 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0446\u0435\u043b\u044b\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441 \u0441 RESTfull \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c, \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c\u0438, \u0434\u0430 \u0435\u0449\u0435 \u0445\u043e\u0441\u0442\u0438\u0442\u0441\u044f \u043d\u0430 PaaS. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043e\u043f\u0438\u0448\u0443 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (html5 single page app, \u0437\u0430\u0432\u0435\u0440\u043d\u0443\u0442\u043e\u0435 \u0432 phonegap), \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0433\u043e (nodejs \u0441 swagger-node-express + node-orm2), \u0438 \u043a\u0430\u043a \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432\u0441\u0435 \u044d\u0442\u043e \u043d\u0430 openshift PaaS.  <\/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-200192","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/200192","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=200192"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/200192\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=200192"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=200192"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=200192"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}