Git Product home page Git Product logo

marionetteify's Introduction

Backbone.Marionette, Handlebars & Browserify production ready TodoMVC example!

This project aims to present a structured project ready for production using Backbone / Marionette, Handlebars, Jed, Browerify, Grunt.

Why?

Because I have been working with Marionette since v0.9 on little and big real word projects and setting an easy to use production tool chain to build and deploy was never easy. I worked with javascript object namespace, then AMD / RequireJS. Building with bash script, python script, then finally grunt.

ES6 / Harmony is coming with import / export feature and it is the feature some of us are waiting the most. But I need it today, while being able to build for legacy browsers also. (Yes I'm looking at IE).

Here comes a new challenger: Browserify, which is a very nice actual to use CommonJS / NodeJS like import (require) / export that also play very fine with package manager. Putting this with the power of Grunt, npm and the JS community that write great tools and plugins, there is no excuse to not use a proper production ready tool chain today.

Why TodoMVC?

Because Addy Osmani & folks did a great job with this application to help us discover and choose between a lot of framework and tools. Also it totally fits with the spirit of this example: this is a solution, they are so much other ways.

You can have a taste with the Backbone version, or the Marionette one, with RequireJS, generally with inline templating which are very fine for little project like this Todo application. But when your application goes big, like very big, you need more or you will fall back down in old vicious non maintainable structure.

By starting with official TodoMVC project you can see the differences to this example and maybe have a better understand of all little concepts I tried to put on.

Why Browserify?

Because I do not need the A of AMD -if you build a single file at the end you neither- and RequireJS needs of boilerplate code bothers me. Also:

  • quite close of ES6 module syntax
  • same NodeJS syntax
  • npm power! (63 857 packages and growing)
  • very simple but yet very powerful. External and require option are divine!
  • great people that build great plugins. Once we taste the transform option to load Handlebars template, coffeescript, AMD, ... you can not go back!

Features

  • project files structure: very Marionette usage oriented
  • architecture orientation & modularity thanks to Marionette App & Modules
  • real time automatic watch / build / refresh in browser thanks to Grunt / watch / livereload / connect
  • optimized development build: vendors and app separation
  • clean & DRY import / export, module writing. No boilerplate needed, no more wrapper or IIFE everywhere!
  • very simple use of Handlebars templates thanks to hbsy!
  • coffeescript compatible thanks to coffeeify!

Step by step walkthrough

Roadmap

  • 0.2.0 i18n with Jed, pot / po generation, singular / plural support
  • 0.3.0 less integration, better css dividing: each view its css, its module its assets
  • 0.4.0 Cordova

One more thing

This is a solution, not the solution. It fits my need with the tools I like. You may have other needs, other targets, other tastes and disagree with my solution, that is fine! [test]: https://github.com/tastejs/todomvc

marionetteify's People

Contributors

jsteunou avatar

Watchers

 avatar  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.