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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T21:42:33+00:00 2026-06-18T21:42:33+00:00

I have recently started using the MVVM pattern. I’m beginning to see that my

  • 0

I have recently started using the MVVM pattern. I’m beginning to see that my View-Model’s might quickly get very large and unmanageable. Is there some way to counter this?

  • 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-06-18T21:42:35+00:00Added an answer on June 18, 2026 at 9:42 pm

    There are a few approaches to this. I’ve yet to find a single universal “fix”, but I’ll share a few things I’ve picked up along the way. You’ve tagged this as c#, but not specified what platform you’re using (is this a desktop app, ASP.NET website, or what?) so I’ll try to keep it generic. Most of my experience of MVVM is in web development though, so bits of that may creep in.

    First, recognise that massive viewmodels can be a symptom of a design that needs rethinking. It might be that one page is trying to do too much. Breaking this page up into several pages will not only reduce the size of your viewmodel, it will also let you move logic into other methods and make your backend or server-side code easier to navigate, and may well make the page less cluttered and easier for the end user to actually use.

    Second, look closely to see if your viewmodels are overstepping their bounds a little. They might be doing logic that should be handled elsewhere. For example, if you’re using repositories (or something like them) to access a data source, let those classes handle logic relating to constructing queries or preparing data for saving, rather than making your viewmodels do it. If you don’t use repositories, consider adding some in and shifting your datasource-access code to them.

    Similarly, see if your viewmodels share logic. If so, shift it to a base class and inherit from that one whenever you need that shared logic. You can inherit from multiple base viewmodels to combine functionality and reduce code repetition.

    This last point is a little more web-specific, but: make use of partial views. If the viewmodel for your page is getting large because that page has a lot of stuff on it, consider splitting the page into areas or panes (at least conceptually, if not visually) and making each area a partial view. This means that your view code is easier to read, because what was an enormous page is now more or less just a template with partial view calls. It makes your server-side code easier to read, because what was one big method to construct and populate this huge page is now several smaller ones. Best of all, it may even allow you to do clever things with those panes, like using AJAX to reload them (periodically or based on interactions or events) without having to reload the whole page.

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

Sidebar

Related Questions

I recently started using WPF and the MVVM framework, one thing that I have
I have only recently started using CakePHP and have been unable to get validation
I have recently started to learn Objective-C and write my tests using OCUnit that
I have recently started using doc-view in Emacs, but I am having quite a
I have recently started using a shared-host for my clients so see project progress
I have recently started using coffeescript with Rails and I am finding that sometimes
I have recently started using generics in java, and in that attempt tried to
I have recently started using Behat with Mink on a PHP project that uses
I 've recently started working with WPF using MVVM light and I have the
I have recently started using the MVVM-Light toolkit and I am stuck on the

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.