eg-259:ch15
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
eg-259:ch15 [2013/03/05 20:33] – [Events on Views] eechris | eg-259:ch15 [2013/03/05 20:41] – [Complete CRUD App (in-memory storage)] eechris | ||
---|---|---|---|
Line 468: | Line 468: | ||
[[http:// | [[http:// | ||
- | ===== Router ===== | + | ===== App Router ===== |
<code javascript> | <code javascript> | ||
Line 505: | Line 505: | ||
Here we create a new object representing the whole application as an '' | Here we create a new object representing the whole application as an '' | ||
- | ===== Events | + | ===== Events ===== |
- | In the second router example [[http:// | + | In the second router example [[http:// |
===== Views Listening to Events ===== | ===== Views Listening to Events ===== | ||
- | In the final iteration [[http:// | + | In the final iteration [[http:// |
- | ===== Define Model ===== | ||
- | <code javascript> | + | ===== Complete CRUD App (in-memory storage) ===== |
- | (function ($) { | + | |
- | Project = Backbone.Model.extend({}); | + | * This final version of the app includes a facility for showing existing projects and allowing their titles to be edited. |
+ | * The app now has an '' | ||
+ | * View the code for insight into how this works | ||
- | firstProject = new Project({ | + | [[http:// |
- | title: ' | + | |
- | }); | + | |
- | + | ||
- | })(jQuery); | + | |
- | </ | + | |
- | + | ||
- | [[http:// | + | |
- | + | ||
- | ===== Define Model ===== | + | |
- | + | ||
- | <code javascript> | + | |
- | (function ($) { | + | |
- | + | ||
- | Project = Backbone.Model.extend({}); | + | |
- | + | ||
- | firstProject = new Project({ | + | |
- | title: ' | + | |
- | }); | + | |
- | + | ||
- | })(jQuery); | + | |
- | </ | + | |
- | + | ||
- | [[http:// | + | |
- | + | ||
- | ===== Define Model ===== | + | |
- | + | ||
- | <code javascript> | + | |
- | (function ($) { | + | |
- | + | ||
- | Project = Backbone.Model.extend({}); | + | |
- | + | ||
- | firstProject = new Project({ | + | |
- | title: ' | + | |
- | }); | + | |
- | + | ||
- | })(jQuery); | + | |
- | </ | + | |
- | + | ||
- | [[http:// | + | |
- | + | ||
- | ===== Define Model ===== | + | |
- | + | ||
- | <code javascript> | + | |
- | (function ($) { | + | |
- | + | ||
- | Project = Backbone.Model.extend({}); | + | |
- | + | ||
- | firstProject = new Project({ | + | |
- | title: ' | + | |
- | }); | + | |
- | + | ||
- | })(jQuery); | + | |
- | </ | + | |
- | + | ||
- | [[http:// | + | |
- | + | ||
- | ===== Application Router ===== | + | |
- | ===== Events ===== | + | |
- | ===== Complete CRUD App (in-memory storage) ===== | + | |
===== Summary of this Session ===== | ===== Summary of this Session ===== | ||
eg-259/ch15.txt · Last modified: 2013/03/05 20:44 by eechris