MVC Interview Questions and Answers Part 5

By // No comments:
1.) What are the features of ASP.NET MVC 5 ?                                                                     
There are some important features of ASP.NET MVC 5 as given below:-
  • MVC 5 released on 17 October  2013.
  • It runs on .NET Framework 4.5 ,4.5.1 and above.
  • It runs on visual studio 2012 and visual studio 2013.
  • It supports all the features of MVC 4 Template.
  • It supports ASP.NET Identity.
  • It provides authentication filters.
  • It supports Scaffolding functionality.
  • It support ASP.NET Web API 2.
  • It Support Bootstrap in ASP.NET MVC Template.
2.) How to use Custom View Engine in ASP.NET MVC  ?                                                 
If you want to use custom view engine in your mvc template ,you have to register it by using Global.asax.cs  file under Application_Start() method as given below.
protected void Application_Start() 
{  //Register Custom View Engine 
ViewEngines.Engines.Add(new CustomViewEngine());
...............other codes..........

Note:- By using this above codes ,you can use custom view engine instead of default  one.

ASP.NET MVC Interview Questions and Answers Part 4

By // No comments:
1.) What are the features of ASP.NET MVC 4 Template ?                                                
There are some features of mvc 4 as given below:-
  • ASP.NET MVC 4 was released on august 15, 2012
  • It includes all features of mvc 3 as well as some advance features also.
  • It runs on .NET 4.0,.NET 4.5  and with visual studio 2010 and visual studio 2012.
  • It supports Web API.
  • It supports mobile project template using jquery.
  • It supports Asynchronous controllers .
  • It is helpful in bundling and minification.
  • It support the Windows Azure SDK.
  • It supports display mode functionality.
  • It supports WEB API 2.
  • It supports bootstrap in mvc template.
  • It supports ASP.NET Scaffolding.
  • It supports Identity.
  • It Supports authentication filters also. 
2.) What is difference between ASPX and Razor view engine  ?                                   
More Details...

3.) What is routing in mvc  ?                                                                                       
ASP.NET MVC Framework works on the concepts of routing to map URLs to the Controller class and Action defined in the Controller.
4.) Can we change Action Method Name in coding  ?                                
Yes, we can change Action method name in coding . 
5.) Is application using Routing table ?                                                                   
No, It specifically maps the URL based incoming request to the physical file(ex .aspx file) .

6.) What is Routing table ?                                                                                                         
Routing table is a storage table which stores the registered URL patterns. 

7.) Where does routing table's codes reside  ?                                                         
 Global.aspx file
8.) What is pattern in mvc ?                                                                                                       
A pattern is a signature that helps for matching the Incoming Request to your system or other.
Example :-
{controller}/{action}/{id} is a predefined pattern in every MVC templates.You can change your route Path according to your project using Custom Routing Functionality.
9.) What is exact meaning of pattern in mvc ?Explain.                                                    
Suppose you have hosted your MVC Application on server and your domain name is .If you want to open a page that contains images and image id 10 then what will you do? You will find this page through your Browser URL request over the internet.
You will type your request as following way in your browser as given below:- .
Suppose your project definition as follows.
 controller name = Bollywood
action-name =images
Image id=10
Then you will request following URL through browser over internet as given below:-
  • If You want access above information on your local system then it will be like this http://localhost:59279/Bollywood/images/10
  • Remember, Name of controller and action will be case sensitive.
  • Remember one things,Route name can't duplicated in will be unique in whole application.
10.) What will be error message show if no Url match is found in routing table?
404 HTTP status code
10.) How to create an mvc application with model,view and controller?                 
More Details...

ASP.NET MVC Interview Questions and Answers Part 3

By // No comments:
1.) What are the features of ASP.NET MVC 3 Template ?                                                
  • mvc was released on january 13 ,2011
  • It runs on .NET Framework 4.0 and with visual studio 2010 and above.
  • It uses Razor as a default view engine.but you can use ASPX or web form view engine also.
  • It helps in remote validation.
  • It provides compare attribute.
  • It enhanced in DataAnnotations  attributes for model validation on client and server sides.
  • It supports compare attribute.
  • It act as a dependency resolver.
  • It helps partial -page output caching.
  • It uses View Bag dynamic property for passing data from controller to view.
  • It supports Global action features also.
  • It support child action Output caching.
  • It uses NuGet to deliver software and manage dependency through the platform.
  • It support Entity framework codes.
  • It provide better java script support in template.
  • etc.

ASP.NET MVC Interview Questions and Answers Part 2

By // 1 comment:
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 ?                                                         
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.

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. 
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.
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. 

ASP.NET MVC Interview Questions and Answers Part 1

By // No comments:
1.) What is MVC ?                                                                                                                             
  • MVC stands for Model-View-Controller.
  • MVC was introduced in 1970 . 
  • MVC is software design pattern.
  • It is more helpful for testing and maintaining the applications.
2.) How many layers are used in  MVC  framework?                                                         
There are basically three layers in mvc framework as given below.
  • Presentation logic
  • Business Logic
  • Control Logic 
3.) What was the main reason to develop  MVC template ?                                           
There was some reason to develop mvc template as given below:-
Nowadays, There are lots of peoples accessing the information from the web.They are accessing the information from different sources like  Laptop,Desktop,Mobile,Tablet,Ipad etc. So Developers should develop those applications who can be viewed on different devices easily. To overcome this problem Microsoft has developed a template that is called  MVC Template.
Powered by Blogger.