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

  • Home
  • SEARCH
  • 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 6376813
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:47:32+00:00 2026-05-25T01:47:32+00:00

Consider these two scenarios: a user presses a button in a view (e.g. Fulfill

  • 0

Consider these two scenarios:

  • a user presses a button in a view (e.g. Fulfill Order) and we want the view to update immediately (disable the button, add a progress bar, etc.)
  • a service layer raises a business event, which ultimately must be reflected on the view (e.g. a product has become out-of-stock).

Both cases legitimately require some mechanism, X, to update the viewmodel. With MVVM, the view can do this by setting properties of the viewmodel in an event handler, through command binding, or via some other mechanism.

The service layer can do this using some mechanism, Y. For example, raising events in the business/domain model, creating commands to manipulate the viewmodel, calling methods on the viewmodel etc.

In fact, X and Y could be the same mechanism (or pattern).

What’s a good one to do this, that keeps to the spirit of MVVM, but is DRY?

  • 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-25T01:47:33+00:00Added an answer on May 25, 2026 at 1:47 am

    I think you need to pick an MVVM framework and follow the pattern for this that it supports.

    In general:

    • Your button will be hooked to a FulfillOrder method on your ViewModel, via an ICommand or whichever your MVVM-framework supports
    • A “CanFulfillOrder” boolean property will be hooked up to disable your button via INotifyPropertyChanged, this can be triggered by the FulfillOrder method or the event you mention. It could also be bound to the Visibility on a progress bar.
    • Another property could provide the percentage on the progress bar and update it appropriately

    A good, general-purpose MVVM framework is MVVM Light.

    If you are looking for more power, and can handle more complexity, try Caliburn.

    Or if you want to use dynamic and try something cutting edge, try my framework: NoMvvm.

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

Sidebar

Related Questions

Consider these two function definitions: void foo() { } void foo(void) { } Is
Consider these two classes mapped to the same table. One is readonly via mutable=false.
I ran across a compilation issue today that baffled me. Consider these two container
Consider these two snippets: try: a+a=a except SyntaxError: print first exception caught . try:
Consider these two structures: struct Task { public Int32 Id; public String Name; public
Consider these two tables: CREATE TABLE GAME_ROUNDS( RoundId int primary key NOT NULL, GameId
(Note: these two questions are similar, but more specific to ASP.Net) Consider a typical
Consider these two use cases. Say a store gives out store credit for customers.
Consider these two use cases: sub test1 { my $v = 1; sub test2
consider these two entities: /** @Entity */ class String { /** @Id @Column(type=integer) *

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.