Solved

MVC is screen part of Model or View?

Posted on 2014-02-16
2
294 Views
Last Modified: 2014-02-18
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
Comment
Question by:deleyd
2 Comments
 
LVL 86

Assisted Solution

by:jkr
jkr earned 100 total points
ID: 39863030
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
 
LVL 29

Accepted Solution

by:
pepr earned 400 total points
ID: 39864184
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
can finally block executed even when there is a return statement in try block 4 83
twoTwo  challenge 35 107
algorithm 15 116
trigs fail! I thought I knew how to do trignometry 3 75
Dependencies in Software Design In software development, the idea of dependencies (http://en.wikipedia.org/wiki/Coupling_%28computer_programming%29) is an issue of some importance. This article seeks to explain what dependencies are and where they …
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

791 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question