Skip to content

Instantly share code, notes, and snippets.

@isochronous
isochronous / Marionette.SubAppRouter.js
Created December 1, 2012 21:46
Backbone.SubRoute functionality for Marionette.AppRouter
// This is heavily based on Backbone.SubRoute (https://github.com/ModelN/backbone.subroute) by Dave Cadwallader, who
// helped me out in this discussion thread:
// https://groups.google.com/forum/?fromgroups=#!topic/backbone-marionette/KTw7USoA6Gs
;define([
'underscore',
'marionette'
],
/**
* A module that defines and adds Marionette.SubAppRouter to the Marionette object
@isochronous
isochronous / Application.root.js
Last active November 17, 2018 10:13
Root app for drop-in multi-app Marionette framework using requireJS and the subapprouter it works with
define([
"underscore",
"backbone",
"marionette",
"vent"
],
/**
* Creates the primary `Marionette.Application` object that runs the admin framework. Provides a central point
* from which all other sub-applications are started, shown, hidden, and stopped.
@ShayDavidson
ShayDavidson / isc-marionette-0_index.md
Last active February 20, 2017 08:55
eBay Israel Social Center's Backbone Marionette Extensions.

eBay Israel Social Center's Marionette Extensions

This document is a summary of the convention we harnesed in the eBay Israel Social Center (ISC) for client-side development. It is built upon Backbone.Marionette and relies heavily on its Application, Module, Controller and AppRouter objects. We extended these classes with syntactic sugar, bootstrapping and other features we needed in order to simplify the way we work.

NOTE: The extensions were built up until v1.0.0-rc2 and do not include (yet) the Backbone update changes (we are still using EventBinders for example).

We used Marionette with our extensions to build the StubHub 'Go With Friends' service. The service allows users to arrange group events, invite friends, see who's in, and decide on the best tickets for everyone.

Some examples:

@afgomez
afgomez / validate_spanish_id.js
Last active May 5, 2024 12:31
Spanish DNI, CIF, NIE validator
/**
* ValidateSpanishID. Returns the type of document and checks its validity.
*
* Usage:
* ValidateSpanishID( str );
*
* > ValidateSpanishID( '12345678Z' );
* // { type: 'dni', valid: true }
*
* > ValidateSpanishID( 'B83375575' );