Skip to content
Browse files

Some cleanup in the example app.

  • Loading branch information...
1 parent 2548674 commit 88bb2e8d47829525a2054c73e469b7da4d20b6fa @miccolis miccolis committed Sep 16, 2011
View
7 examples/simple/models/Project.server.bones
@@ -38,11 +38,8 @@ models.Project.prototype.sync = function(method, model, options) {
if (match) {
fs.readFile(projectDir +'/'+ match.input, 'utf8', function(err, data) {
if (err) return callback('Could not retrieve project information.');
- // It's safe to assume old school REAMEs are manually
- // wrapped at ~80 chars, but these kids...
- if (match[1] && match[1] !== '.txt') {
- data = wrap(data);
- }
+ // 80 chars folks...
+ data = wrap(data);
resp.readme = data;
callback();
});
View
1 examples/simple/models/Projects.bones
@@ -1,3 +1,4 @@
model = Backbone.Collection.extend({
model: models.Project,
+ url: '/api/Project'
});
View
6 examples/simple/templates/About._
@@ -1,3 +1,5 @@
-<h1>About this</h1>
+<h1>About this application</h1>
-<p>Quick explanation of the various views/models/templates/routers in this project.</p>
+<p>Bones itself tries to make very few assumptions about just how you'll use the API that backbone provides. It's missions is to simply make that API work on the server. This sample application is an example of how you'd use the Backbone API running on both the client and server together. It makes a bunch of assumptions for about how you want things to work, Bones itself doesn't make many assumptions at all.<p>
+
+<p>In this application we're assuming a pretty traditional application model, but also that pages can render either on the client or the server, and that all client-side routing will be done via pushstate. If your browser doesn't have pushstate, you'll be fetching full pages from the server more often.</p>
View
3 examples/simple/views/App.bones
@@ -43,9 +43,6 @@ view = Backbone.View.extend({
},
initialize: function() {
if (!Bones.server) {
- feedbackSetup();
- searchSetup();
- adminSetup();
keyTracking();
}
}
View
3 examples/simple/views/Main.bones
@@ -1,5 +1,8 @@
view = Backbone.View.extend({
id: 'main',
+ initialize: function() {
+ this.app = new views.App();
+ },
attach: function() {
return this;
},

0 comments on commit 88bb2e8

Please sign in to comment.
Something went wrong with that request. Please try again.