ASP.NET MVC Interview Questions and Answers Part 2

By
1.) What is ASP.NET MVC ?                                                                                                         
  • ASP.NET MVC is an open source framework built on the top of .NET Framework to develop light weight web application.
  • ASP.NET MVC is the most customizable and extensible platform.
  • ASP.NET  MVC provides clean and separate codes in separate folders.
2.) What are the features of ASP.NET MVC1 ?                                                                  
  • ASP.NET MVC1  was released on  march  13  2009.
  • It supports .NET 3.5 and visual studio 2008 and visual studio 2008 sp1.
  • It supports default view engine ASPX and Razor
  • It supports Routing concepts.
  • It supports Html Helpers.
  •  It supports Ajax Helpers.
  • It supports Unit testing.
3.) What are the features of ASP.NET MVC2 ?                                                                     
  • ASP.NET MVC2 was released on march 10, 2010.
  • It supports strong type Html Helpers. ex. lambda expression based Html Helpers.
  • It supports UI Helpers with automatic scaffolding and customize templates.
  • It is the updated version of MVC1 template.
  • It supports Data Annotations attributes for model validation on client and server sides.
  • It supports GET,POST,PUT and DELETE Methods.
  • It supports Asynchronous controllers and large application modules also.   
4.) What are the namespace used in ASP.NET MVC ?                                                       
  •  System.Web.Mvc 
  • System.Web.Mvc.Html
  • System.Web.Mvc.Ajax
  • System.Web.Mvc.Async
5.) How does an ASP.NET MVC application work ?                                                         
                                              OR
6.) How does an model ,view and controller components communicate with each other ?
  1. The client sends a request through a UI provide by the view,which further passes this request to the controller.
  2. The controller receives the input request coming from the client side through the interface provides by the view, controller process the request ,if access of model is not required then send the data to the view layer.
  3. If  access of model is required then controller send the request to model layer.
  4. All computation process occurs on model layer. after that model notify the changes to view layer.
  5. The controller then selects the new views to be displayed.
  6. The view presents a UI according to the model.
  7.  The view data is also contained within the model .View queries about the state of the model to show the current data.
7.) What is Domain Driven Design  and Development ?                                                   
 Domain Driven Design (DDD) is not a methodology or technology.It is a collection principles and patterns that help developers to take design decision to develop appropriate system for different domain. 
There are five main components of DDD as given below:-
  1. Entity 
  2. value object
  3. Aggregate
  4. Service
  5. Repository
1.) Entity :-     
It is an object that has an unique Identity within the system.ex. Student,Employee etc.
2.) Value object :- It is an object that has no Identity within system. Ex. Age ,Salary etc.A value object can become an entity depending on the situation 
3.) Aggregate :- It is a special kind of entity that users return to directly .All users of aggregate root are called as aggregate.The aggregate root guarantees consistency of changes being made within the aggregate.
4.) Service :- A service is a way that helps users in request and reply within your system.It is an action ,operations and activities within your system.
5.) Repository :-  A repository is a place where your application data stored.It is a location for storage where data will be persist.
Ex. MYSQL , SQL ,ORACLE etc.

8.) What is Difference between 3 Tier architecture and MVC architecture ?          
 Read Here...

9.) What is mvp patterns?                                                                                                            
  • The MVP Pattern is an Architecture pattern which is used to build ASP.NET web application.
  • This pattern is similar to mvc pattern.
  • This system is an evolved version of mvc.
  • MVP is the Successor of MVC.
  • MVP pattern is more suitable in UNIT Testing. 
Note:-
Model and view components are same as mvc components.But Presenter replace the Controller in mvp pattern.
We can categories MVP in two components:-

  1. MVP (SC)
  2. MVP (PV)
More Details...
10.) What is mvvm patterns?                                                                                                      
  • First user interact with view.
  • The view gets the user input and forwards it to the ViewModel by using command. 
  • This pattern support two way data binding between view and view model.
  • The view knows the about ViewModel.
  • The ViewModel does not know about view.
  • The model does not know about ViewModel.
  • Many view can be mapped to one ViewModel.
  • It uses WPF and SilverLight Bindings.
11.) Why does we want to shift mvc to mvp or mvvm or other technology?
To improve UI ,we have to focus on these three components:-

  • State management
  • Logic Improvement
  • Synchronization
State Management:-
we always want to maintain the current state of the application.If we want to maintain more than one states at one time then complexity will be  increased. To improve this UI complexity , we need to shift another technology.
Logic Management:-
Every interface has some Logics such as Text boxes,labels,buttons etc or other UI elements. To improve this logic complexity in application,we have to shift another technology.
Synchronization:-
It is more important part of any presenter patterns.If your application want to communicate with different application,then complexity of the application will be increased.So we have to adopt new technology to solve this problem in your application.

More Details...

12.) What are the important features of MVC ?                                                                   
There are some important key points of MVC as given below:-
  • MVC consists of three components model,view and controller.
  • The model and view created by the controller.
  • Dotted line indicates,view knows about model but model does not know about any other components.
  • Request first comes to controller via view.after that it pass the request to model for manipulation.
  • The helps to bind the model with view.
  • Here Logic is stored in controller. 

1 comment:

  1. http://keranservices.blogspot.com/2017/04/aspnet-mvc-interview-questions-and.html

    ReplyDelete

Powered by Blogger.