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.

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.

281 questions
49
votes
10 answers

Under what conditions is the use of MVVM appropriate?

Model View View-Model was developed by Microsoft to target UI development platforms which support event-driven programming, specifically Windows Presentation Foundation (WPF) and Silverlight on the .NET platforms using XAML and .NET languages. In…
40
votes
3 answers

Who should control navigation in an MVVM application?

Example #1: I have a view displayed in my MVVM application (let's use Silverlight for the purposes of the discussion) and I click on a button that should take me to a new page. Example #2: That same view has another button that, when clicked, should…
SonOfPirate
  • 2,935
33
votes
4 answers

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 that, and ended up implementing some MVVM…
heltonbiker
  • 1,048
31
votes
1 answer

Is there a good formal pattern to manage state in MVVM?

I have started learning about Redux and React in the web-world, and the more I learn about it the more I'm realizing how painful state management is in the desktop-world with WPF's MVVM-style architecture (using Caliburn specifically to bind Views…
willem
  • 1,053
25
votes
2 answers

Clean Architecture: What is the View Model?

In his book 'Clean Architecture', Uncle Bob says that the Presenter should put the data that it receives into something he calls the 'View Model'. Is this the same thing as the 'ViewModel' from the Model-View-ViewModel (MVVM) design pattern or is…
24
votes
2 answers

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 selection Depending on the value of a property,…
jayars
  • 622
22
votes
6 answers

Should we bind view to a model property or ViewModel should have it's own..?

I am starting a project with following technical environment : .Net 4.0, Entity Framework 4.0, WPF with MVVM Architecture I saw lots of examples on the net, some books with this environment. In some of the examples authors had this Idea : Viemodel…
22
votes
5 answers

Are value converters more trouble than they're worth?

I'm working on a WPF application with views that require numerous value conversions. Initially, my philosophy (inspired in part by this lively debate on XAML Disciples) was that I should make the view model strictly about supporting the data…
devuxer
  • 676
  • 6
  • 13
20
votes
2 answers

Is MVVM in WPF outdated?

I'm currently trying to get my head round MVVM for WPF - I don't mean get my head round the concept, but around the actual nuts and bolts of doing anything that is further off the beaten track than dumb CRUD. What I've noticed is that lots of the…
Benjol
  • 3,737
18
votes
4 answers

MVVM Clarification

We are about to write our first WPF application and are becoming familiar with the MVVM pattern. We've built many Winform applications and have an architecture that has been very successful for us. We're having a little bit of trouble translating…
user7676
  • 283
18
votes
5 answers

How to make creating viewmodels at runtime less painful

I apologize for the long question, it reads a bit as a rant, but I promise it's not! I've summarized my question(s) below In the MVC world, things are straightforward. The Model has state, the View shows the Model, and the Controller does stuff…
dvdvorle
  • 849
17
votes
3 answers

MVVM, DDD, and WPF Layered Application Project Structure Guidance

I am trying to setup my application's structure in VS and I want to "try" and future proof it to a reasonable level. This application will be a WPF re-write of an old Winform app that had followed no conventions. No Layers, Tiers, Acronyms,…
15
votes
3 answers

MVVM and service pattern

I'm building a WPF application using the MVVM pattern. Right now, my viewmodels calls the service layer to retrieve models (how is not relevant to the viewmodel) and convert them to viewmodels. I'm using constructor injection to pass the service…
alfa-alfa
  • 153
14
votes
5 answers

WPF UserControl Reuse With MVVM

I'm struggling to find an elegant and idiomatic way of coding the following scenario using the MVVM paradigm in WPF and was wondering how other people would approach it. I have a UserControl in my WPF application which I want to reuse in a number of…
14
votes
4 answers

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 visuals and sciencey guts as separate and ignorant of…
1
2 3
18 19