{"id":269412,"date":"2015-12-01T17:41:02","date_gmt":"2015-12-01T14:41:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=269412"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=269412","title":{"rendered":"\u0412\u0441\u0435, \u0447\u0442\u043e \u0432\u044b \u0445\u043e\u0442\u0435\u043b\u0438 \u0437\u043d\u0430\u0442\u044c \u043e \u043c\u043e\u0434\u0435\u043b\u044f\u0445 \u0438 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044f\u0445 \u0432 Titanium"},"content":{"rendered":"<p>       \u041d\u043e \u043f\u043e \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u0431\u043e\u044f\u043b\u0438\u0441\u044c \u0441\u043f\u0440\u043e\u0441\u0438\u0442\u044c. <br \/>  \u041c\u043e\u0434\u0435\u043b\u0438 \u2014 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u0430\u0436\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0431\u0435\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0438\u043a\u0443\u0434\u0430. <br \/>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u0441\u0432\u0435\u0442\u0438\u0442\u044c \u0432\u0441\u0435 \u0430\u0441\u043f\u0435\u043a\u0442\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0432 MVC \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0435 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 Appcelerator Titanium. <br \/>  \u0415\u0441\u043b\u0438 \u0432\u044b \u0435\u0449\u0435 \u043d\u0435 \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b\u0438 \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0441 \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438, \u0442\u043e \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442 \u0432\u0430\u043c \u043f\u0430\u0440\u0443 \u043a\u0438\u043b\u043e\u043c\u0435\u0442\u0440\u043e\u0432 \u043d\u0435\u0440\u0432\u043e\u0432. <br \/>  <a name=\"habracut\"><\/a>   <\/p>\n<h1>Backbone.js<\/h1>\n<p>  \u0418\u0442\u0430\u043a, \u043f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u0441\u0442\u043e\u0438\u0442 \u0437\u043d\u0430\u0442\u044c \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438 \u0432 Titanium, \u044d\u0442\u043e \u0442\u043e, \u0447\u0442\u043e \u043e\u043d\u0438 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u044b \u043d\u0430 \u043c\u043e\u0434\u0435\u043b\u044f\u0445 \u0438 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044f\u0445 \u0438\u0437 Backbone. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0432\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0438 \u043c\u0435\u0442\u043e\u0434\u044b, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 Backbone; \u0432\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u0431\u0443\u0434\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u043d\u0435 \u043b\u0438\u0448\u043d\u0438\u043c \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441 \u043d\u0435\u0439 \u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f, \u0435\u0441\u043b\u0438 \u0432\u044b \u0435\u0449\u0435 \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0441\u0434\u0435\u043b\u0430\u043b\u0438. <br \/>  \u041d\u0430 \u0432\u0441\u044f\u043a\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439 \u0441\u0434\u0435\u043b\u0430\u044e \u0430\u043a\u0446\u0435\u043d\u0442 \u043d\u0430 \u0442\u0435\u0440\u043c\u0438\u043d\u043e\u043b\u043e\u0433\u0438\u0438: \u043c\u043e\u0434\u0435\u043b\u044c \u2014 \u044d\u0442\u043e \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u0430\u044f \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c, \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044f \u2014 \u044d\u0442\u043e \u043d\u0430\u0431\u043e\u0440 \u043e\u0434\u043d\u043e\u0442\u0438\u043f\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439.   <\/p>\n<blockquote><p>\u0412\u0430\u0436\u043d\u043e: Titanium \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 Backbone \u0432\u0435\u0440\u0441\u0438\u0438 0.9.2, \u0442\u0430\u043a \u0447\u0442\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 Backbone \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043d\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b.<\/p><\/blockquote>\n<p>  <\/p>\n<h1>Underscore.js<\/h1>\n<p>  \u041a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u0442\u0430\u043a \u0436\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u044e\u0442 \u043c\u0435\u0442\u043e\u0434\u044b Underscore.js \u0434\u043b\u044f \u043e\u0431\u043b\u0435\u0433\u0447\u0435\u043d\u0438\u044f \u0436\u0438\u0437\u043d\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u0435\u0442\u043e\u0434 <a href=\"http:\/\/underscorejs.ru\/#map\">.map<\/a>   <\/p>\n<h1>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435<\/h1>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u043c\u043e\u0436\u043d\u043e \u0434\u0432\u0443\u043c\u044f \u0440\u0430\u0432\u043d\u043e\u0441\u0438\u043b\u044c\u043d\u044b\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438: \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Appcelerator Studio \u0438\u043b\u0438 \u0432\u0440\u0443\u0447\u043d\u0443\u044e. <br \/>  \u0412\u0440\u0443\u0447\u043d\u0443\u044e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0430 \u0432 \u043f\u0430\u043f\u043a\u0435 &lt;project&gt;\/app\/models\/ (\u0447\u0442\u043e, \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0438 \u0441\u0434\u0435\u043b\u0430\u0435\u0442 \u0437\u0430 \u0432\u0430\u0441 \u0441\u0442\u0443\u0434\u0438\u044f):   <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0424\u043e\u0440\u043c\u0430\u0442 \u0444\u0430\u0439\u043b\u0430 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438<\/b><\/p>\n<div class=\"spoiler_text\">  <\/p>\n<pre><code class=\"javascript\">exports.definition = {      config : {          \/\/ \u0441\u0445\u0435\u043c\u0430 \u0434\u0430\u043d\u043d\u044b\u0445      },      extendModel: function(Model) {           _.extend(Model.prototype, {              \/\/ \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 Backbone.Model           });          return Model;      },      extendCollection: function(Collection) {           _.extend(Collection.prototype, {              \/\/ \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 Backbone.Collection           });          return Collection;      }  }  <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435\u0441\u044c \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0442\u0443\u0434\u0438\u0438 \u2014 \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0437\u043e\u0432\u0438\u0442\u0435 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e\u0435 \u043c\u0435\u043d\u044e \u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043f\u0443\u043d\u043a\u0442 \u00abNew -&gt; Alloy Model\u00bb. \u041f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0434\u0438\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u0435 \u043e\u043a\u043d\u043e \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442 \u0432\u0430\u043c \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0442\u0438\u043f \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u0430: localStorage, properties \u0438\u043b\u0438 sql. \u0422\u0438\u043f\u044b \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u043e\u0432 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0434\u0430\u043b\u044c\u0448\u0435. <br \/>  \u0412\u0441\u0435, \u0447\u0442\u043e \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u044d\u0442\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u0434\u043b\u044f \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430, \u044d\u0442\u043e \u0431\u043b\u043e\u043a config. \u0412 \u043d\u0435\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0441\u0445\u0435\u043c\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0442\u0438\u043f \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u0430 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438. \u042d\u0442\u043e\u0442 \u0431\u043b\u043e\u043a \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u043e\u043b\u044f:   <\/p>\n<ul>\n<li><b>columns<\/b>: \u0441\u043b\u043e\u0432\u0430\u0440\u044c, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u043f\u043e\u043b\u044f \u043c\u043e\u0434\u0435\u043b\u0438. \u041a\u043b\u044e\u0447 \u2014 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u044f, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u2014 \u0442\u0438\u043f. \u0422\u0438\u043f\u044b \u043a\u0430\u043a \u0432 SQLite: <i>string, varchar, int, tinyint, smallint, bigint, double, float, decimal, number, date, datetime \u0438 boolean<\/i><\/li>\n<li><b>defaults<\/b>: \u0442\u043e\u0442 \u0436\u0435 \u0441\u043b\u043e\u0432\u0430\u0440\u044c, \u0447\u0442\u043e \u0438 columns, \u043d\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u2014 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0435\u0439 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0435\u0441\u043b\u0438 \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u0438\u0437 \u043d\u0438\u0445 \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e \u043f\u0440\u0438 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438<\/li>\n<li><b>adapter<\/b>: \u044d\u0442\u043e\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u0432\u0430 \u043f\u043e\u043b\u044f: <br \/> \n<ul>\n<li><b>type<\/b>: \u0442\u0438\u043f \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u0430 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438 <\/li>\n<li><b>collection_name<\/b>: \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438. \u041c\u043e\u0436\u0435\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043b\u044f \u0432\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438<\/li>\n<li><b>idAttribute<\/b>: \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0439 \u043a\u043b\u044e\u0447<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u044c books. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0432 \u043f\u0430\u043f\u043a\u0435 &lt;project&gt;\/app\/models\/ \u0444\u0430\u0439\u043b books.js:   <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u0438\u043c\u0435\u0440 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438<\/b><\/p>\n<div class=\"spoiler_text\">  <\/p>\n<pre><code class=\"javascript\">exports.definition = {      config: {          &quot;columns&quot;: {              &quot;title&quot;: &quot;String&quot;,              &quot;author&quot;: &quot;String&quot; \/\/ \u0435\u0441\u043b\u0438 \u0442\u0438\u043f \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u0430 sql, \u0442\u043e \u0437\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u043d\u043e \u0435\u0449\u0435 SQLite keywords \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c         },          &quot;defaults&quot;: {              &quot;title&quot;: &quot;-&quot;,              &quot;author&quot;: &quot;-&quot;          },          &quot;adapter&quot;: {              &quot;type&quot;: &quot;sql&quot;,              &quot;collection_name&quot;: &quot;books&quot;,             &quot;idAttribute&quot; : &quot;title&quot;,             &quot;db_file&quot; : &quot;db_books&quot;, \/\/ \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e _alloy_             &quot;db_name&quot; : &quot;books.sqlite&quot;, \/\/ \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 \u0431\u0430\u0437\u044b \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 \/app\/assets. \u0415\u0441\u043b\u0438 \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043e, \u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0441\u0442\u0441\u044f \u0444\u0430\u0439\u043b [\u0438\u043c\u044f_\u0431\u0430\u0437\u044b].sqlite         }      }  }  <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0417\u0434\u0435\u0441\u044c \u0443 \u043d\u0430\u0441 \u043c\u043e\u0434\u0435\u043b\u044c \u0441 \u0434\u0432\u0443\u043c\u044f \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u043c\u0438 \u043f\u043e\u043b\u044f\u043c\u0438: \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u043d\u0438\u0433\u0438 \u0438 \u0430\u0432\u0442\u043e\u0440. \u041e\u0431\u0430 \u043f\u043e\u043b\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0438\u043c\u0435\u044e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 &quot;-&quot;. \u041f\u043e\u043a\u0430 \u0432\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u043e. <br \/>  \u0422\u0438\u043f \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u0430 sql \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u0440\u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435, \u043c\u043e\u0434\u0435\u043b\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u0430 \u043f\u043e\u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c\u0441\u044f \u0441 SQLite \u0431\u0430\u0437\u043e\u0439 \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b books. <br \/>  \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0438 \u043c\u0435\u0442\u043e\u0434\u044b \u0432 \u043c\u043e\u0434\u0435\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0442\u0430\u043a:   <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438<\/b><\/p>\n<div class=\"spoiler_text\">  <\/p>\n<pre><code class=\"javascript\">exports.definition = {      config : {          \/\/ \u0441\u0445\u0435\u043c\u0430 \u0434\u0430\u043d\u043d\u044b\u0445      },      extendModel: function(Model) {           _.extend(Model.prototype, {              \/\/ \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 Backbone.Model              customProperty: 'book',              customFunction: function() {                  Ti.API.info('\u041f\u0440\u0438\u0432\u0435\u0442, \u044f \u043a\u043d\u0438\u0433\u0430');              },           });          return Model;      }  }  <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0422\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0439. \u0415\u0441\u043b\u0438 \u0432\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0432 extendModel, \u043e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0443 \u043c\u043e\u0434\u0435\u043b\u0438, \u0430 \u0443 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u043d\u0435\u0442, \u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442.   <\/p>\n<h1>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435<\/h1>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043a \u043c\u043e\u0434\u0435\u043b\u0438\/\u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0434\u0432\u0443\u043c\u044f \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438:   <\/p>\n<ul>\n<li>\u0421\u043e\u0437\u0434\u0430\u0432 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0438\u043d\u0433\u043b\u0442\u043e\u043d <\/li>\n<li>\u0421\u043e\u0437\u0434\u0430\u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0441\u044b\u043b\u043a\u0443 <\/li>\n<li>\u0423\u043a\u0430\u0437\u0430\u0432 \u0432 XML \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0435, \u0435\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 Alloy <\/li>\n<\/ul>\n<p>  <\/p>\n<h2>\u0413\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0438\u043d\u0433\u043b\u0442\u043e\u043d<\/h2>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u043e\u0434\u0435\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0441\u0440\u0430\u0437\u0443 \u0432\u0435\u0437\u0434\u0435, \u0432\u043e \u0432\u0441\u0435\u0445 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430\u0445. \u0415\u0441\u043b\u0438 \u043e\u043d\u0430 \u0443\u0436\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0430 \u0432 \u043e\u0434\u043d\u043e\u043c, \u0442\u043e \u0432 \u0434\u0440\u0443\u0433\u043e\u043c \u0432\u044b\u0437\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430 <a href=\"http:\/\/docs.appcelerator.com\/platform\/latest\/#!\/api\/Alloy.Models-method-instance\">Alloy.Models.instance<\/a> \u0432\u0435\u0440\u043d\u0435\u0442 \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u044d\u0442\u0443 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c. \u041f\u0440\u0438\u043c\u0435\u0440 \u2014 \u043c\u043e\u0434\u0435\u043b\u044c User, \u043e\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u0435\u0437\u0434\u0435 \u043e\u0434\u043d\u0430. <br \/>  \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0434\u043b\u044f \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0439.   <\/p>\n<h2>\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0441\u044b\u043b\u043a\u0430<\/h2>\n<p>  \u041b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0441\u044b\u043b\u043a\u0443 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430 <a href=\"http:\/\/docs.appcelerator.com\/platform\/latest\/#!\/api\/Alloy-method-createModel\">Alloy.createModel<\/a>. \u0422\u043e\u0433\u0434\u0430 \u044d\u0442\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u0442\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430, \u0433\u0434\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0430. \u041c\u0435\u0442\u043e\u0434 \u2014 \u0444\u0430\u0431\u0440\u0438\u043a\u0430, \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0435 \u0432 \u043d\u0435\u0433\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 (\u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430 \u043c\u0438\u043d\u0443\u0441 .js) \u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b. \u0418 \u0432\u0441\u0435. <br \/>  \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0434\u043b\u044f \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0439.   <\/p>\n<h2>XML<\/h2>\n<p>  \u042d\u043b\u0435\u043c\u0435\u043d\u0442 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0438 &lt;Model&gt; \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c <i>\u043f\u0440\u044f\u043c\u044b\u043c \u043f\u043e\u0442\u043e\u043c\u043a\u043e\u043c<\/i> &lt;Alloy&gt;. \u0418 \u0443 \u043d\u0435\u0433\u043e \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0430\u0442\u0440\u0438\u0431\u0443\u0442 src \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u00ab\u0438\u043c\u044f-\u0444\u0430\u0439\u043b\u0430-\u043c\u043e\u0434\u0435\u043b\u0438-\u043c\u0438\u043d\u0443\u0441-.js\u00bb. \u0422\u043e\u0433\u0434\u0430 \u0432 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0435 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0441\u0438\u043d\u0433\u043b\u0442\u043e\u043d \u044d\u0442\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d Alloy.Models:   <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">XML<\/b><\/p>\n<div class=\"spoiler_text\">  <\/p>\n<pre><code class=\"xml\">&lt;Alloy&gt;      &lt;Model src=&quot;book&quot; \/&gt;      &lt;Window&gt;          &lt;TableView id=&quot;table&quot; \/&gt;      &lt;\/Window&gt;  &lt;\/Alloy&gt;  <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Controller<\/b><\/p>\n<div class=\"spoiler_text\">  <\/p>\n<pre><code class=\"javascript\">var drama = Alloy.Models.book;  drama.set('title', '\u0414\u0430\u043b\u044c\u0448\u0435 \u0436\u0438\u0432\u0438\u0442\u0435 \u0441\u0430\u043c\u0438');  drama.set('author', '\u0414\u0436\u043e\u043d\u0430\u0442\u0430\u043d \u0422\u0440\u043e\u043f\u043f\u0435\u0440');  <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0422\u0430\u043a \u0436\u0435 \u0443 \u044d\u0442\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0435\u0441\u0442\u044c \u0430\u0442\u0440\u0438\u0431\u0443\u0442 instance. \u0415\u0441\u043b\u0438 \u043e\u043d \u0438\u043c\u0435\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 true, \u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u0430 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043c\u043e\u0434\u0435\u043b\u044c (\u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0430\u044f, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430). \u041a\u0441\u0442\u0430\u0442\u0438, \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0432 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d Alloy.Models, \u043a \u043d\u0435\u0439 \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043f\u043e id:   <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">XML<\/b><\/p>\n<div class=\"spoiler_text\">  <\/p>\n<pre><code class=\"xml\">&lt;Alloy&gt;      &lt;Model id=&quot;myBook&quot; src=&quot;book&quot; instance=&quot;true&quot;\/&gt;      &lt;Window&gt;          &lt;TableView id=&quot;table&quot; \/&gt;      &lt;\/Window&gt;  &lt;\/Alloy&gt;  <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Controller<\/b><\/p>\n<div class=\"spoiler_text\">  <\/p>\n<pre><code class=\"javascript\">var drama = $.myBook;  drama.set('title', '\u0414\u0430\u043b\u044c\u0448\u0435 \u0436\u0438\u0432\u0438\u0442\u0435 \u0441\u0430\u043c\u0438');  drama.set('author', '\u0414\u0436\u043e\u043d\u0430\u0442\u0430\u043d \u0422\u0440\u043e\u043f\u043f\u0435\u0440');  <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0434\u043b\u044f \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0439.   <\/p>\n<h1>\u0410\u0434\u0430\u043f\u0442\u0435\u0440\u044b \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438<\/h1>\n<p>  \u041d\u0430\u043a\u043e\u043d\u0435\u0446 \u043c\u044b \u0434\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c \u0434\u043e \u0442\u043e\u0433\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0430, \u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u044b\u043b\u043e \u043e\u0431\u0435\u0449\u0430\u043d\u043e \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u00ab\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435\u00bb. \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438 \u043c\u0430\u043b\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0445\u0435\u043c\u0443 \u0434\u0430\u043d\u043d\u044b\u0445. \u041d\u0443\u0436\u043d\u043e \u0435\u0449\u0435 \u0438\u0445 \u043a \u0447\u0435\u043c\u0443-\u0442\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c. \u0412\u043e\u0442 \u044d\u0442\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0438 \u0435\u0441\u0442\u044c \u0430\u0434\u0430\u043f\u0442\u0435\u0440 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438.<br \/>  \u0410\u0434\u0430\u043f\u0442\u0435\u0440 \u2014 \u044d\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f Backbone.sync. \u0422\u0430\u043a \u043a\u0430\u043a \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u2014 \u044d\u0442\u043e CRUD \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 (\u043d\u0443, \u043b\u0438\u0447\u043d\u043e \u0438\u0437 \u043c\u043e\u0435\u0433\u043e \u043e\u043f\u044b\u0442\u0430), \u0442\u043e \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043c\u0435\u0442\u043e\u0434 Backbone.sync \u0434\u0435\u043b\u0430\u0435\u0442 RESTful JSON \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043f\u043e \u0442\u0435\u043c \u0430\u0434\u0440\u0435\u0441\u0430\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u0443\u043a\u0430\u0436\u0435\u0442\u0435 \u0432 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u0445 Model.urlRoot \u0438 Collection.url. \u0422\u0430\u043a \u0433\u043b\u0430\u0441\u0438\u0442 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f. \u041d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u0436\u0435 \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u043a\u0443 \u043e\u0442 \u043c\u043e\u0434\u0435\u043b\u0435\u0439\/\u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0439, \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u043e\u043c restapi, \u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u0447\u0443\u0442\u044c \u043f\u043e\u0437\u0436\u0435. \u0410 \u043f\u043e\u043a\u0430 \u0432\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u043a \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0436\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438.<\/p>\n<p>  \u0410\u0434\u0430\u043f\u0442\u0435\u0440\u044b \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0447\u0435\u0442\u044b\u0440\u0435\u0445 \u0442\u0438\u043f\u043e\u0432:  <\/p>\n<ul>\n<li>sql <\/li>\n<li>properties <\/li>\n<li>localStorage (\u0441 \u0432\u0435\u0440\u0441\u0438\u0438 alloy 1.5.0 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u0442\u0430\u043a \u0447\u0442\u043e \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u0435\u0433\u043e \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c)<\/li>\n<li>\u0441\u0432\u043e\u0439 \u0442\u0438\u043f<\/li>\n<\/ul>\n<p>  <\/p>\n<h2>SQL<\/h2>\n<p>  \u0415\u0441\u043b\u0438 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0435 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 adapter \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d \u043a\u043b\u044e\u0447 idAttribute, \u0442\u043e Alloy \u0441\u0430\u043c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0432 \u0432\u0430\u0448\u0435\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043f\u043e\u043b\u0435 alloy_id \u0438 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043a\u0430\u043a \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0439 \u043a\u043b\u044e\u0447.<br \/>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043f\u043e\u043b\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0430 db_file \u0438 db_name (\u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u00ab\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435\u00bb). \u0417\u0434\u0435\u0441\u044c \u043e\u043d\u0438 \u0432\u0430\u0436\u043d\u044b.<br \/>  \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u0434\u0440\u0443\u0433\u0438\u0445 \u0442\u0438\u043f\u043e\u0432, \u0432 \u044d\u0442\u043e\u043c \u043c\u0435\u0442\u043e\u0434\u0435 <b>Backbone.Collection.fetch<\/b> \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0446\u0435\u043b\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u0430:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421\u0442\u0440\u043e\u043a\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432 .fetch()<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"javascript\">var library = Alloy.createCollection('book'); \/\/ \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b - \u044d\u0442\u043e collection_name \u0438\u0437 \u043a\u043e\u043d\u0444\u0438\u0433\u0430 var table = library.config.adapter.collection_name; \/\/ \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 library.fetch({query:'SELECT * from ' + table + ' where author=&quot;' + searchAuthor + '&quot;'}); \/\/ prepared statement library.fetch({query: { statement: 'SELECT * from ' + table + ' where author = ?', params: [searchAuthor] }}); <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0422\u043e \u0435\u0441\u0442\u044c \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u2014 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u0445 \u043e\u0431\u044a\u0435\u043a\u0442 \u0441 \u043a\u043b\u044e\u0447\u043e\u043c query, \u0430 \u0445\u043e\u0442\u0438\u0442\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u2014 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0438 \u0437\u0430\u043f\u0440\u043e\u0441, \u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b.<br \/>  \u041a\u0441\u0442\u0430\u0442\u0438, \u043c\u043e\u0436\u0435\u0442\u0435 \u0435\u0449\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043a\u043b\u044e\u0447 id. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0430\u0434\u0430\u043f\u0442\u0435\u0440 \u0441\u0430\u043c \u043f\u043e\u0439\u043c\u0435\u0442, \u0447\u0442\u043e \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 WHERE id=?..  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">id<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"javascript\">myModel.fetch({id: 123}); \/\/ \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e myModel.fetch({query: 'select * from ... where id = ' + 123 }); <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<h2>properties <\/h2>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u0430\u0448\u0430 \u0431\u0430\u0437\u0430 \u2014 \u043d\u0435 SQLite, \u0442\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u0430\u0434\u0430\u043f\u0442\u0435\u0440 \u0438 \u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0432\u0441\u0435 \u0447\u0442\u043e \u0443\u0433\u043e\u0434\u043d\u043e. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 app\/assets\/alloy\/sync \u0438\u043b\u0438 app\/lib\/alloy\/sync \u0444\u0430\u0439\u043b \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, myAdapter.js, \u0430 \u043f\u043e\u0442\u043e\u043c \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432 adapter.type \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430, \u0442\u043e \u0435\u0441\u0442\u044c \u00abmyAdapter\u00bb.<br \/>  \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0444\u0430\u0439\u043b \u044d\u0442\u043e\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0440\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438:  <\/p>\n<ul>\n<li><b>module.exports.beforeModelCreate(config)<\/b> (\u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e) \u2014 \u043c\u0435\u0442\u043e\u0434, \u043a\u0430\u043a \u044f\u0441\u043d\u043e \u0438\u0437 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0434 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u0438. \u0412 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u0445 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f config \u044d\u0442\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438. \u0417\u0434\u0435\u0441\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c baseUrl \u043a \u0430\u0434\u0440\u0435\u0441\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 config<\/li>\n<li><b>module.exports.afterModelCreate<\/b> (\u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e) \u2014 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0434\u0432\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430: \u043d\u043e\u0432\u0435\u043d\u044c\u043a\u0438\u0439 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 Backbone.Model \u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 \u043c\u043e\u0434\u0435\u043b\u0438<\/li>\n<li><b>module.exports.sync<\/b> \u2014 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u0430 Backbone.sync. \u041e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435<\/li>\n<\/ul>\n<h2><a href=\"https:\/\/github.com\/viezel\/napp.alloy.adapter.restapi\">restapi<\/a><\/h2>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0430 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0430\u0434\u0430\u043f\u0442\u0435\u0440 \u043d\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f, \u0435\u0441\u0442\u044c \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0430\u0434\u0430\u043f\u0442\u0435\u0440 restapi, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u0432\u0445\u043e\u0434\u0438\u0442 \u0432 \u0447\u0438\u0441\u043b\u043e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445, \u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0441\u0432\u043e\u044e \u0440\u0430\u0431\u043e\u0442\u0443 (RESTful JSON \u0437\u0430\u043f\u0440\u043e\u0441\u044b) \u043d\u0430 \u0443\u0440\u0430. <br \/>  \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u2014 \u043f\u043e\u043b\u0435 URL \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0435:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u0438\u043c\u0435\u0440 \u043c\u043e\u0434\u0435\u043b\u0438 \u0441 \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u043e\u043c restapi<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"javascript\">exports.definition = {     config: {         &quot;URL&quot;: &quot;http:\/\/example.com\/api\/modelname&quot;,         \/\/&quot;debug&quot;: 1,         &quot;adapter&quot;: {             &quot;type&quot;: &quot;restapi&quot;,             &quot;collection_name&quot;: &quot;MyCollection&quot;,             &quot;idAttribute&quot;: &quot;id&quot;         }     },           extendModel: function(Model) {               _.extend(Model.prototype, {});         return Model;     },     extendCollection: function(Collection) {                 _.extend(Collection.prototype, {});         return Collection;     }        } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u044d\u0442\u043e \u043d\u0435 \u0432\u0441\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438, \u0437\u0430 \u043f\u043e\u043b\u043d\u044b\u043c \u0441\u043f\u0438\u0441\u043a\u043e\u043c \u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e. \u0410 \u0447\u0442\u043e \u0435\u0449\u0435 \u0432\u0430\u0436\u043d\u043e\u0433\u043e \u0432 \u044d\u0442\u043e\u043c \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u0435 \u2014 \u044d\u0442\u043e \u0442\u043e, \u0447\u0442\u043e \u043c\u0435\u0442\u043e\u0434 fetch \u0432 \u043d\u0435\u043c \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0441 \u0442\u0440\u0435\u043c\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c\u0438 \u043f\u043e\u043b\u044f\u043c\u0438:  <\/p>\n<ul>\n<li><b>data<\/b> \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u0430<\/li>\n<li><b>success<\/b> callback \u0434\u043b\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430<\/li>\n<li><b>error<\/b> callback \u0434\u043b\u044f \u043e\u0448\u0438\u0431\u043a\u0438<\/li>\n<\/ul>\n<p>  <\/p>\n<h1>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h1>\n<p>  \u0418\u0442\u0430\u043a, \u044d\u0442\u043e \u0432\u0441\u0435, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0437\u043d\u0430\u0442\u044c \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0430 \u0431\u0430\u0437\u043e\u0432\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u0443\u043c\u0435\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438 \u0432 Titanium. \u0422\u0435\u043c\u0430 \u044d\u0442\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0448\u0438\u0440\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u044f \u0441\u043e\u0437\u043d\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u043f\u0443\u0441\u0442\u0438\u043b \u0437\u0434\u0435\u0441\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u043c\u0435\u0436\u0434\u0443 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438 \u0431\u0430\u0437\u044b, data binding, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0431\u0435\u0437 Alloy, \u0430 \u0442\u0430\u043a \u0436\u0435 \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 SQLite. \u0412\u0441\u0435 \u044d\u0442\u0438 \u043f\u0440\u043e\u0431\u0435\u043b\u044b \u044f \u043d\u0430\u0434\u0435\u044e\u0441\u044c \u0432\u043e\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u0441\u043b\u0435\u0434\u0438\u0442\u0435 \u0437\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f\u043c\u0438.<br \/>  \u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0430 \u043d\u0430 \u0430) \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438; \u0431) \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c \u043e\u043f\u044b\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0432 Alloy. \u0415\u0441\u043b\u0438 \u0441\u0440\u0435\u0434\u0438 \u0445\u0430\u0431\u0440\u0430\u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430 \u0435\u0441\u0442\u044c \u043b\u044e\u0434\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0432 \u044d\u0442\u043e\u043c \u0432\u043e\u043f\u0440\u043e\u0441\u0435 \u043b\u0443\u0447\u0448\u0435 \u043c\u0435\u043d\u044f \u0438 \u0432\u0438\u0434\u044f\u0442 \u043e\u0448\u0438\u0431\u043a\u0438 \u0438\u043b\u0438 \u043d\u0435\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438, \u043f\u0440\u043e\u0448\u0443, \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0439\u0442\u0435, \u043e\u0431\u0441\u0443\u0434\u0438\u043c.               <\/p>\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:\/\/habrahabr.ru\/post\/272049\/\"> http:\/\/habrahabr.ru\/post\/272049\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       \u041d\u043e \u043f\u043e \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u0431\u043e\u044f\u043b\u0438\u0441\u044c \u0441\u043f\u0440\u043e\u0441\u0438\u0442\u044c. <br \/>  \u041c\u043e\u0434\u0435\u043b\u0438 \u2014 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u0430\u0436\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0431\u0435\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0438\u043a\u0443\u0434\u0430. <br \/>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u0441\u0432\u0435\u0442\u0438\u0442\u044c \u0432\u0441\u0435 \u0430\u0441\u043f\u0435\u043a\u0442\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0432 MVC \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0435 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 Appcelerator Titanium. <br \/>  \u0415\u0441\u043b\u0438 \u0432\u044b \u0435\u0449\u0435 \u043d\u0435 \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b\u0438 \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0441 \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438, \u0442\u043e \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442 \u0432\u0430\u043c \u043f\u0430\u0440\u0443 \u043a\u0438\u043b\u043e\u043c\u0435\u0442\u0440\u043e\u0432 \u043d\u0435\u0440\u0432\u043e\u0432.   <\/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-269412","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/269412","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=269412"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/269412\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=269412"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=269412"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=269412"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}