GithubHelp home page GithubHelp logo

example-todos's Introduction

Todos

This is a rewrite of Todos (Backbone's example application). We rewrote it to provide a simple and complete brunch example. This example also contains a test suite using QUnit. Special thanks to Jérôme Gravel-Niquet for his groundwork.

App Structure

In this example the todo list renders each list item. This has two disadvantages. Once it lacks performance if you include each item instead of generating the whole list and insert it at once. See http://www.quirksmode.org/dom/innerhtml.html for more Information. Futher you add a lot of event listeners. If you would add the whole list and bind the events to it, the events from the list items bubble up to the list element and you could catch them there.

Why didn't we do that in this example? Unless you have a large set of items the performance difference is not that big, but the code is much easier to read because it's better encapsulated.

Development

Use brunch build or brunch watch to compile changes in src folder. Usually we don't track the js/css files in our repositories, but decided to keep them here because we hope it would be easier to start using it.

How to run tests

To regenerate js test files run

cake compileTests

and view test/index.html in your browser.

Improvements

  • Add unit tests for views
  • Add inline comments

example-todos's People

Contributors

tosh avatar

Stargazers

Akihiko Tomokane avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.