0

What is MVC really? Is "model-view-controller" basically the way all ASP.NET programs in Visual Studio are made? Is it the default way WPF applications are arranged?

4
Contributors
3
Replies
5
Views
5 Years
Discussion Span
Last Post by princysharma90
0

What is MVC really?

MVC is really not that complicated. It just means that you make sure to clearly separate the three main problems: how you store and arrange the data; how you present that data; and, how you control it. This is because you never know when you might want to change or replace any one of them, so, if they are clearly separated with well-defined interfaces, it is really easy to do so. Computer scientists tend to conflate this into some huge theory or design methodology, but it's really just that simple rule.

Is "model-view-controller" basically the way all ASP.NET programs in Visual Studio are made?

I don't know, but it's likely since MVC is pretty much the de-facto standard pattern for all applications of that kind (an app that presents and control data, like a data-base or a web-server, or whatever). This pattern dates back a long time, and is really second nature to anyone who has done any non-trivial amount of programming. I only learned about this specific term "model-view-controller" a year or so ago, but I immediately recognized the pattern as I could not remember ever programming in any other way for that kind of a problem, because not separating these three things is just plain wrong, even by the most basic programming guidelines.

This pattern even has its version in library code (far below the user-interface), in there, a more appropriate name might be SIA ("structure-interface-algorithms"), as in, separating the data-structures, the algorithms that manage them, and the interface that the library-user deals with. At least, this is how I do any non-trivial library coding.

Is it the default way WPF applications are arranged?

MVC is about the way you design your software. So, above all, it is your design decisions that arranges the code in an MVC pattern, not the framework, programming language or whatever else. But, certainly, you will see this pattern again and again in just about every source code you encounter (especially GUI applications and components). Some libraries are more about one aspect or another, but they all pretty much correspond to MVC, that is, some libraries are just about particular data structures and algorithms (call that "model-controller"), others are just about control (data-base client libraries), yet others are mostly about the presentation (like GUI libraries like Qt or MFC). Most end-user applications will be a combination of the three, possibly each one taken from a separate library, and sometimes even in different programming/scripting languages (each suited for its own purpose).

0

What is MVC really?

A design pattern.

Is "model-view-controller" basically the way all ASP.NET programs in Visual Studio are made?

No. Certainly not. Programs using the ASP.NET MVC framework, on the other hand, might use the design pattern. Unless ASP.NET MVC framework actually is designed for a different design pattern that is close to but not exactly the same as MVC. That's likely. And people can use ASP.NET MVC and still not do something that is MVC (or whatever exactly ASP.NET MVC espouses).

Is it the default way WPF applications are arranged?

What do you mean "default"?

0

MVC (Model View Controller) is a kind of user interface. It is made of 3 words:
Model- contains application data
View- representation of data such as diagrams
Controller- directs the input.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.