@ttdonovan @sly7_7 My plan all along has been to blog about this example and explain it in detail. I can see how some of the design decisions might seem a bit confusing or unconventional.
For instance, it might seem a bit more conventional to provide unique routes for every action, such as showing vs editing a contact. However, I wanted to illustrate in-place editing for the ContactRoute, which shows the possibility of managing some state in the controller (via the isEditing flag). I don’t think that routes should manage every bit of application state. For instance, I think that transactions belong in the controller layer, and not in routes. In my example, when creating or editing contacts, you can also edit associated phone numbers. These need to be managed by the controller and added to the same transaction as the contacts themselves.
I think routes should be used to set up controllers with a context, and should convey activation / deactivation to controllers. I think it’s inappropriate to treat routes as catch-all event handlers, and that events should be handled at the layer that is most appropriate: be it view, controller, or route (or parent route).
Anyway, my example is far from perfect and does need further cleanup. There are areas of repetition that could be tightened up and the tests need filling out. I’ll try to get to this soon so I can finally get back to blogging. Criticism and PRs welcome