Thought Programmer

MVC vs MVP vs MVVM

What’s different between them?

Anh T. Dang
Level Up Coding
Published in
5 min readSep 26, 2020

--

Photo by Edwin Andrade on Unsplash

Nowadays we have many options when it comes to architecture design patterns. After developing many apps using Model-View- ViewModel (MVVM), Model-View-Presenter (MVP), and Model-View-Controller (MVC), I finally feel qualified to talk about the differences between them. For easier to understand, we can use a simple example like developing a screen to search books in the BookSearch App.

Let’s begin now…!

MV(X) essentials

First of all, we need to understand briefly MVC, MVP, and MVVM architecture before dive into them.

Why Model-View-(C or P or VM)?

The aim of these architectures is to separate the responsibilities of visualizing, processing, and data management for UI applications.

separate the responsibilities of visualizing, processing, and data management

Their goals are to increase.

  • Modularity
  • Flexibility
  • Testability
  • Maintainability

Model-View-Controller

Or MVC for short is a widely used design pattern for architecting software apps. The pattern was originally designed by Trygve Reenskaug during his time working on Smalltalk-80 (1979) where it was initially called Model-View-Controller-Editor. MVC went on to be described in depth in “Design Patterns: Elements of Reusable Object- Oriented Software” (The “GoF” book) in 1994, which played a role in popularizing its use. The pattern breaks an app up into three components.

  • Model — is responsible for the business logic of the application. It manages the state of the application. This also includes reading and writing data, persisting application state, and it may even include tasks related to data management such as networking and data validation.
  • View — this component has two…

--

--

I write about things that I like and things that I don’t, mainly in the business, art and tech sphere. Sign up for my newsletter http://junryo.xyz