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 698565
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T03:17:21+00:00 2026-05-14T03:17:21+00:00

I am writing a PRISM/MVVM/WPF application. It’s a LOB application, so there are a

  • 0

I am writing a PRISM/MVVM/WPF application. It’s a LOB application, so there are a lot of complicated rules. I’ve noticed the View Model is starting to get bloated. There are two main issues.

One is that to maintain MVVM, I’m doing a lot of things that feel hacky like adding a bunch of properties to my VM. The view binds to those properties to keep track of what feels like view specific information. For example, a boolean keeping track of the status of a long running process in the VM, so the view can disable some of its controls while the long running process is working. I’ve read that this issue could be solved with Attached Behaviors. I’ll look more into that. In the example MVVM apps you see online, this isn’t a big deal because they are over-simplified.

The other issue is the number of commands in my VM. Right now there are four commands. I’m defining the commands in the VM using Josh Smith’s RelayCommand (basically the DelegateCommand in PRISM) so all the business logic lives in the VM. I considered moving each command into separate unit of works. I’m not sure the best way to do this.

Which patterns are you guys using to keep your VMs clean? I can already feel someone responding with “your view and VM is too complicated, you should break them into many view/VMs”. It is certainly not too complicated from a Ux perspective – there are 2 buttons, a combobox, and a listbox. Also, from a logical perspective, it is one cohesive domain. Having said that, I’m very interested in hearing how others are dealing with this type of issue.

Thanks for your input.

  • 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-14T03:17:21+00:00Added an answer on May 14, 2026 at 3:17 am

    I feel your pain. I wrestle with these kinds of questions a lot when working on MVVM apps. One of these days I’ll post a laundry list of questions to get input from others like you’ve done.

    I tend to worry very much about “bloat” in my ViewModel base class but not so much in the concrete ViewModel subclasses. It’s often tempting to throw a dependency used by 2-3 ViewModels into the base class but it should be avoided.

    While I can’t presume to know what your idea of bloated is, I can say that I don’t think having the “busy” property or commands handled in the VM are bad. One thing you might consider is whether or not the ViewModel can be busy doing more than one thing at once. If so, you might want to go ahead and think about ways to break it up. While I haven’t personally seen it in practice, you could probably have your single, cohesive view and a couple ViewModels bound to it.

    If your commands are long, or if they can be executed on different targets, I think making the commands self-executing units is a good idea. But it’s probably best to be consistent with this approach as to avoid confusing anyone who works on it later. For example if you have a SaveCustomerCommand class that is about 10 lines of code, you probably don’t want to use a RelayCommand for everything else.

    It’d be nice if there were hard and fast rules for this kinda stuff but I think both the framework and the pattern are still in the evolutionary stage right now.

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

Sidebar

Related Questions

I am writing an WPF MVVM application using Prism. A couple days ago I
I am writing an app using the MVVM (Model-View-ViewModel) pattern and am leveraging the
I am writing a MVVM application and one of the screens is quite significant
I'm writing a prism application, I've just created my 1st module, fired it all
Writing a JSP page, what exactly does the <c:out> do? I've noticed that the
Writing my first Linq application, and I'm trying to find the best way to
When writing a switch statement, there appears to be two limitations on what you
I´m writing an application for Android in which I have a character that I
Im writing an ipad application. So far what I have is a Delegate and
Writing some test scripts in IronPython, I want to verify whether a window is

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.