.NET architecture interview questions: - What are 3- Layer, N- Layer, MVC, MVP and MVVM?
- By Shiv Prasad Koirala in .Net
- Feb 19th, 2014
- 30848
- 0
Following are some of the .NET architecture interview questions asked during recent interviews to senior developers conducted in one of the MNC IT company.
The Word N-layer architecture is all about breaking our system into multiple layers where each layer does some special but different functionality.
It ultimately makes our system a layer application.
In real world also we do our work in layer fashion. Someone does something, some peoples utilizes work done by some other people and so on. One person won't do all the work by his own.
Why we do so?
By breaking our system into layers we makes it more manageable. Each layer does some specific task and thus we are required to worry about only part of the logic at a time.
N-Layer, what should be the minimum value for N?
It's a best practice to have at least three layers in a system.
Layer 1 - Presentation Layer - Which contains you UI.
Layer 2 - Business Domain - Which contain Business Logic.
Layer 3 - Database Access layer
How MVC, MVP and MVVM are different from these 3-Tier Systems?
These three are very different from 3-Layer. They are Architectural pattern meant to solve the UI level problem.
Even after we break our system into N-Layer, we always end up with writing some code in the UI. It not only makes our UI code more cluttered but makes it difficult to unit test it.
These architectures break our UI into multiple parts.
MVC breaks it into Controller and View, MVP breaks into View and Presenter whereas MVVC breaks it as View and View Model.
Two points
- What is Model - Our business domain - Business Data and Business Logic?
- Where is Data Access Layer - It's not defined as a part of any of these architecture but it will always be there as a separate layer.
Can we call MVC, MVP and MVVM as N-Layer architecture?
Yes, we can, because it also breaks your system into layer.
If you are interested for direct training from me on any technology like MVC, WCF, Design pattern, Business Intelligence, WPF, UML, jQuery, Knockout.js, Angualr.js feel free to contact at SukeshMarla@Gmail.com or visit www.Sukesh-Marla.com
Also see the following Software Architecture Interview Questions Video
Shiv Prasad Koirala
Visit us @ www.questpond.com or call us at 022-66752917... read more