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/5Score 0

Why does keeping the ViewModel free of direct UI framework references (like a specific button class) matter for testability?

Questions in this quiz
  1. Why does keeping the ViewModel free of direct UI framework references (like a specific button class) matter for testability?
  2. How does MVVM's separation of concerns differ from a design where a View directly manipulates Model objects with no intermediary layer?
  3. What is a "command" in the context of MVVM (as used in frameworks like WPF)?
  4. Why might unidirectional data flow (data flowing Model → ViewModel → View, with user actions flowing back up through commands) be considered valuable in an MVVM implementation?
  5. What is a practical benefit of a ViewModel exposing already-formatted, presentation-ready values (like a formatted date string) rather than raw Model data?
  6. What does MVVM stand for?
  7. Why is dependency injection commonly used alongside MVVM (injecting services/repositories into a ViewModel rather than the ViewModel creating them directly)?
  8. What is the primary responsibility of the "Model" in MVVM?
  9. What is the key mechanism that typically connects a View to its ViewModel in MVVM (in frameworks that support it natively)?
  10. What potential downside can arise if a ViewModel accumulates too much unrelated logic and state over time (a "massive ViewModel")?
  11. What is the role of the "ViewModel" in MVVM?
  12. How does a ViewModel typically expose asynchronous operations (like a network request) to the View in MVVM?
Gaps to close?
Read the curated MVVM notes — core concepts, patterns, interview prep.
MVVM notes

More quizzes

.NET.NET MAUIAbsintheAccessibilityActixActix Web