Giter Site home page Giter Site logo

backbonify's Introduction

Backbonify

A generator for Backbone in Rails >= 3.1. The Language is javascript (no coffee) and the template engine is (only) handlebars wrapped in haml! However this generator takes advantage of hooks (brought by yehuda in rails 3) so it is easy to add other template engines and so on...

Warning

This is not a general purpose generator. I made it to fit my needs, specially with Views which heavily rely on backbone.grid. My plan is to make a more generic version later, or gladly accept a pull request that adds one ;-). Regarding templates I'm using handlebars, but it's fairly easy to add another one and use hooks to make the hole thing extremely modular.

Install with Rails 3.1

In your Gemfile :

gem "backbonify"

Usage

In your console :

rails g backbonify:install
rails g backbonify:scaffold Model field:type field:type

More Usage

backbonify:scaffold hooks on those (sub) generators. You can also cherry pick them!

rails g backbonify:model Model field:type ...
rails g backbonify:router Model
rails g backbonify:view Model
rails g backbonify:template Model field:type ...

What it Looks like (with styling)

Performances

Dependencies for haml and handlebars

Include them in your Gemfile

gem 'handlebars_assets'
gem 'haml_assets', :git => "http://github.com/infbio/haml_assets"
gem 'haml', :git => 'http://github.com/infbio/haml', :branch => 'form_for_fix'

TODO

specs ! & examples.

Thanks to

Originally I wanted to fork backbone-rails to add javascript version (instead of coffeescript only). But it was too far a part.

License

This project rocks and uses MIT-LICENSE.

backbonify's People

Contributors

charly avatar

Watchers

 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.