Skip to content
IRC-Coding IRC-Coding
MVC MVP MVVM Data Binding Testability

MVC vs MVP vs MVVM: GUI Architecture Patterns

MVC, MVP, MVVM explained: roles, data binding, pros/cons, and exam questions for GUI architecture.

S

schutzgeist

2 min read

MVC, MVP, MVVM – Comparison of GUI Architecture Patterns

This article is a glossary entry on MVC, MVP, and MVVM – including exam questions, core elements, and tags.

In a Nutshell

MVC, MVP, and MVVM separate the user interface, logic, and data model to make GUI applications more maintainable and testable.

Compact Technical Description

  • MVC: Controller mediates between View and Model.
  • MVP: Presenter actively coordinates View and Model; View is as “dumb” as possible.
  • MVVM: View binds to ViewModel (Data Binding); UI updates are more declarative.

Exam-Relevant Key Points

  • MVC: View sends input to Controller, Controller changes Model
  • MVP: Presenter knows View and Model, View is “dumb”
  • MVVM: Data binding between View ↔ ViewModel
  • Usage depends on framework (e.g., MVVM in WPF, MVC in Spring)
  • Practice: Structuring, testability
  • Security: Validation in Controller/Presenter/ViewModel
  • Cost-effectiveness: Maintainability
  • Documentation: Diagrams useful in GUI projects

Core Components

  1. Model
  2. View
  3. Controller (MVC)
  4. Presenter (MVP)
  5. ViewModel (MVVM)
  6. Data Binding
  7. Events/Callbacks
  8. Testability (Mocking)
  9. Validation
  10. Decoupling via Interfaces

Practical Example (Login)

MVC: View → Controller → Model → View
MVP: View → Presenter → Model → View
MVVM: View binds fields to ViewModel, Button triggers Command

Advantages and Disadvantages

Advantages

  • Clear separation of concerns
  • Higher testability
  • Better maintainability
  • Parallel development possible

Disadvantages

  • Overhead in small projects
  • Data binding can complicate debugging (MVVM)

Typical Exam Questions (with Brief Answers)

  1. Goal of MVC/MVP/MVVM? Separation of View/Model/Control.
  2. Main differences? Controller vs Presenter vs ViewModel + Binding.
  3. Where is MVVM typical? WPF/.NET, frameworks with binding.
  4. Advantage of MVP over MVC? Better testability through Presenter + Interface.

Glossary

TermDefinition
MVCModel-View-Controller
MVPModel-View-Presenter
MVVMModel-View-ViewModel

Free Response

In IHK projects with GUI, you should choose one of these patterns and document it cleanly (e.g., diagram of data flows). In CLI tools, the overhead is usually unnecessary.

Learning Strategy

  1. Create a table (MVC/MVP/MVVM).
  2. Implement a mini-app in at least one pattern.
  3. Practice differences in bullet points.
  4. Don’t put business logic in UI components.

Topic Analysis

  • Core: UI structuring
  • Challenges: Binding/structural conflicts
  • Security: Validation
  • Documentation: Interaction diagrams
  • Cost-effectiveness: Maintainability

Further Information

  1. https://learn.microsoft.com/en-us/dotnet/architecture/mvvm/
  2. https://spring.io/guides/gs/serving-web-content/
Back to Blog
Share:

Related Posts