## Model-View-Controller (MVC)
MVC (Model-View-Controller) is a design pattern that separates the application logic into three interconnected components, which helps in organizing the code in a way that separates the concerns, a principle shared by other alternatives like MVVM (Model-View-ViewModel) or MVP (Model-View-Presenter). Django, a high-level Python web framework, inherently follows the MVC pattern (though it uses slightly different naming), while React.js, a JavaScript library for building user interfaces, primarily concerns itself with the View layer, but can be structured to follow MVC or any other pattern in the broader context of web development. This segmentation of responsibilities within an application, as enforced or facilitated by various frameworks and libraries, is key to building scalable, maintainable, and robust web applications.
1. **Model**: The Model encapsulates the data and the business rules of an application. It defines the data the application operates on and establishes the rules that govern what can be done with this data. The Model maintains the state of the application, and provides methods for accessing and manipulating this state. It's often tied to a database or other persistent storage, but it does not typically handle these interactions directly. Instead, these responsibilities are often delegated to a separate layer or component to ensure that each part of the application has a single, well-defined responsibility.
2. **View**: The View is responsible for presenting the Model's data to the user. It takes the data provided by the Model and renders it in a format that's suitable for interaction, which could be anything from a webpage on a browser to a graphical user interface (GUI) on a desktop application. The View doesn't contain any business logic or knowledge about where the data comes from; it simply takes the data it's given and decides how to display it. The same Model can often have multiple Views that present the data in different ways.
3. **Controller**: The Controller acts as the intermediary between the Model and the View. It listens for user input, such as button clicks or key presses, and translates these into actions to be performed by the Model. Once the Model has updated its state in response to the user's actions, the Controller then updates the View to reflect these changes. In this way, the Controller handles the flow of data between the Model and the View and manages the application's control flow, at least as it pertains to its associated Model and View.

It's worth noting that MVC is a conceptual pattern and its implementation can vary significantly. For example, some versions of MVC may allow the Model to update the View directly in response to changes in its state, while others strictly enforce that all communication must go through the Controller. The specific implementation of MVC often depends on the needs of the application, the development framework used, and the preferences of the development team.
> the term MVC framework is more of a marketing term. The original MVC concept is closer to a design pattern and has nothing to do with frameworks.
Here's a variation: [[Model-View-ViewModel (MVVM)]]