The Model View ViewModel (MVVM) is an architectural pattern used in software engineering that originated from Microsoft as a specialization of the presentation model design pattern introduced by Martin Fowler.

learn more… | top users | synonyms

2
votes
2answers
152 views

When using MVVM, should you create new viewmodels, or swap out the models?

Say I have a viewmodel like this: public class EmployeeViewModel { private EmployeeModel _model; public Color BackgroundColor { get; set; } public Name { get { return ...
4
votes
1answer
470 views

Should MVVM ViewModel inject an HTML template for default view?

I'm working on web application design that includes Knockout.js and have an overall MVVM question: Does it make sense for the ViewModel to automatically inject a default HTML template (pulled from ...
2
votes
1answer
183 views

Help with complex MVVM (multiple views)

I need help creating view models for the following scenario: Deep, hierarchical data Multiple views for the same set of data Each view is a single, dynamically-changing view, based on the active ...
1
vote
1answer
247 views

Syncing objects from code with the view in WPF

I've been reading some into it, but I am time pressed, so I would require a simple solution now and I promise to read up on it later. I come from a winforms c# background, and have lately been working ...
0
votes
1answer
45 views

Again MVVM / MVP story , passing interface of a view to its view model why it is bad?

I have used WPF for an Enterprise solution (hundreds views heavily used Data inputs and validation) in MVP pattern (it was a clean solution usually small amount of code behind forms and main code was ...
4
votes
0answers
143 views

Loose Coupling Presenter to View in MVP

We work in a Java shop here and our web application uses an implementation of the MVP architectural pattern. Our manager comes from a .NET world, where he has been exposed to the MVVM design pattern. ...
3
votes
0answers
235 views

What is the good way of sharing specific data between ViewModels

We have IAppContext which is injected into ViewModel. This service contains shared data: global filters and other application wide properties. But there are cases when data is very specific. For ...
2
votes
0answers
104 views

Sub routing in a SPA site

I have a SPA site that I'm working on, I have a requirement that you can have subroutes for a page view model. Im currently using this 'pattern' for the site MyApp.FooViewModel = MyApp.define({ ...
0
votes
0answers
17 views

Create a subclass of model for class-based viewmodel creation

Is it justified to create a model subclass just for creation of appropriate viewmodel based on this class. Am I missing something? How to pass data about model into viewmodel?
0
votes
0answers
58 views

Inputs and outputs to a method mixed in the UI

I am designing the front end of an WPF application using MVVM where basically all we are doing (for now) is calling a method with some inputs and displaying the outputs. There are two types of ...
0
votes
0answers
114 views

Should you implement a repository pattern with an MVVM javascript framework?

When coding a MVVM pattern I use Dependency Injection (DI) and try and code against interfaces. One of the common patterns is a Repository pattern, so I can swap my data storage provider. If I'm ...
0
votes
0answers
41 views

MVVM / API design: who is responsible for what in the example inside?

Note: this question is about the MVVM pattern in general and not related to any specific MVVM framework. I am wondering what the best design approach for the requirements below is (hypothetical ...
0
votes
0answers
185 views

wpf and mvvm printing report startegy

I am developing a WPF application and I need some clarity on printing in WPF and MVVM (I am using MVVM-Light). I want to create standard looking reports for my application and I don't want to have to ...