• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 304
  • Last Modified:

MVC is screen part of Model or View?

Model-View-Controller:

"Screen" sounds like it should be a part of the Model, as it's a physical tangible thingy. And the Screen display sounds like data, (the state of the pixels on the screen, (a screen has pixels,)) and doesn't data go in the Model?

Or, is "Screen" supposed to be a part of the View?
0
deleyd
Asked:
deleyd
2 Solutions
 
jkrCommented:
If you refer to the scren as where you are reading data, that's part of the view - see e.g. the graphics at http://en.wikipedia.org/wiki/Model-view-controller

What exactly do you mean by "screen"?
0
 
peprCommented:
Always, when you think too much about any word, you start to ask questions that are kind of strange. Generally, the MVC pattern purpose is to separate internal program structure for getting the independence (i.e. losely coupled interfaces between the parts).

The Model should always be the part that does not depen on anything visible outside. Think about having the application, that can be executed without GUI, running automatically. Every input is captured in config data or it can be obtained automatically from somewhere. Think also in terms that you want to test the core functionality of your application automatically. It is very difficult when you add GUI as a user-behaviour dependent part -- the testing cannot be automated easily.

The View is about interpreting the content of the model. It can be displayed on the screen, exported to some file format, or only a part of the model data can be extracted to get simplified view, etc.

The Controler is the most complicated when speaking about GUI. Some parts of the controler are bound to GUI, some parts are not -- it depends on the solved problem. Touching a screen does not mean here to use the visibility of data (that is the part of View interpretation). It means only that some GUI elements have a different purpose -- to control the behaviour of the application, to get the *input* from the user.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now