• Stars
    star
    155
  • Rank 240,864 (Top 5 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 10 years ago
  • Updated over 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Hypothesis: What if Backbone were created today, with ES 6&7, Virtual DOM, etc?

Dragon

Hypothesis: What if Backbone were created today, with ES 6&7, Virtual DOM, etc?

Hypothesis of project

What if Backbone were to be created today? What would the project look like? With ECMAScript 6 & 7, HTML5 pushState, Virtual DOM / Incremental DOM / etc., new ways of data-binding, etc., front-end development has evolved. This project sets out to see what such an evolution would look like from scratch.

Change log

See the change log.

Changes from Backbone to Dragon

General Changes

  • ES6 classes and ES7 class properties.
  • No more .extend() for extending a View, Model, etc. Instead, ES6 class and extends are used.
  • super() is used, and is expected to be used by developers to call parent methods.

Collections

  • Collections use the base Model by default instead of whining about not having a Model

Mixins

  • No more .extend() for mixing. Just use Object.assign directly.

Models

  • No more .set() and .get(); instead, just use the model's attr directly, as 'Object.observe' is observing changes.
  • No more .has(); just check for the property existence directly
  • No more .unset(); just delete it directly.
  • .toJSON actually returns JSON
  • Currently previous/changed properties/methods are not implemented as they can be found in the changes array. Open to re-implementation.

Views

  • Use Incremental DOM for quick patching of DOM changes. This makes a wrapping tag required.
  • Templates now managed by Starplates

Router

The router is inspired from Chaplin.

  • Objects in router can now be disposed, which has always been a bane for Backbone's router.

Controllers

The controller is inspired from Chaplin.

  • Controllers have been added to provide MVC structure with the router.

Dispatcher

The dispatcher is inspired from Chaplin.

  • Responsible for instantiating controller & action on matching route.

TODO

Mixin Ideas

Models

  • Delete/Unset that doesn't use delete
  • LocalStorage
  • Pagination
  • Schemas
  • Undo/Redo
  • Validation

Views

  • Collection View
  • Composition
  • Infinite Scroll
  • Media Queries
  • Regions
  • Selector Store (cache reference to selector in view template)
  • Transitions
    • afterEnter
    • beforeEnter
    • beforeEnter('someOtherView')
  • View States (beforeRender, afterRender, etc..)
  • Visibility (would mainly be useful with media query states)

Other

  • Redux integration

More Repositories

1

generator-chaplin

Generate scaffolds for Chaplin.js using Yeoman. Expedite the process of creating single page web apps.
JavaScript
15
star
2

webRTC-videochat

Project that uses node.js, web sockets, and the peer connection API to handle real-time HTML video chat.
JavaScript
13
star
3

The-Tramp

Chaplin.js on Node.js. Use it for performance boosts, SEO, re-usability.
JavaScript
11
star
4

docker-minecraft-with-bukkit

Docker Container that runs a Minecraft Bukkit Multiplayer Server
Shell
9
star
5

commonjs

CommonJS loader for client-side apps.
JavaScript
6
star
6

Muffin

Create a static website/blog.
JavaScript
5
star
7

chaplin-starter-kit

Single Page App using Chaplin (on top of Backbone), Browserify, ES6, Gulp, and friends.
JavaScript
5
star
8

styled-components-breakpoints

Provides a mixin for Styled Components to handle media query widths & ranges by logical names.
TypeScript
5
star
9

docker-ubuntu-node-hello

An example of how to use Docker on OS X with Vagrant, Ubuntu, and Node.js
Shell
4
star
10

node-express-socketio

A simple boilerplate for starting a new node.js project.
JavaScript
4
star
11

chaplin-starter

Boilerplate to offer structure when starting a new Chaplin.js project.
JavaScript
3
star
12

flowin

Real-time project builder & browser-refresh using node.js
JavaScript
2
star
13

nova

Nova is a modular web framework for Deno.
TypeScript
2
star
14

react-middleware-router

A middleware-based router for React
JavaScript
2
star
15

brazier

Generator for Node.js command-line apps.
JavaScript
2
star
16

Node-Mocha-CoffeeScript-Starter

A simple example to test CoffeeScript server-side with Node.js and Mocha.
2
star
17

browserify-chaplin-example

JavaScript
1
star
18

bma

Basic messaging app using Sencha.io
1
star
19

node-http-server-boilerplate

A simple boilerplate for serving up a site using Nodeapps/Nodejitsu's http-server
1
star
20

underscore.deepExtend

Extend objects beyond the first level.
JavaScript
1
star
21

booya

Monorepo and multi-repo management.
JavaScript
1
star
22

tidalwave

CoffeeScript
1
star
23

ZSH-theme

My ZSH theme
1
star
24

guide-fi-example-code-01

This repo is a part of a guide published in X magazine.
JavaScript
1
star
25

eisley

Object schema validation.
JavaScript
1
star
26

local-node-modules-to-webpack-alias

Webpack plugin to alias the local version of a given list of node modules.
JavaScript
1
star
27

stripperify

Browserify transformation that strips out an Array of strings from a stream.
JavaScript
1
star
28

flex

CSS grid that is flexible in options (including the option to make the grid flexible)
1
star
29

chrisabrams.github.com

CSS
1
star
30

dragonjs

JavaScript
1
star
31

useragent.js

Get the current user agent using Javascript.
JavaScript
1
star
32

node-rethinkdb-rest-api-starter

Starter example for using Node.js with RethinkDB.
1
star
33

Node.js-and-Backbone-Model-Validation-Starter

Example of how to use Node.js with Backbone Models to validate on server-side.
1
star
34

Game-of-Life

Swift example of Game of Life
Swift
1
star
35

nodejitsu-static-server

A ready-to-go static server nodejitsu application.
1
star
36

highlight-nearest-link-on-click

Highlight's the nearest link on click
1
star
37

abstract-react-component

An abstract React component
JavaScript
1
star
38

space-health-data-platform

Interface for NASA Health Data Platform Challenge
CoffeeScript
1
star
39

file-to-string-loader

Webpack loader that converts file contents to string and exports
JavaScript
1
star
40

grimwire

REST OS in HTML5. Powered by grimwire/local.
JavaScript
1
star
41

Fi

An HTML5 file uploader with progress bar using node.js for the file system.
JavaScript
1
star
42

brew-service

Node.js micro-service
JavaScript
1
star
43

hrbac

Hierarchical Role-based Access Control
TypeScript
1
star
44

abstract-react-component-jest-mount

Mount Abstract React Components for Jest Testing
JavaScript
1
star
45

jQuery-Mimic

A jQuery plugin that will mimic what you type into any element.
JavaScript
1
star
46

ts-paths-to-webpack-alias

Webpack plugin which resolves TypeScript paths to Webpack alias paths.
JavaScript
1
star