News for hackers. Stuff that matters.
Re:JavaScript MVC frameworks: A Comparison of Marionette and... by avolcano on Monday April 08, 2013 @12:32PM (#5512719)
"That throwing away all of your models and views by default when a different route matches is actually the opposite of the approach you normally want to take -- at least if you're hoping to achieve a smooth app-like look and feel..."

This is actually a really important point. This is exactly how Ember's router works, as far as I can see from the documentation - when you transition, you lose all prior state. It's essentially trying to emulate traditional routing, which defeats the point.

Re:JavaScript MVC frameworks: A Comparison of Marionette and... by ghempton on Monday April 08, 2013 @12:50PM (#5512844)
This isn't even close to how Ember's router works. The whole point of controllers in Ember is to preserve client state (including between routes).
Re:JavaScript MVC frameworks: A Comparison of Marionette and... by avolcano on Monday April 08, 2013 @12:55PM (#5512868)
Apologies, this is what I get for not drinking coffee before commenting. You're completely right about keeping state when it comes to models.

What I don't see - and again, I have not dived very deeply into the router; I'm going off the documentation here - is how to keep views during the transition. In my app, the router has to re-render all views when changing between routes. This isn't a huge deal, as it's a very lightweight application. Still, Backbone offers much more flexibility when it comes to views.

Re:JavaScript MVC frameworks: A Comparison of Marionette and... by ghempton on Monday April 08, 2013 @08:36PM (#5515712)
Views are meant to be transient and just a step above the lifecycle of the html elements themselves.