Questions tagged [mvvm]
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.
282 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
2
votes
2
answers
155
views
How should multiple ViewModels communicate in a larger WPF MVVM application?
I’m working on a WPF MVVM application that has grown beyond just one or two User Controls. I now have multiple ViewModels that need to react to each other’s actions (e.g., selecting a customer in one ...
3
votes
1
answer
135
views
Approaches to Razor without combining C# in HTML
The move to MVC and MVVM has not been easy for me. Combining multiple languages in single pages with inline code is something I find disorienting. I'd like to remedy this by attempting to use Razor ...
0
votes
1
answer
193
views
How should ViewModels and Services communicate in a JavaFX + Spring Boot MVVM application?
I'm building a JavaFX + Spring Boot application using the MVVM pattern.
I’m building a generic "wizard" in a JavaFX + Spring Boot MVVM app. A WizardViewModel drives a sequence of steps (STEP_ONE → ...
2
votes
2
answers
2k
views
Refactoring a legacy codebase with a god Repository and incomplete Clean Architecture [duplicate]
I'm currently working on a large legacy project that tried to implement Clean Architecture combined with MVVM, but unfortunately didn't fully adhere to the principles.
One major problem:
The ...
4
votes
1
answer
186
views
Holding state in a service class in MVVM
In my SwiftUI app, I have a UpNextManager view model and a service class called UpNextService which contains many methods to read up next items from disk, write them to disk and much more. The service ...
4
votes
2
answers
631
views
In MVVM, how do you scale your viewmodels as your UI becomes larger, more complex, and more nested?
In MVVM, the viewmodel communicates to the views by exposing observable values that the views subscribe to. As your UI grows and becomes more complex, the number of these observables grows and the ...
1
vote
0
answers
155
views
Correct way to store UI-specific settings in MVVM pattern
I am fairly new to MVVM. I am writing an application in which user creates a study for a physics simulation, inputs some data, runs the sim, and then views the results in graphs and tables. The ...
0
votes
1
answer
194
views
Complex stateful logic in MVVM architecture
I'm building a mobile app in Flutter, and the project has several distinct layers. The top part is something better described as MVVM: dumb View layer that performs rendering and delegates actions to ...
1
vote
1
answer
108
views
MVVM architecture and computations on data before presentations
I have an android app in which I am trying to follow the MVVM arcitecture.
I have a Room database, abstracted by a Repository class that has methods like getAllData() which I use in my *ViewModel ...
2
votes
2
answers
2k
views
MVVM: How and should I expose view models' models to other view models?
Many times while writing MVVM apps in C# I've come across this sort of problem where I need to expose the model in a view model so that I can get it in another view model and do something with it.
...
3
votes
1
answer
1k
views
Is MVVM appropriate for a .NET MAUI Blazor hybrid app?
I am preparing to create my first .NET MAUI Blazor hybrid app. It is a relatively new technology so there aren't a ton of resources to look at, but of the ones I have found, they are all structured ...
2
votes
2
answers
4k
views
WPF MVVM - Pass data from child-view to parent
I'm trying to implement the MVVM-pattern in a new WPF-application.
I'm using the MVVM Community Toolkit to reduce boilerplate code that comes with the pattern.
In my application, I'd like to have a ...
2
votes
2
answers
476
views
Data getter inside Model or ViewModel in MVVM
I'm working on an app I created for myself using the MVVM architecture. On my ViewModel I have a list_items that, when changed, updates the corresponding UI element on the View. The list of items ...
0
votes
1
answer
318
views
Dependencies traveling through hierarchical viewmodels
Often I want to open a new window from within some view.
I see opening a window as view logic. So I don't want code in my viewmodel that creates/opens/changes Windows or anything else that
interacts ...
2
votes
1
answer
1k
views
UML Diagram double arrow
In a Microsoft Learn article on MVVM there is an, what I assume, UML diagram that didn't make sense to me. (https://learn.microsoft.com/en-us/archive/msdn-magazine/2009/february/patterns-wpf-apps-with-...