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
0answers
30 views

Multi-screen MVVM architecture/design - Should my “screen” ViewModels contain sub-ViewModels?

I'm getting beyond a simple MVVM program now, and I'd just like to sense check my current architecture and makes sure I'm going down the right path here. Everything is structured around screens, and ...
3
votes
2answers
106 views

Is using getters in XAML view-models a bad thing?

I've recently had an argument with a colleague about using getters (without setters) in a view-model classes used by XAML. Example: public string FullName { get { return $"{FirstName} ...
3
votes
1answer
91 views

Mapping Domain models to ViewModel

I have an Asp.net MVC5 application structured like this: Core Domain project Infrastructure DAL project Utilities UI UI project (contains ViewModel at the moment, will probably put that ...
0
votes
1answer
78 views

Create an item in two different table with auto-increment C# SQL [closed]

First of all, let me apologize because I know my question will be very confusing since my English is pretty bad. I am working on a project for a company, mainly create a system to take care for ...
3
votes
1answer
129 views

Passing MVVM objects to other classes [closed]

So I'm using C# WPF and binding to a Model View to display states. The data that needs to be displayed is spread across a couple different classes. For instance I have a class that reads out digital ...
1
vote
1answer
200 views

Best practice to extend Model in View Model

I'm facing an issue where I have a Model which I want to implement a GUI for. As I'm exploring MVVM and WPF I will of course use a View Model between the View and Model. I will also have a need to add ...
0
votes
1answer
182 views

Switch complex WinForms app to WPF MVVM

This question is connected with my older question C# Application GUI design dependent on configuration. I have built quite big WinForms application working in industry for a few years. It ...
1
vote
0answers
121 views

MVVM viewmodel to view correlation in adaptive UI

I am making an mvvm application for the uwp platform and I am looking for advice on the following matter. Take for example the windows 10 e-mail application, which when full screen displays both the ...
0
votes
0answers
52 views

How to organize common application state?

I'm creating a Java application with JavaFX, using the MVVM pattern to structure the presentation layer (don't get too hung up on the MVVM part, I think this applies to other MV-X patterns as well). ...
1
vote
2answers
484 views

C# .NET MVVM software architecture and naming conventions

I am currently working on a software using C# .NET and WPF with the MVVM pattern. Though the software is almost done, I have been discussing our architecture for a long time and I would like to get ...
1
vote
1answer
149 views

Modular Filter Architecture for WPF

I am creating a little stock-management tool for private use. I have different views, which need similar but different filters. As an example i have a "current stock" list where i can filter for ...
1
vote
1answer
71 views

What are potential problems when write business logic code in GUI as MVVM pattern

Currently, I'm implementing MVVM pattern for a WPF application but not 100% no code behind, sometimes I put some business logic code into GUI and so what are potential problems for this? Thanks
2
votes
1answer
88 views

Who is responsible for setting color in MVVM?

I have an iOS app where after exceeding a certain limit, part of the user interface changes a color to alert the user. I'm using MVVM to accomplish this and division of labor looks like this: Model - ...
0
votes
0answers
27 views

TreeView items with attached 'quick action' buttons

I’m building a visual hierarchy of objects based on the TreeView control. Each level within that hierarchy corresponds to a different kind of object, and as such it’ll be implemented as a separate ...
0
votes
1answer
135 views

Usefulness of the Command CanExecute as it exists in WPF

I want to question the usefulness of the CanExecute functionality in WPF (defined in the ICommand interface). As I think that you can achieve the same functionality thing without this feature I ask ...
1
vote
1answer
334 views

MVVM with multiple view models that share a model

I have an application where there is an "inventor" model whose data I would like to display differently in different areas of the application. Therefore, I'd like to create different view models ...
0
votes
1answer
296 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
44 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
70 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
25 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
130 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 ...
9
votes
2answers
2k 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
200 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). ...
3
votes
1answer
189 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" ...
2
votes
1answer
145 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
78 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
186 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
319 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
166 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
241 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
201 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
279 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
101 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
111 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
206 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 ...
2
votes
0answers
1k 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
4k 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 ...
3
votes
1answer
1k 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) ...
14
votes
4answers
700 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
1answer
347 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
1k 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
795 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
214 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 ...
4
votes
1answer
3k 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 ...
8
votes
1answer
4k 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
188 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
77 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
358 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
194 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
1k 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 ...