Backbone.Marionette implementations #284

wants to merge 34 commits into


None yet

4 participants


per @addyosmani's request, this pull request is to include the Backbone.Marionette architecture examples. It includes both the non-AMD (simple) and non-AMD (Marionette modules) versions of TodoMVC that are referenced in the Backbone Fundamentals chapter on Marionette as I based the Marionette modules version off the non-module version.

The two different versions are in separate folders, sitting next to each other. If you wish to exclude the simple one, it should be easy enough to remove that one folder.

Let me know if anything else needs to be done for this, or if you want me to exclude that folder, etc.

jsoverson and others added some commits Aug 24, 2012
@jsoverson jsoverson committing backbone marionette reference app 4a049b5
@jsoverson jsoverson Merge branch 'master' of 83d113a
@jsoverson jsoverson removeCombined:false 1c358f5
@jsoverson jsoverson using built in index cfe8ab3
@jsoverson jsoverson making index default to built file, adding dev index for comparison 6cd7d71
@jsoverson jsoverson naming changes 645fad0
@jsoverson jsoverson build fa83d01
@jsoverson jsoverson cname for local b3d3585
@jsoverson jsoverson bringing filter upp to app scope 3ed88ab
@jsoverson jsoverson redundant variable assignment bfe4245
@jsoverson jsoverson forgot about styling filter anchors 143d125
@jsoverson jsoverson selection managed via app 0c5c4bb
@jsoverson jsoverson changing filter anchor selection trigger b65e95c
@jsoverson jsoverson build e01a24f
@jsoverson jsoverson jshintignore a9e35c4
@jsoverson jsoverson removing beautify e7329df
@jsoverson jsoverson clarity refactor 60dcb8b
@jsoverson jsoverson clarity refactor 1ae2706
@jsoverson jsoverson getting back in the habit of bindTo e051bdc
@jsoverson jsoverson build 3e81e5b
@jsoverson jsoverson analytics 0fa7cb6
@jsoverson jsoverson clearing out dev config e6f66f5
@jsoverson jsoverson old habits die hard 8b0413a
@jsoverson jsoverson build 47df8a5
@jsoverson jsoverson Merge branch 'master' of git:// 726803b
@jsoverson jsoverson refactoring to remove lines f8ee8af
@jsoverson jsoverson build 98e27f0
@jsoverson jsoverson backbone.marionette reference app 682b13c
@jsoverson jsoverson case idiocy 328cf6a
@jsoverson jsoverson thanks, osx 50066ee
@derickbailey derickbailey re-worked @jsoverson's Marionette implementation to use Marionette's …
@derickbailey derickbailey removed dup'd files 2ef2482
@derickbailey derickbailey fixed filtering 9feda9c
@derickbailey derickbailey changed the todo item view to be an ItemView 52db7d4
@sindresorhus sindresorhus commented on the diff Sep 23, 2012
@@ -1 +0,0 @@
sindresorhus Sep 23, 2012

dont remove this

@sindresorhus sindresorhus commented on the diff Sep 23, 2012
@@ -0,0 +1,97 @@
+<!doctype html>
+<html lang="en">
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+ <title>Marionette • TodoMVC</title>
+ <link rel="stylesheet" href="../../../assets/base.css">
+ <link rel="stylesheet" href="css/custom.css">
sindresorhus Sep 23, 2012

Should be called app.css

@sindresorhus sindresorhus commented on the diff Sep 23, 2012
@@ -0,0 +1,10 @@
+#todoapp.filter-active #todo-list .completed {
+ display:none
+#todoapp.filter-completed #todo-list .active {
+ display:none
+#main, #footer {
+ display : none;
sindresorhus Sep 23, 2012

Space between each rule. Space after :, not in front.

@sindresorhus sindresorhus commented on the diff Sep 23, 2012
+<section id="todoapp">
+ <header id="header"></header>
+ <section id="main"></section>
+ <footer id="footer"></footer>
+<footer id="info">
+ <p>Double-click to edit a todo</p>
+ <p>Created by <a href="">Jarrod Overson</a></p>
+<!-- vendor libraries -->
+<script src="../../../assets/base.js"></script>
+<script src="../../../assets/jquery.min.js"></script>
+<script src="js/lib/underscore.js"></script>
sindresorhus Sep 23, 2012

Use lodash in the asset folder

@sindresorhus sindresorhus commented on the diff Sep 23, 2012
+ </li>
+ <li>
+ <a href="#/completed">Completed</a>
+ </li>
+ </ul>
+ <button id="clear-completed">Clear completed</button>
+<script type="text/html" id="template-header">
+ <h1>todos</h1>
+ <input id="new-todo" placeholder="What needs to be done?" autofocus>
+<script type="text/html" id="template-todoItemView">
+ <div class="view">
+ <input class="toggle" type="checkbox" <% if (completed) { %>checked<% } %>>
sindresorhus Sep 23, 2012

<% completed ? 'checked' : '' %>

@sindresorhus sindresorhus commented on the diff Sep 23, 2012
+ <ul id="todo-list"></ul>
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', 'UA-22728809-1']);
+ _gaq.push(['_trackPageview']);
+ (function () {
+ var ga = document.createElement('script');
+ ga.type = 'text/javascript';
+ ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '';
+ var s = document.getElementsByTagName('script')[0];
+ s.parentNode.insertBefore(ga, s);
+ })();
TasteJS member

@sindresorhus I'd like us to merge this initial version into labs, but create a new issue linked to your comments so the app can be reworked to match specs at a later point. With the Thorax app already landed and a Chaplin one inbound soon, I'd love to get Marionette in there too.

@derickbailey could you revert the change to the CNAME file? If you think you'll be short on time I can do that when I merge. Cheers!

TasteJS member

@addyosmani @derickbailey Landed :)

I've created an issue with the remaining issues in #294

Thanks for this awesome contribution!

TasteJS member

Thanks Sindre and Derick!

Fwiw, I've decided to drop the non-Marionette module version of the application in favour of just using Derick's module variant. I've added links to both the app index and a readme which informs users where they can find the RequireJS and non-Marionette module version of the app.

I figure where possible we should be making it as simple as possible to compare labs apps and the variations are still available outside the project.

@gustaff-weldon gustaff-weldon pushed a commit to gustaff-weldon/todomvc that referenced this pull request Dec 23, 2013
@sindresorhus sindresorhus Backbone Marionette cleanup. Closes #284 885a8f9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment