All quizzes
Free quiz · 20 questions in the bank

MVVM quiz

Test your MVVM knowledge with a free interactive quiz — 20 questions with answers and explanations. No signup needed to play.

Question 1/12Score 0

How does the View typically communicate user actions (like a button tap) back to the ViewModel in MVVM?

In this round
  1. How does the View typically communicate user actions (like a button tap) back to the ViewModel in MVVM?
  2. What is the role of the "ViewModel" in MVVM?
  3. What is a reasonable way to decide the appropriate granularity for a ViewModel (one ViewModel per screen, vs. one per smaller reusable component)?
  4. How does MVVM's separation of concerns differ from a design where a View directly manipulates Model objects with no intermediary layer?
  5. What does MVVM stand for?
  6. Why does keeping the ViewModel free of direct UI framework references (like a specific button class) matter for testability?
  7. What potential downside can arise if a ViewModel accumulates too much unrelated logic and state over time (a "massive ViewModel")?
  8. What is a practical benefit of a ViewModel exposing already-formatted, presentation-ready values (like a formatted date string) rather than raw Model data?
  9. Why is dependency injection commonly used alongside MVVM (injecting services/repositories into a ViewModel rather than the ViewModel creating them directly)?
  10. What is a "command" in the context of MVVM (as used in frameworks like WPF)?
  11. Why does MVVM's separation between View and ViewModel make it easier to redesign a UI's visual appearance without touching business/presentation logic?
  12. What is a common criticism of adopting MVVM for a very simple screen with minimal state or logic?
Gaps to close?
Read the curated MVVM notes — core concepts, patterns, interview prep.
MVVM notes

More quizzes

.NET.NET MAUIAbsintheAccessibilityActixActix Web