Brief idea about mvc

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 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:
Functionality3 layered / tiered architectureMVC architecture
Look and FeelUser interfaceView
UI logicUser interfaceController
Business logic /validationsMiddle layerModel
Request is first sent toUser interfaceController
Accessing dataData access layerData Access Layer

No comments:

Post a Comment