Skip to main content

Timeline for MVVM and service pattern

Current License: CC BY-SA 3.0

11 events
when toggle format what by license comment
Nov 4, 2013 at 23:15 comment added Amy Blankenship Well, certainly it must have the ability to request that a View be made somewhere. But to make it itself? Not in my world :). But then again, in the world I live in, we call VM "Presentation Model."
Nov 4, 2013 at 21:15 comment added Aaronaught @AmyBlankenship: Are you suggesting that view models shouldn't create other view models? That's a tough pill to swallow. I can understand saying that view models shouldn't use new to create other view models, but think of something as simple as an MDI application where clicking on a "new document" button or menu will add a new tab or open a new window. The shell/conductor must be able to create new instances of something, even if it's hidden behind one or a few layers of indirection.
Nov 4, 2013 at 19:43 answer added Michael Brown timeline score: 2
Nov 4, 2013 at 19:34 comment added Amy Blankenship "Will sometimes" and "should" are two different animals ;)
Nov 4, 2013 at 19:20 vote accept alfa-alfa
Nov 4, 2013 at 18:52 comment added Aaronaught @AmyBlankenship: View Models shouldn't have to (or even necessarily be able to) create themselves, but inevitably will sometimes be responsible for creating other view models. An IoC container with automatic-factory support is a huge help here.
Nov 4, 2013 at 18:35 answer added Aaronaught timeline score: 26
Nov 4, 2013 at 18:29 comment added Amy Blankenship I think the "right" way to do it is to create a separate layer that calls the services and does whatever casting is necessary to create the ViewModel. Your ViewModels should not be responsible for creating themselves.
Nov 4, 2013 at 15:38 review First posts
Nov 4, 2013 at 15:58
Nov 4, 2013 at 15:24 answer added Euphoric timeline score: 0
Nov 4, 2013 at 15:21 history asked alfa-alfa CC BY-SA 3.0