Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 790105
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T21:37:53+00:00 2026-05-14T21:37:53+00:00

Is orthodox MVVM implementation pointless? I am creating a new application and I considered

  • 0

Is orthodox MVVM implementation pointless? I am creating a new application and I considered Windows Forms and WPF. I chose WPF because it’s future-proof and offer lots of flexibility. There is less code and easier to make significant changes to your UI using XAML.

Since the choice for WPF is obvious, I figured that I may as well go all the way by using MVVM as my application architecture since it offers blendability, separation concerns and unit testability. Theoretically, it seems beautiful like the holy grail of UI programming. This brief adventure; however, has turned into a real headache.
As expected in practice, I’m finding that I’ve traded one problem for another. I tend to be an obsessive programmer in that I want to do things the right way so that I can get the right results and possibly become a better programmer. The MVVM pattern just flunked my test on productivity and has just turned into a big yucky hack!

The clear case in point is adding support for a Modal dialog box. The correct way is to put up a dialog box and tie it to a view model. Getting this to work is difficult. In order to benefit from the MVVM pattern, you have to distribute code in several places throughout the layers of your application. You also have to use esoteric programming constructs like templates and lamba expressions. Stuff that makes you stare at the screen scratching your head. This makes maintenance and debugging a nightmare waiting to happen as I recently discovered. I had an about box working fine until I got an exception the second time I invoked it, saying that it couldn’t show the dialog box again once it is closed. I had to add an event handler for the close functionality to the dialog window, another one in the IDialogView implementation of it and finally another in the IDialogViewModel. I thought MVVM would save us from such extravagant hackery!

There are several folks out there with competing solutions to this problem and they are all hacks and don’t provide a clean, easily reusable, elegant solution. Most of the MVVM toolkits gloss over dialogs and when they do address them, they are just alert boxes that don’t require custom interfaces or view models.

I’m planning on giving up on the MVVM view pattern, at least its orthodox implementation of it. What do you think? Has it been worth the trouble for you if you had any? Am I just a incompetent programmer or does MVVM not what it’s hyped up to be?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T21:37:54+00:00Added an answer on May 14, 2026 at 9:37 pm

    Sorry if my answer became a little lenghty, but don’t blame me! Your question is lengthy as well.

    In summary, MVVM is not pointless.

    The clear case in point is adding
    support for a Modal dialog box. The
    correct way is to put up a dialog box
    and tie it to a view model. Getting
    this to work is difficult.

    Yes, it truly is.
    However, MVVM provides you a way for separating the UI’s appearance from its logics. Noone forces you to use it everywhere, and noone is holding a gun against your forehead to make you create a separate ViewModel for everything.

    Here is my solution for this particular example:
    How the UI handles a certain input is none of the ViewModel’s business. I would add code to the View’s .xaml.cs file, which instantiates the dialog box and sets the same ViewModel instance (or something else, if needed) as its DataContext.

    In order to benefit from the MVVM pattern, you have to distribute code in several places throughout the layers of your application. You also have to use esoteric programming constructs like templates and lamba expressions.

    Well, you don’t have to use it in several places. This is how I would solve it:

    • Add the XAML to the View, and nothing in the .xaml.cs
    • Write every app logic (except the stuff that would directly operate with UI elements) inside a ViewModel
    • All the code that should be done by the UI but has nothing to do with business logic goes into the .xaml.cs files

    I think that the purpose of MVVM is primarily to separate the logic of the application and the concrete UI, therefore enabling easy modifications (or complete replacement) of the UI.
    I use the following principle: the View can know and assume anything it wants from the ViewModel, but the ViewModel can know NOTHING about the View.
    WPF provides a nice binding model which you can use to achieve exactly that.

    (BTW, templates and lambda expressions aren’t esoteric if used right. But if you don’t want to, don’t use them.)

    Stuff that makes you stare at the screen scratching your head.

    Yeah, I know the feeling. Exactly what I was feeling when I first saw MVVM. But once you get the hang of it, it won’t feel bad anymore.

    I had an about box working fine …

    Why would you put a ViewModel behind an about box? No point in that.

    Most of the MVVM toolkits gloss over dialogs and when they do address them, they are just alert boxes that don’t require custom interfaces or view models.

    Yes, because the very fact that a UI element is in the same window, or another window, or is orbitting Mars at the moment is none of the ViewModels’ concern.
    Separation of Concerns

    EDIT:

    Here’s a very nice video the title of which is Build your own MVVM framework. It’s worth watching.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.