Is MVVM pattern broken?

What do you think, have I broken the MVVM-Pattern?

No. The view model have no dependency upon the view, it only knows about an interface that you could easily mock in your unit tests. So this doesn’t really break the pattern as long as “View” is just an abstraction of something.

For type-safety reasons you should probably consider changing the type of the parameter from object to a strongly-typed interface type though.

Leave a Comment