admin管理员组

文章数量:1318335

I'm getting started with Backbone, and I'm hunting for an example application with no clutter but with all the key Backbone features: Routes, Models, Collections, Views and Events.

Ideally the application would have a workflow something like this:

  • The application loads a list of article titles.
  • The user clicks on an article title.
  • The view changes slightly to update the URL and highlight that blog post.

Minimal and simple, but just showing how to use all the key elements, including Routes (which often seem to be omitted in examples, including the official example).

Basically I'd like something like the sample code in this blog post, but (a) bulletproof and (b) with the HTML as well, so that I can copy, paste and start playing with it straight away.

Does anyone know of such an example?

I'm getting started with Backbone, and I'm hunting for an example application with no clutter but with all the key Backbone features: Routes, Models, Collections, Views and Events.

Ideally the application would have a workflow something like this:

  • The application loads a list of article titles.
  • The user clicks on an article title.
  • The view changes slightly to update the URL and highlight that blog post.

Minimal and simple, but just showing how to use all the key elements, including Routes (which often seem to be omitted in examples, including the official example).

Basically I'd like something like the sample code in this blog post, but (a) bulletproof and (b) with the HTML as well, so that I can copy, paste and start playing with it straight away.

Does anyone know of such an example?

Share Improve this question edited Feb 20, 2012 at 17:25 Richard asked Feb 20, 2012 at 13:28 RichardRichard 33k30 gold badges111 silver badges146 bronze badges 6
  • You could (relatively) easily extrapolate the HTML code necessary based on the selectors used within that example. – tkone Commented Feb 20, 2012 at 13:31
  • That's what I'm doing now :) I just wondered if there was an existing example. Also, the blog post is a discussion about incorrect methods, so I'm slightly concerned that even the final code may not be the most bulletproof! – Richard Commented Feb 20, 2012 at 13:33
  • Yes, so copy/pasting that code into document.ready gives me errors right away, and I'm not enough of a Backbone buff to know how to fix them. The hunt continues... – Richard Commented Feb 20, 2012 at 13:38
  • Yes, a standard "backbone.js blog" is actually missing. However something nice can be found, try with github./oivoodoo/pomodoro-app – Daniele B Commented Feb 20, 2012 at 13:41
  • I'm using the Todos app for now, and will just try to work out routes for myself. – Richard Commented Feb 20, 2012 at 14:41
 |  Show 1 more ment

3 Answers 3

Reset to default 3

Might be https://github./addyosmani/backbone-fundamentals (different example applications in "practicals" directory) is your required.

I am also new to backbone. But thanks to Addy Osmani (http://addyosmani.github./backbone-fundamentals), I got concepts and working code to understand backbone.

While it's not a blog, my Backbone Store has all of the items you request, in a didactic, literate programming tutorial. As an added bonus, there's also a Coffeescript/HAML/Stylus version on the same website.

I found this tutorial hugely useful while building my own single page App using Backbone.js... http://coenraets/blog/2011/12/backbone-js-wine-cellar-tutorial-part-1-getting-started/

There are additional parts that will get you started with CRUD features and fine-tuning etc.

本文标签: javascriptSimplebut fullyfeaturedBackbone example applicationStack Overflow