Skip to content

Instantly share code, notes, and snippets.

@cmcculloh
Last active June 7, 2018 17:09
Show Gist options
  • Save cmcculloh/35e6c6c7408cf8d45899 to your computer and use it in GitHub Desktop.
Save cmcculloh/35e6c6c7408cf8d45899 to your computer and use it in GitHub Desktop.

Revisions

  1. cmcculloh revised this gist Jun 2, 2015. 1 changed file with 15 additions and 15 deletions.
    30 changes: 15 additions & 15 deletions marionette-cheat-sheet.md
    Original file line number Diff line number Diff line change
    @@ -1,46 +1,46 @@
    # Base Objects
    ## Base Objects
    Basic building blocks (you won't often use these).

    ## [REGION](http://marionettejs.com/annotated-src/backbone.marionette.html#section-155)
    ### [REGION](http://marionettejs.com/annotated-src/backbone.marionette.html#section-155)
    Manage the visual regions of your composite application. [Composite JS Apps: Regions And Region Managers](http://lostechies.com/derickbailey/2011/12/12/composite-js-apps-regions-and-region-managers/)

    ## [REGION MANAGER](http://marionettejs.com/annotated-src/backbone.marionette.html#section-183)
    ### [REGION MANAGER](http://marionettejs.com/annotated-src/backbone.marionette.html#section-183)
    Manage one or more related `Marionette.Region` objects.

    ## [VIEW](http://marionettejs.com/annotated-src/backbone.marionette.html#section-212)
    ### [VIEW](http://marionettejs.com/annotated-src/backbone.marionette.html#section-212)
    The core view class that other Marionette views extend from.

    ## [BEHAVIOR](http://marionettejs.com/annotated-src/backbone.marionette.html#section-380)
    ### [BEHAVIOR](http://marionettejs.com/annotated-src/backbone.marionette.html#section-380)
    A Behavior is an isolated set of DOM/user interactions that can be mixed into any View. Behaviors allow you to blackbox View specific interactions into portable logical chunks, keeping your views simple and your code DRY.

    # View Objects
    ## View Objects
    The things you actually use often.

    ## [ITEM VIEW](http://marionettejs.com/annotated-src/backbone.marionette.html#section-259)
    ### [ITEM VIEW](http://marionettejs.com/annotated-src/backbone.marionette.html#section-259)
    A single item view implementation that contains code for rendering with underscore.js templates, serializing the view’s model or collection, and calling several methods on extended views, such as onRender.

    ## [COLLECTION VIEW](http://marionettejs.com/annotated-src/backbone.marionette.html#section-271)
    ### [COLLECTION VIEW](http://marionettejs.com/annotated-src/backbone.marionette.html#section-271)
    A view that iterates over a `Backbone.Collection` and renders an individual child view for each model.

    ## [COMPOSITE VIEW](http://marionettejs.com/annotated-src/backbone.marionette.html#section-340)
    ### [COMPOSITE VIEW](http://marionettejs.com/annotated-src/backbone.marionette.html#section-340)
    Used for rendering a branch-leaf, hierarchical structure. Extends directly from `CollectionView` and also renders and a child view as `modelView`, for the top leaf

    ## [LAYOUT VIEW](http://marionettejs.com/annotated-src/backbone.marionette.html#section-357)
    ### [LAYOUT VIEW](http://marionettejs.com/annotated-src/backbone.marionette.html#section-357)
    Used for managing application layoutViews, nested layoutViews and multiple regions within an application or sub-application.

    A specialized view class that renders an area of HTML and thenattaches Region instances to the specified regions. Used for composite view management and sub-application areas.

    ## [BEHAVIORS](http://marionettejs.com/annotated-src/backbone.marionette.html#section-387)
    ### [BEHAVIORS](http://marionettejs.com/annotated-src/backbone.marionette.html#section-387)
    Behaviors is a utility class that takes care of gluing your behavior instances to their given View. The most important part of this class is that you MUST override the class level behaviorsLookup method for things to work properly.

    # App Objects
    ## App Objects
    These are the shims and glues that bind your app into a cohesive whole

    ## [APPLICATION](http://marionettejs.com/annotated-src/backbone.marionette.html#section-414)
    ### [APPLICATION](http://marionettejs.com/annotated-src/backbone.marionette.html#section-414)
    Contain and manage the composite application as a whole. Stores and starts up Region objects, includes an event aggregator as app.vent

    ## [CONTROLLER](http://marionettejs.com/annotated-src/backbone.marionette.html#section-134)
    ### [CONTROLLER](http://marionettejs.com/annotated-src/backbone.marionette.html#section-134)
    A multi-purpose object to use as a controller for modules and routers, and as a mediator for workflow and coordination of other objects, views, and more.

    ## [APP ROUTER](http://marionettejs.com/annotated-src/backbone.marionette.html#section-405)
    ### [APP ROUTER](http://marionettejs.com/annotated-src/backbone.marionette.html#section-405)
    Reduce the boilerplate code of handling route events and then calling a single method on another object. Have your routers configured to call the method on your object, directly. Configure an AppRouter with appRoutes. App routers can only take one controller object. It is recommended that you divide your controller objects in to smaller pieces of related functionality and have multiple routers / controllers, instead of just one giant router and controller. You can also add standard routes to an AppRouter.
  2. cmcculloh revised this gist Jun 2, 2015. 1 changed file with 29 additions and 6 deletions.
    35 changes: 29 additions & 6 deletions marionette-cheat-sheet.md
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,5 @@
    # Base Objects
    Basic building blocks used by the things _you_ actually use.

    ## [CONTROLLER](http://marionettejs.com/annotated-src/backbone.marionette.html#section-134)
    A multi-purpose object to use as a controller for modules and routers, and as a mediator for workflow and coordination of other objects, views, and more.
    Basic building blocks (you won't often use these).

    ## [REGION](http://marionettejs.com/annotated-src/backbone.marionette.html#section-155)
    Manage the visual regions of your composite application. [Composite JS Apps: Regions And Region Managers](http://lostechies.com/derickbailey/2011/12/12/composite-js-apps-regions-and-region-managers/)
    @@ -13,11 +10,37 @@ Manage one or more related `Marionette.Region` objects.
    ## [VIEW](http://marionettejs.com/annotated-src/backbone.marionette.html#section-212)
    The core view class that other Marionette views extend from.

    ## [BEHAVIOR](http://marionettejs.com/annotated-src/backbone.marionette.html#section-380)
    A Behavior is an isolated set of DOM/user interactions that can be mixed into any View. Behaviors allow you to blackbox View specific interactions into portable logical chunks, keeping your views simple and your code DRY.

    # View Objects
    These be the goods.
    The things you actually use often.

    ## [ITEM VIEW](http://marionettejs.com/annotated-src/backbone.marionette.html#section-259)
    A single item view implementation that contains code for rendering with underscore.js templates, serializing the view’s model or collection, and calling several methods on extended views, such as onRender.

    ## [COLLECTION VIEW](http://marionettejs.com/annotated-src/backbone.marionette.html#section-271)
    A view that iterates over a `Backbone.Collection` and renders an individual child view for each model.
    A view that iterates over a `Backbone.Collection` and renders an individual child view for each model.

    ## [COMPOSITE VIEW](http://marionettejs.com/annotated-src/backbone.marionette.html#section-340)
    Used for rendering a branch-leaf, hierarchical structure. Extends directly from `CollectionView` and also renders and a child view as `modelView`, for the top leaf

    ## [LAYOUT VIEW](http://marionettejs.com/annotated-src/backbone.marionette.html#section-357)
    Used for managing application layoutViews, nested layoutViews and multiple regions within an application or sub-application.

    A specialized view class that renders an area of HTML and thenattaches Region instances to the specified regions. Used for composite view management and sub-application areas.

    ## [BEHAVIORS](http://marionettejs.com/annotated-src/backbone.marionette.html#section-387)
    Behaviors is a utility class that takes care of gluing your behavior instances to their given View. The most important part of this class is that you MUST override the class level behaviorsLookup method for things to work properly.

    # App Objects
    These are the shims and glues that bind your app into a cohesive whole

    ## [APPLICATION](http://marionettejs.com/annotated-src/backbone.marionette.html#section-414)
    Contain and manage the composite application as a whole. Stores and starts up Region objects, includes an event aggregator as app.vent

    ## [CONTROLLER](http://marionettejs.com/annotated-src/backbone.marionette.html#section-134)
    A multi-purpose object to use as a controller for modules and routers, and as a mediator for workflow and coordination of other objects, views, and more.

    ## [APP ROUTER](http://marionettejs.com/annotated-src/backbone.marionette.html#section-405)
    Reduce the boilerplate code of handling route events and then calling a single method on another object. Have your routers configured to call the method on your object, directly. Configure an AppRouter with appRoutes. App routers can only take one controller object. It is recommended that you divide your controller objects in to smaller pieces of related functionality and have multiple routers / controllers, instead of just one giant router and controller. You can also add standard routes to an AppRouter.
  3. cmcculloh revised this gist Jun 1, 2015. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions marionette-cheat-sheet.md
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,9 @@
    # [CONTROLLER](http://marionettejs.com/annotated-src/backbone.marionette.html#section-134)
    A multi-purpose object to use as a controller for modules and routers, and as a mediator for workflow and coordination of other objects, views, and more.

    # Base Objects
    Basic building blocks used by the things _you_ actually use.

    ## [CONTROLLER](http://marionettejs.com/annotated-src/backbone.marionette.html#section-134)
    A multi-purpose object to use as a controller for modules and routers, and as a mediator for workflow and coordination of other objects, views, and more.

    ## [REGION](http://marionettejs.com/annotated-src/backbone.marionette.html#section-155)
    Manage the visual regions of your composite application. [Composite JS Apps: Regions And Region Managers](http://lostechies.com/derickbailey/2011/12/12/composite-js-apps-regions-and-region-managers/)

  4. cmcculloh created this gist Jun 1, 2015.
    23 changes: 23 additions & 0 deletions marionette-cheat-sheet.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    # [CONTROLLER](http://marionettejs.com/annotated-src/backbone.marionette.html#section-134)
    A multi-purpose object to use as a controller for modules and routers, and as a mediator for workflow and coordination of other objects, views, and more.

    # Base Objects
    Basic building blocks used by the things _you_ actually use.

    ## [REGION](http://marionettejs.com/annotated-src/backbone.marionette.html#section-155)
    Manage the visual regions of your composite application. [Composite JS Apps: Regions And Region Managers](http://lostechies.com/derickbailey/2011/12/12/composite-js-apps-regions-and-region-managers/)

    ## [REGION MANAGER](http://marionettejs.com/annotated-src/backbone.marionette.html#section-183)
    Manage one or more related `Marionette.Region` objects.

    ## [VIEW](http://marionettejs.com/annotated-src/backbone.marionette.html#section-212)
    The core view class that other Marionette views extend from.

    # View Objects
    These be the goods.

    ## [ITEM VIEW](http://marionettejs.com/annotated-src/backbone.marionette.html#section-259)
    A single item view implementation that contains code for rendering with underscore.js templates, serializing the view’s model or collection, and calling several methods on extended views, such as onRender.

    ## [COLLECTION VIEW](http://marionettejs.com/annotated-src/backbone.marionette.html#section-271)
    A view that iterates over a `Backbone.Collection` and renders an individual child view for each model.