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