Difference between revisions of "W1526 Model-View-Controller"

From Coder Merlin
 
(2 intermediate revisions by the same user not shown)
Line 4: Line 4:
A '''software design pattern''' is a ''general'', ''reusable'' solution to a commonly occurring problem in software design.  It provides a template to be used to solve similar problems in various situations.  Design patterns can help speed development by providing tested and proven paradigms.
A '''software design pattern''' is a ''general'', ''reusable'' solution to a commonly occurring problem in software design.  It provides a template to be used to solve similar problems in various situations.  Design patterns can help speed development by providing tested and proven paradigms.
== Introduction ==
== Introduction ==
[[File:MVC-Process.svg|right|MVC-Process]]
[[File:MVC-Process.svg|right|Model-View-Controller architectural pattern]]
The '''Model-View-Controller''' is a ''software design pattern'' which is commonly used when user interfaces are involved and is very popular among web applications.  In such a pattern, the program is divided into three separate, yet interconnected components:
The '''Model-View-Controller''' is a ''high-level'' ''software design pattern'' which is commonly used when user interfaces are involved and is very popular among web applications.  In such a pattern, the program is divided into three separate, yet interconnected components:
* The '''Model''' is the application's ''dynamic data structure'' and is responsible for managing data and logic  
* The '''Model''' is the application's ''dynamic data structure'' and is responsible for managing data and logic  
* The '''View''' provides a representation of information to the user.  In some cases multiple views are possible for the same information.  
* The '''View''' provides a representation of information to the user.  In some cases multiple views are possible for the same information.  
* The '''Controller''' receives input and issues commands to the ''Model'' or ''View''
* The '''Controller''' receives input and issues commands to the ''Model'' or ''View''
<br clear='all' />
<br clear='all' />
[[File:Model-View-Controller architectural pattern.svg|left|Model-View-Controller architectural pattern (alternative view)]]
<br clear='all' />
{{ComingSoon|
* Layers of the model
* Message relay / loose coupling
}}
== Key Concepts ==
== Key Concepts ==
== Exercises ==
== Exercises ==
== References ==
== References ==
* [[https://en.wikipedia.org/wiki/Software_design_pattern Software Design Pattern]] (Wikipedia)
* [[https://en.wikipedia.org/wiki/Software_design_pattern Software Design Pattern]] (Wikipedia)

Latest revision as of 09:08, 2 February 2021

Within these castle walls be forged Mavens of Computer Science ...
— Merlin, The Coder
Perereca-macaco - Phyllomedusa rohdei

Prerequisites[edit]

Background[edit]

A software design pattern is a general, reusable solution to a commonly occurring problem in software design. It provides a template to be used to solve similar problems in various situations. Design patterns can help speed development by providing tested and proven paradigms.

Introduction[edit]

Model-View-Controller architectural pattern

The Model-View-Controller is a high-level software design pattern which is commonly used when user interfaces are involved and is very popular among web applications. In such a pattern, the program is divided into three separate, yet interconnected components:

  • The Model is the application's dynamic data structure and is responsible for managing data and logic
  • The View provides a representation of information to the user. In some cases multiple views are possible for the same information.
  • The Controller receives input and issues commands to the Model or View


Model-View-Controller architectural pattern (alternative view)


ComingSoonIcon.png
Coming Soon
  • Layers of the model
  • Message relay / loose coupling

Key Concepts[edit]

Exercises[edit]

References[edit]