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

0
votes
1answer
65 views

MVVM model vs viewmodel

I am trying to wrap my head around MVVM and "models should not have behaviour". If my getter depends on an environment variable, should it be in the model or viewmodel? Does it make a difference if ...
1
vote
0answers
30 views

Promise in Web MVVM

In MVVM (or Presentation Model), my (web) view listens to a CLICK event and calls a function of the Presentation Model to ask for the result. To clarify, the presentation model lives browser-side. ...
0
votes
1answer
39 views

MVVM: Strictness of Views Referencing Models

A coworker and I have differing views on how strictly we should adhere to the MVVM concepts. I try to follow it as closely as possible where he takes shortcuts almost every chance he gets. One of my ...
0
votes
0answers
18 views

SRP in MVVM's ViewModel

I have a question about Single Responsibility Principle in MVVM. I'd like to create a group of views for Warehouse Mgmt. Software. They would be connected to properties from my document which should ...
4
votes
2answers
85 views

Returning a slimmed down domain entity from your view model

I'm wondering how to handle a ViewModel in the traditional sense, which includes both properties and methods, and another "view model" which is simply just the properties -- perhaps the ViewModel ...
4
votes
2answers
215 views

How to choose NOT to use a framework (Caliburn.Micro, etc.) in a given MVVM application?

I have once started a MVVM/WPF project, which was eventually built and deployed, and for that I studied a lot of the Caliburn.Micro MVVM Framework. The fact is: I ended up not using Caliburn.Micro for ...
4
votes
1answer
95 views

Where to create a file in WPF/MVVM

I'm building a WPF/MVVM application that takes input from the user and generates an output document which it saves in a temporary folder and opens for display in the native application (e.g. MS Word). ...
2
votes
1answer
102 views

MVVM: Should the VM be a value type?

I have been recently strongly influenced by two lectures: Gary Bernhardt's "Boundaries" (https://www.destroyallsoftware.com/talks/boundaries) and Andy Matuschak's "Controlling Complexity" ...
1
vote
1answer
77 views

Should MVVM models contain complex objects

Let us say that I have a Book class, a book can have an object of another class like an Author or other complex objects like a list of Genres. My question is, in an MVVM model should I make the ...
1
vote
0answers
52 views

Should my combobox for boolean values be in code-behind or in my viewmodel?

I ran into a disagreement with a coworker of mine on the implementation of representing a Boolean value in a ComboBox using Xaml and MVVM. Currently, my viewmodel is very simple. I have a bool? which ...
0
votes
2answers
111 views

When developing an MVC framework, how should I be using Knockout.js?

I'm currently using the Laravel PHP MVC Framework to develop a web application; and it's going along quite nicely. I'm very comfortable with the expectations of the framework and how my application ...
6
votes
1answer
267 views

Design patterns for navigation between pages on mobile platforms

I'd like to ask you about the best way of handling navigation between pages/activities on mobile platforms. To be more specific - about handling state in more complex apps, about handling 'Back' ...
0
votes
0answers
104 views

Is there a better way to retrieve a ViewModel container starting from a Model?

I'm trying to figure out a more efficient method. To start, I have a viewmodel wrapping around a model. The model itself collectively becomes a tree. We'll call each model a Fragment: public class ...
3
votes
1answer
177 views

What does “Stateful” means in Stateful ViewModel in MVVM

I was reading about some XAML patterns, and there was the Stateful ViewModel, according to what I read it has nothing different than what we as just the "ViewModel". Here's a description for example ...
2
votes
1answer
138 views

Where to keep persistent services in MVVM architecture?

In an MVVM application I need to use some services that are persistent, e.g. network services like P2P and WCF where the main "engine" or server endpoint must remain up and running during the lifetime ...
2
votes
2answers
237 views

Designing entities that should be mutable through the GUI but protected from programmer error

