Solved

MVC is screen part of Model or View?

Posted on 2014-02-16
2
291 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
Comment Utility
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 28

Accepted Solution

by:
pepr earned 400 total points
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

One of the most frequent problems a "newbie" developer may encounter is having to deal with different data formats. One for all: THE DATE We, as humans, need to "see" a date and then interpret it (much of the times this is an automatic operation)…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

762 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now