Difference between revisions of "Model-View-Controller (MVC)"

From Coder Merlin
Line 16: Line 16:
== The Controller ==
== The Controller ==


[[File:Mvc2.png|thumb|Model View Controller Structure]]
[[File:Mvc2.png|800x600px|thumb|center|Model View Controller Structure]]
[[File:1200px-MVC-Process.svg.png|thumb|MVT Structure]]
[[File:1200px-MVC-Process.svg.png|thumb|MVT Structure]]



Revision as of 10:49, 18 August 2021

Within these castle walls be forged Mavens of Computer Science ...
— Merlin, The Coder

Introduction to MVC[edit]

The MVC system was introduced in the 1970's, but expressed as a general concept later in 1988. The system has evolved over time with many variations, such as hierarchical model-view-controller (HMVC), model-view-viewmodel (MVVM), model-view-presenter (MVP), model-view-adapter (MVA), and many other adaptations of the MVC system. The system was one of the first ways to describe and implement software constructs in terms of their responsibilities.

The Model View Controller (MVC) is a method of software design that is used to create user interfaces. The Model, View, and Controller are all elements of the MVC design, and all manage a specific task related to user interfaces. The MVC method helps to separate different GUI functions from each other, leading to cleaner code. MVC has been largely used for design in the World Wide Web and major programming languages too. Partiulary, MVC has a strong relationship with both Java and Objective-C.

The model-view-controller consists of the model, view, and controller.

  • The model interacts with data inputted and stored in the system.
  • The view allows the user to have a visual representation of the data and choose how they want to manipulate it.
  • The controller acts as a liaison between the model and view which will never communicate directly with each other.

The Model[edit]

The View[edit]

The Controller[edit]

Model View Controller Structure
MVT Structure

By: Mark, Reese, and Aidan

References[edit]