I have a set of entities, for now represented by very simple classes (further simplified for this example): public class Item { public string Name { get; private set; } public double ...
0
votes
1answer
65 views

Handling Destructors in MVVM

I'm making a Model View View-Model (MVVM) application using Delphi XE6. Since I'm using Pascal rather than C#, I need to manage destruction myself. I'm not sure how to handle form destruction. My ...
1
vote
0answers
100 views

Single page application automatically download dependent HTML

I'm currently developing an application using ASP.NET MVC5 and Knockout. For now, the typical architecture is this: FooController.cs: public ActionResult GetFoos(){ //... var model = // ...
2
votes
0answers
146 views

Hierarchical ViewModels and tracking IsDirty/PropertyChanged events

I have a set of ViewModels depicted like in the below picture. And, I have a couple of commands AcceptCommand, CancelCommand in the Top Level View Model that are bound to Apply, Cancel buttons ...
1
vote
0answers
626 views

Should UserControl's be Views in an XAML MVVM application (WPF or Store app)?

I am about to use Caliburn.Micro for a new XAML Store app (not sure what to call it nowadays - does not appear to be called a "Windows Store app" any longer). The documentation (see Simple Navigation ...
2
votes
1answer
2k views

Strongly typed views, ViewModel and MVC

I'm learning MVC and the book I'm using favors strongly-typed views. Some of these concepts are new to me and I'm trying to better understand the design philosophy. Strongly typed views typically ...
2
votes
1answer
415 views

Usage of MVVM in iOS

I'm an iOS developer and I'm guilty of having Massive View Controllers in my projects so I've been searching for a better way to structure my projects and came across the MVVM (Model-View-ViewModel) ...
0
votes
0answers
153 views

Should you register other services in ViewModelLocator in MVVM light?

I'm new to MVVM Light and SimpleIoC. My question is, should all the registration of view models and other services be done in the ViewModelLocator class? Or should ViewModelLocator be used only for ...
14
votes
4answers
668 views

Proper Model-View-_____ design

I've been reading up about Model View Controller, Model View Presenter, Model View ViewModel, and so on, and generally, the underlying concept seems pretty simple to understand: keep the pretty ...
0
votes
0answers
311 views

Nhibernate operations on a separate thread for a desktop MVVM application

I am developing a single user .net desktop application that lists numerous (over 2000) contacts sorted by an algorithm. I use NHibernate and did consider a session per use case (or conversation as it ...
0
votes
0answers
146 views

Correct Command Management with IoC and MVVM

I have developed an MVVM framework that can be inherited by a project and used to back a new application. This application can then have plugins (like a CodeEditor for example) which automatically are ...
0
votes
1answer
241 views

Does this diagram give a good representation of the MVVM pattern?

I am having a really hard time understanding the basic structure of the Model, View, View Model pattern. I have honestly been pretty ignorant of design pattern conventions until recently. My formal ...
5
votes
1answer
795 views

Wpf: Event driven vs MVVM design pattern

I'm a beginning coder and I've been working on a WPF app for several months now and struggled to implement anything in MVVM due to time constraits to learn so I coded my program the only way to knew ...
5
votes
2answers
560 views

Why should ViewModel route actions to Controller when using the MVCVM pattern?

When reading examples across the Internet (including the MSDN reference) I have found that code examples are all doing the following type of thing: public class FooViewModel : BaseViewModel { ...
1
vote
1answer
172 views

Should my internal MVC/MVVM application use Web Services for Persistence?

Just talking about internal applications or intranet web apps... At some companies I've seen their business-logic piece (Model in MVC/VM in MVVM) on one (or both) sides of a Web Service. And on the ...
1
vote
1answer
2k views

Reactive programming vs MVVM pattern for managing GUI updates

Reactive programming and MVVM are two approaches that can address the problem of separating the domain layer from the UI. MVVM does this by defining a viewmodel, which is a data structure mapped to ...
7
votes
1answer
3k views

Best practices for implementing MVVM and MVC in delphi Pascal

I'm a Delphi pascal programmer, I use the latest Embarcadero delphi XE, and I would like to take advantage of design patterns such as Model view controller and model view view-model. However, there ...
2
votes
3answers
154 views

How to maintain view-related information in MVVM and may I store this in the model?

I have an ongoing discussion with some colleagues on how to manage the views to our model. We've got a model which may be represented by many views. Let's say we've got some data that is stored in an ...
2
votes
1answer
74 views

Queue of jobs in a different states and with different services around

I need to design a 'queue' of jobs (in a a very much UI oriented application) that can be run by a user and I need some other thoughts to pick optimal approach from ground up. My jobs can be in a ...
0
votes
0answers
266 views

Encapsulate multiple properties into a single class to use as a custom DependencyProperty

My application is a WPF project implemented in C# .NET (4.5) using an MVVM architecture with no code-behind in the View. In order to eliminate the coupling between the View and the ViewModel I'm ...
2
votes
0answers
140 views

Is it improper to have an application wide source for dropdown binding

The WPF Combobox needs to bind a collection to it's ItemsSource and something to bind the selected item or value to. Until now, I've included both the collection and the selected value properties that ...
2
votes
0answers
725 views

What's the best way to expose a Model object in a ViewModel?

In a WPF MVVM application, I exposed my model object into my viewModel by creating an instance of Model class (which cause dependency) into ViewModel. Instead of creating separate VM properties, I ...
2
votes
0answers
553 views

Best Practice Method for Including Images in a DataGrid using MVVM

All, I have a WPF DataGrid. This DataGrid shows files ready for compilation and should also show the progress of my compiler as it compiles the files. The format of the DataGrid is Image|File Path ...
3
votes
0answers
405 views

MVVM - Master Detail interaction scenarios - Implementing when MasterVm has partial data, and Detail has to pull whole entity

I primarily work with .Net WPF MVVM applications. I've used several frameworks, MVVM Light, Prism, etc, and I've been able to break the implementation of CRUD MVVM into three scenarios. Scenario 1: ...
3
votes
2answers
288 views

What is better to return from the DataService: Status or Exceptions?

I have a MVVM app with DataServices (using mvvmlight). Right now, i'm using it like var answer = await myDataService.PullList(categoryId); if (answer.Status == Ok) ...
1
vote
0answers
104 views

How to use data shaped by the UI from the ViewModel while keeping concerns separated?

I'm coming from a winforms background and trying to get ahold of MVVM and XAML. Right now I'm wondering how I can take advantage from a data-shaping control (either native or provided by a third ...
1
vote
1answer
447 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 ...
0
votes
3answers
470 views

What is the main goal of MVVM pattern? [closed]

Could you tell me what is the goal of the MVVM pattern? What are the arguments or the reasons I can give to a team and product owner to respect and develop according to this pattern? I would like a ...
1
vote
1answer
427 views

How to create a WinForms project that is “WPF-ready”

I'm a C# developer who hasn't had the privilege of learning WPF yet. However, I recently initiated the architecture phase of a new project which I expect will eventually employ WPF (probably; although ...
1
vote
4answers
330 views

In MV* pattern where does non-business model goes?

I am passing Menu items to View from ViewModel. My menu definition is a model with properties title, image, hasChildren and isEnabled. But this model is meant for UI unlike business domain models like ...
0
votes
1answer
4k views

Where do put INotifyPropertyChanged Interface in Model or ViewModel [closed]

I am new to MVVM pattern I have a window which has 3 text boxes namely Name,Address,Description ,a save button and a listview which displays the above fields Name,Address,Description respectively ...
0
votes
2answers
1k views

Model and ViewModel for View

I am new to the MVVM pattern. I have a window which has 3 text boxes (Name, Address, Description), a save button, and a listview which displays the above fields. When the save button is clicked I want ...
1
vote
2answers
370 views

I know the language but still can't code like other peers [closed]

I have moved to a new job and code base (been doing C#, .NET, Windows Forms, etc. for last four years) and I have been on this for three months until today. During these three months I caught up with ...
1
vote
1answer
297 views

Where does non-MVVM code belong in an MVVM app?

By non-MVVM code, I mean things like highly generalized components, like one with common extension methods for CLR types, and other 'homeless' helper classes etc? I have a Core project that most ...
2
votes
3answers
1k views

Should IoC container be part of portable library?

I am seeing the benefits of Portable Class Libraries for centralizing Models and ViewModels to a single code-base. Where should dependency injection management (IoC container) take place, though? My ...