PageRenderTime 50ms CodeModel.GetById 21ms RepoModel.GetById 1ms app.codeStats 0ms

/bower_components/backbone.marionette/readme.md

https://github.com/robertd/benm
Markdown | 253 lines | 177 code | 76 blank | 0 comment | 0 complexity | 78ebc73b8750597041d31fa7508cda9e MD5 | raw file
  1. # Backbone.Marionette
  2. Make your Backbone.js apps dance!
  3. [![Build Status](https://secure.travis-ci.org/marionettejs/backbone.marionette.png?branch=master)](http://travis-ci.org/marionettejs/backbone.marionette)
  4. ## About Marionette
  5. Backbone.Marionette is a composite application library for Backbone.js that
  6. aims to simplify the construction of large scale JavaScript applications.
  7. It is a collection of common design and implementation patterns found in
  8. the applications that I (Derick Bailey) have been building with Backbone,
  9. and includes various pieces inspired by composite application architectures,
  10. such as Microsoft's "Prism" framework.
  11. ### App Architecture On Backbone's Building Blocks
  12. Backbone provides a great set of building blocks for our JavaScript
  13. applications. It gives us the core constructs that are needed to build
  14. small apps, organize jQuery DOM events, or create single page apps that
  15. support mobile devices and large scale enterprise needs. But Backbone is
  16. not a complete framework. It's a set of building blocks. It leaves
  17. much of the application design, architecture and scalability to the
  18. developer, including memory management, view management, and more.
  19. Marionette brings an application architecture to Backbone, along with
  20. built in view management and memory management. It's designed to be a
  21. lightweight and flexible library of tools that sits on top of Backbone,
  22. providing the framework for building a scalable application.
  23. Like Backbone itself, you're not required to use all of Marionette just
  24. because you want to use some of it. You can pick and choose which features
  25. you want to use. This allows you to work with other Backbone
  26. frameworks and plugins easily. It also means that you are not required
  27. to engage in an all-or-nothing migration to begin using Marionette.
  28. ### Key Benefits
  29. * Scalable: applications are built in modules, and with event-driven architecture
  30. * Sensible defaults: Underscore templates are used for view rendering
  31. * Easily modifiable: make it work with your application's specific needs
  32. * Reduce boilerplate for views, with specialized view types
  33. * Build on a modular architecture with an `Application` and modules that attach to it
  34. * Compose your application's visuals at runtime, with the `Region` and `Layout` objects
  35. * Nested views and layouts within visual regions
  36. * Built-in memory management and zombie-killing in views, regions and layouts
  37. * Event-driven architecture with `Backbone.Wreqr.EventAggregator`
  38. * Flexible, "as-needed" architecture allowing you to pick and choose what you need
  39. * And much, much more
  40. ## Source Code and Downloads
  41. You can download the latest builds directly from the "lib" folder above.
  42. For more information about the files in this folder, or to obtain an archive
  43. containing all Marionette dependencies (including Underscore, Backbone, etc.),
  44. please visit [the downloads section on the website](http://marionettejs.com#download).
  45. #### [MarionetteJS.com](http://marionettejs.com#download)
  46. ### Available Packages
  47. Marionette is unofficially available from various package
  48. management systems, such as RubyGems, Node Package Manager,
  49. Nuget, etc. These packages are maintained by the community
  50. and are not part of the core Backbone.Marionette code.
  51. ##### [Available Packages](https://github.com/marionettejs/backbone.marionette/wiki/Available-packages)
  52. ## Release Notes And Upgrade Guide
  53. **Changelog**: For change logs and release notes, see the
  54. [changelog](changelog.md) file.
  55. **Upgrade Guide**: Be sure to read [the upgrade guide](upgradeGuide.md)
  56. for information on upgrading to the latest version of Marionette.
  57. ## Documentation
  58. The primary documentation is split up into multiple files, due to the size
  59. of the overall documentation. You can find these files in the
  60. [/docs](docs) folder, or use the links below to get straight to the
  61. documentation for each piece of Marionette.
  62. ### Annotated Source Code
  63. In addition to this readme, I've commented the source code quite
  64. heavily and run it through Docco as part of my build process.
  65. This produces a nicely formatted, annotated source code as a documentation
  66. file.
  67. You can read the annotations for all the details of how Marionette works, and advice on which methods to override.
  68. ##### [View the annotated source code](http://marionettejs.com/docs/backbone.marionette.html)
  69. ### Marionette Configuration
  70. Marionette provides a few globally configurable settings, such as which
  71. DOM library to use (jQuery by default). You can find out more about which
  72. settings will change Marionette in the [configuration
  73. documentation](docs/marionette.configuration.md).
  74. ### Marionette's Pieces
  75. These are the strings that you can pull to make your puppet dance.
  76. If you're looking for an introduction and/or
  77. examples on how to get started, please visit [the Wiki](https://github.com/marionettejs/backbone.marionette/wiki).
  78. **Views**
  79. * [**Marionette.ItemView**](docs/marionette.itemview.md): A view that renders a single item
  80. * [**Marionette.CollectionView**](docs/marionette.collectionview.md): A view that iterates over a collection, and renders individual `ItemView` instances for each model
  81. * [**Marionette.CompositeView**](docs/marionette.compositeview.md): A collection view and item view, for rendering leaf-branch/composite model hierarchies
  82. * [**Marionette.Layout**](docs/marionette.layout.md): A view that renders a layout and creates region managers to manage areas within it
  83. * [**Marionette.View**](docs/marionette.view.md): The base View type that other Marionette views extend from (not intended to be used directly)
  84. **View Management**
  85. * [**Marionette.Region**](docs/marionette.region.md): Manage visual regions of your application, including display and removal of content
  86. * [**Marionette.RegionManager**](docs/marionette.regionmanager.md): Manage a group of related Regions
  87. * [**Marionette.Renderer**](docs/marionette.renderer.md): Render templates with or without data, in a consistent and common manner
  88. * [**Marionette.TemplateCache**](docs/marionette.templatecache.md): Cache templates that are stored in `<script>` blocks, for faster subsequent access
  89. * [&rarr;] [**Backbone.BabySitter**](https://github.com/marionettejs/backbone.babysitter): Manage child views for your Backbone.View (and other parents)
  90. **Application Infrastructure**
  91. * [**Marionette.Application**](docs/marionette.application.md): An application object that starts your app via initializers, and more
  92. * [**Marionette.Module**](docs/marionette.application.module.md): Create modules and sub-modules within the application
  93. * [**Marionette.Controller**](docs/marionette.controller.md): A general purpose object for controlling modules, routers, view, and implementing a mediator pattern
  94. **Object-Messaging Infrastructure**
  95. * [**Marionette.Commands**](docs/marionette.commands.md): An extension of Backbone.Wreqr.Commands, a simple command execution framework
  96. * [**Marionette.RequestResponse**](docs/marionette.requestresponse.md): An extension of Backbone.Wreqr.RequestResponse, a simple request/response framework
  97. * [&rarr;] [**Backbone.Wreqr.EventAggregator**](https://github.com/marionettejs/backbone.wreqr): An event aggregator, to facilitate pub/sub and event architecture. Part of a suite of messaging based patterns
  98. * [&rarr;] [**Backbone.Wreqr.Commands**](https://github.com/marionettejs/backbone.wreqr): A simple command execution system
  99. * [&rarr;] [**Backbone.Wreqr.RequestResponse**](https://github.com/marionettejs/backbone.wreqr): A simple request/response system
  100. **Other**
  101. * [**Marionette.AppRouter**](docs/marionette.approuter.md): Reduce your routers to nothing more than configuration
  102. * [**Marionette.Callbacks**](docs/marionette.callbacks.md): Manage a collection of callback methods, and execute them as needed
  103. * [**Marionette.functions**](docs/marionette.functions.md): A suite of helper functions and utilities for implementing common Marionette behavior in your objects
  104. **Deprecated Items**
  105. * [&rarr;] [**Backbone.EventBinder**](https://github.com/marionettejs/backbone.eventbinder): Deprecated w/ Backbone v0.9.9 and higher. An event binding manager for Backbone v0.9.2, to facilitate binding and unbinding of events
  106. ### The Wiki: Sample Apps, Tutorials, and Much More
  107. A wiki is an important aspect of a thriving community, as it provides
  108. a place for the community to contribute ideas, examples, answer
  109. frequently asked questions, and more. If you're looking for
  110. community-driven information, examples that go beyond the
  111. dry technical documentation, or want to contribute your own
  112. ideas and examples to the community, please see the wiki page.
  113. ##### [View The Marionette Wiki](https://github.com/marionettejs/backbone.marionette/wiki)
  114. ## Compatibility and Requirements
  115. MarionetteJS currently works with the following libraries:
  116. * [jQuery](http://jquery.com) v1.8+
  117. * [Underscore](http://underscorejs.org) v1.4.4+
  118. * [Backbone](http://backbonejs.org) v1.0 is preferred. v0.9.9 and v0.9.10 should work still
  119. * [Backbone.Wreqr](https://github.com/marionettejs/backbone.wreqr)
  120. * [Backbone.BabySitter](https://github.com/marionettejs/backbone.babysitter)
  121. Marionette has not been tested against any other versions of these
  122. libraries. You may or may not have success if you use a version other
  123. than what it listed here.
  124. While support for Zepto and EnderJS has been added, it is not officially
  125. tested against these libraries at this time.
  126. ### Deferred/Promise Objects
  127. Marionette makes use of jQuery's [Deferred](http://api.jquery.com/category/deferred-object/)
  128. objects and, as such, will need supported methods in replacement libraries.
  129. Zepto users can use @Mumakil's [Standalone-Deferred](https://github.com/Mumakil/Standalone-Deferred)
  130. or @sudhirj's [simply-deferred](https://github.com/sudhirj/simply-deferred).
  131. EnderJS users, please let us know of how you solve any compatibility issues.
  132. Marionette no longer relies on [Backbone.EventBinder](https://github.com/marionettejs/backbone.eventbinder).
  133. Backbone.Events, as of v0.9.9, supersedes this library with its
  134. `listenTo` and `stopListening` methods. See [the upgrade guide](upgradeGuide.md)
  135. for more information.
  136. ## Donations
  137. Marionette needs your support, but not everyone can offer assistance
  138. with code, bug submissions, and answering questions. If you're using
  139. Marionette and you're finding that it is saving you as much time and
  140. effort as I believe it does, then please consider financial support
  141. for the project.
  142. **Please see the footer of [MarionetteJS.com](http://marionettejs.com)
  143. for links to donate.**
  144. ## How to Contribute
  145. If you would like to contribute to Marionette's source code, please read
  146. the [guidelines for pull requests and contributions](CONTRIBUTING.md).
  147. Following these guidelines will help make your contributions easier to
  148. bring into the next release.
  149. ## Help is Just a Click Away
  150. ### #Marionette on FreeNode.net IRC
  151. Join the `#marionette` channel on [FreeNode.net](http://freenode.net) to ask questions and get help.
  152. ### [Google Group Mailing List](https://groups.google.com/forum/#!forum/backbone-marionette)
  153. Get announcements for new releases, share your projects and ideas that are
  154. using Marionette, and join in open-ended discussion that does not fit in
  155. to the Github issues list or StackOverflow Q&A.
  156. **For help with syntax, specific questions on how to implement a feature
  157. using Marionette, and other Q&A items, use StackOverflow.**
  158. ### [StackOverflow](http://stackoverflow.com/questions/tagged/backbone.marionette)
  159. Ask questions about using Marionette in specific scenarios, with
  160. specific features. For example, help with syntax, understanding how a feature works and
  161. how to override that feature to do what you need or how to organize the
  162. different view types to work best with your applications needs.
  163. Questions on StackOverflow often turn in to blog posts and wiki entries.
  164. ### [Github Issues](//github.com/marionettejs/backbone.marionette/issues)
  165. Report issues with Marionette, submit pull requests to fix problems, or to
  166. create summarized and documented feature requests (preferably with pull
  167. requests that implement the feature).
  168. **Please don't ask questions or seek help in the issues list.** There are
  169. other, better channels for seeking assistance, like StackOverflow and the
  170. Google Groups mailing list.
  171. ### [DerickBailey.LosTechies.com](http://derickbailey.lostechies.com)
  172. Lastly, I blog about Marionette on a regular basis, at my
  173. LosTechies.com blog.
  174. ## Legal Mumbo Jumbo (MIT License)
  175. Copyright (c) 2012 Derick Bailey; Muted Solutions, LLC
  176. Distributed under [MIT license](http://mutedsolutions.mit-license.org/).
  177. [![bitdeli analytics](https://d2weczhvl823v0.cloudfront.net/marionettejs/backbone.marionette/trend.png)](https://bitdeli.com/free "Bitdeli Badge")