1) What is MVC (Model View Controller)?
Ans) MVC is an architectural pattern which separates the representation and user interaction. It’s divided into three sections, Model, View, and Controller. Below is how each one of them handles the task.
View: The View is responsible for the look and feel.
Model: Model represents the real world object and provides data to the View.
Controller: The Controller is responsible for taking the end user request and loading the appropriate Model and View.
2) Is MVC suitable for both Windows and Web applications?
Ans) The MVC architecture is suited for a web application than Windows. For Window applications, MVP, i.e., “Model View Presenter” is more applicable. If you are using WPF and Silverlight, MVVM is more suitable due to bindings
3) What are the differences between 3-layered architecture and MVC?
Ans) MVC is an architectural pattern which separates the representation and user interaction. It’s divided into three sections, Model, View, and Controller. Below is how each one of them handles the task.
View: The View is responsible for the look and feel.
Model: Model represents the real world object and provides data to the View.
Controller: The Controller is responsible for taking the end user request and loading the appropriate Model and View.
2) Is MVC suitable for both Windows and Web applications?
Ans) The MVC architecture is suited for a web application than Windows. For Window applications, MVP, i.e., “Model View Presenter” is more applicable. If you are using WPF and Silverlight, MVVM is more suitable due to bindings
3) What are the differences between 3-layered architecture and MVC?
Ans) MVC is an evolution of a three layered traditional architecture. Many components of the three layered architecture are part of MVC. So below is how the mapping goes:
Functionality | 3 layered / tiered architecture | MVC architecture |
Look and Feel | User interface | View |
UI logic | User interface | Controller |
Business logic /validations | Middle layer | Model |
Request is first sent to | User interface | Controller |
Accessing data | Data access layer | Data Access Layer |
No comments:
Post a Comment