MVC Architecture different in different sources

In summary, the MVC architecture is a widely used design pattern in software development that separates an application into three main components: Model, View, and Controller. In this architecture, the user typically interacts with the controller, which then communicates with the model to retrieve data. The controller then passes this data to the view, which is responsible for displaying it to the user. While there is no definitive answer to which component the user interacts with first or whether the model sends output directly to the view or through the controller, the University of Virginia's Computer Science and Engineering Department's lecture on MVC provides a reliable source of information on this topic. Additionally, in a Web 1.0 application, the controller acts as the intermediary between the user and the view
  • #1
shivajikobardan
674
54
Homework Statement
Different architecture of MVC given, which one is most relevant?
Relevant Equations
None
3BjHU67RGFTUiIyksaXqk6M1YCbfSffYxcmizLCCiNVVJDOKMS.png

Source: https://www.chromeinfotech.net/blog/model-view-controller-architecture/
ICA0KIrKwg4asNZjWPOn-Qt5pKe3aeFcABLcFmBV-tGzefL0UH.png

Source: University of Virginia Computer Science, Engineering Department youtube lecture.

Here're my 2 questions:
1) Does user interacts first with a view or controller?
2) Does model sends output directly to view or via Controller?
 
Physics news on Phys.org
  • #2
There are as many different interpretations of MVC architecture as there are programmers so there is no right answer here. Having said that I would rely more on the U. of Virginia than on some random one-man-band developer's blog.

To give this random one-man-band developer's thoughts:
Q1
In a Web 1.0 app (which is what is pictured in the second picture) there is no direct interaction between the user and the view, everything goes through the controller.
In a locally installed app, or in a Web 2.0 app, there may be direct interaction between the user and the view.

Q2
How data gets from the model to the view is not important, what is important in MVC is that a view must not be able to change state in a model. If the view does interact directly with the model then this becomes MVVM (model-view-viewmodel) rather than MVC.
 
  • Like
Likes shivajikobardan

FAQ: MVC Architecture different in different sources

What is MVC architecture and how does it differ in different sources?

MVC (Model-View-Controller) architecture is a software design pattern that separates an application into three main components: the model, the view, and the controller. The model represents the data of the application, the view represents the user interface, and the controller acts as an intermediary between the model and the view. The main difference in MVC architecture among different sources is the specific implementation and structure of each component.

Why is MVC architecture important in software development?

MVC architecture helps to organize code and separate concerns, making it easier to maintain and modify an application. It also promotes code reusability and improves the overall structure and scalability of a software project.

How does MVC architecture differ from other software design patterns?

MVC architecture differs from other design patterns, such as the Model-View-Presenter (MVP) and Model-View-ViewModel (MVVM) patterns, in the way it separates the responsibilities of each component. In MVC, the controller is responsible for handling user input and updating the model, while in MVP and MVVM, the presenter and view model, respectively, handle these tasks.

What are the benefits of using MVC architecture in web development?

MVC architecture is especially useful in web development because it allows for a clear separation of concerns between the front-end and back-end of a web application. This makes it easier for front-end developers to work on the user interface without needing to understand the back-end logic, and vice versa for back-end developers.

Can MVC architecture be used in all types of software development?

While MVC architecture is commonly used in web development, it can also be applied to other types of software development, such as desktop and mobile applications. However, the specific implementation may vary depending on the programming language and platform being used.

Back
Top