Giter Club home page Giter Club logo

backbone-requirejs-todo-example's Introduction

Boilerplate for BackboneJS projects using RequireJS

This is a simple boilerplate to quickly get projects going using Backbone and RequireJS. A todo-list example can be found at http://davidgranado.com/demos/todo-example/

What is this?

This is just a simple boilerplate to quickly get going with projects. I got tired of recreating the same code, folder structure, etc, so I just put this up. This is by no means all-inclusive, but I wanted to keep it as bare bones as possible for anyone to include whatever other libraries they wish. For example, I tend to use templating libraries other than underscore. But I don't want to be presumptive and add any here when you may want to use a different one. (There's already plenty of opinionated-ness in the structure).

Included libraries

RequireJS v1.0.5

jQuery v1.7.1

Underscore v1.3.1 fork https://github.com/amdjs/underscore

Backbone v0.9.0 fork https://github.com/amdjs/backbone

NormalizeCSS 2011-11-04

Getting started

To start, just download the boilerplate and point your browser to the index.html file in the root folder. If everything is working, you should see "App Initialized!" in the window.

The core of the app can be found in the folder src/js. Here, you can find the folders 'models', 'collections', 'views', and 'templates' each containing a simple stub to copy for new modules.

The basic flow can be seen by tracing through the default initialization app. This has three basic parts:

  1. The main template found in src/js/templates/main.html

  2. The main view found in src/js/main-view.js

  3. The main application found in src/js

The code is pretty simple and should give you an idea how to layout your app in this boilerplate.

Note: A router wasn't included by default. Most applications require just one router meaning no need to stub. You can just create one and insert into your app as needed

backbone-requirejs-todo-example's People

Contributors

david0178418 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

heamon7

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.