1. What is ASP.NET MVC ?
ASP.NET MVC is a web application framework. it is lightweight and highly testable framework. MVC separate application into three components- Model, View and Controller.
2. Can you explain Model, View and Controller in MVC ?
Model - its business entity and it is used to represent the application data.
Controller - request sent by the user always scatters through controller and its responsibility is to redirect to the specific view using View() method.
View- if the presentation layer of MVC.
3. Explain the new features added in version 4 of MVC( MVC4) ?
following features added newly-
Asynchronous controller task support
building the JavaScript.
segregating the config for MVC routing, Web API, Bundle etc.
mobile templates.
added ASP.NET Web API template for creating REST based services.
Bundling the JavaScript .
4. Can you explain the page life cycle of MVC ?
below are the process followed in the sequence -
App initialisation
Routing
Instantiate and execute controller
Locate and invoke controller action
Instantiate and render view
5. what are the advantages of MVC over ASP.NET ?
Provides a clean separation of concerns among UI ( Presentation layer), model ( Transfer objects / Domain objects/ Entities) and Business logic ( Controller).
Easy to UNIT test.
improved reusability of model and views. we can have multiple views which can point to the same model and vice versa .
improved structuring of the code.
6. what is separation of concerns in ASP.NET MVC?
it's the process of breaking the program into various resident features which overlaps in functionality as little as possible. MVC pattern concerns on separating the content from presentation and data processing from content.
7. what is Razor View Engine ?
Razor is the first major update to render HTML in MVC 3. razor was designed specifically for view engine syntax. main purpose of this would be to simplify and code for girls templating for HTML generation. below is the sample of using razor:
@model MvcMusicStore.Models.Customer
@{ViewBag.Title = “Get Customers”;}
<div class=”cust”> <h3><em>@Model.CustomerName</em> </h3>
8. What is the meaning of Unobtrusive JavaScript ?
this is a General term that conveys general philosophy, similar to the term REST ( Representational State Transfer) . Unobtrusive JavaScript code in your page markup.
Example: instead of using events like onclick and onsubmit, Unobtrusive JavaScript attaches to Elements by their ID or class based on the HTML5 data attributes. in a line
9. what is the use of ViewModel in MVC ?
ViewModel is a plane class with properties, which is used to bind it too strongly typed view. ViewModel can have the validation rules defined for its properties using the data annotations.
10. what do you mean by Routing in MVC ?
routing is a pattern matching mechanism of incoming request to the URL pattern which are registered in route table. Class- “URLRoutingModule” is used for the same process.
11. What are actions in MVC ?
Actions are the methods in controller class which is responsible for returning the view or JSON data. action will mainly have return type - “ActionResult” and it will be in work from method - “InvokeAction” called by the controller.
ASP.NET MVC is a web application framework. it is lightweight and highly testable framework. MVC separate application into three components- Model, View and Controller.
2. Can you explain Model, View and Controller in MVC ?
Model - its business entity and it is used to represent the application data.
Controller - request sent by the user always scatters through controller and its responsibility is to redirect to the specific view using View() method.
View- if the presentation layer of MVC.
3. Explain the new features added in version 4 of MVC( MVC4) ?
following features added newly-
Asynchronous controller task support
building the JavaScript.
segregating the config for MVC routing, Web API, Bundle etc.
mobile templates.
added ASP.NET Web API template for creating REST based services.
Bundling the JavaScript .
4. Can you explain the page life cycle of MVC ?
below are the process followed in the sequence -
App initialisation
Routing
Instantiate and execute controller
Locate and invoke controller action
Instantiate and render view
5. what are the advantages of MVC over ASP.NET ?
Provides a clean separation of concerns among UI ( Presentation layer), model ( Transfer objects / Domain objects/ Entities) and Business logic ( Controller).
Easy to UNIT test.
improved reusability of model and views. we can have multiple views which can point to the same model and vice versa .
improved structuring of the code.
6. what is separation of concerns in ASP.NET MVC?
it's the process of breaking the program into various resident features which overlaps in functionality as little as possible. MVC pattern concerns on separating the content from presentation and data processing from content.
7. what is Razor View Engine ?
Razor is the first major update to render HTML in MVC 3. razor was designed specifically for view engine syntax. main purpose of this would be to simplify and code for girls templating for HTML generation. below is the sample of using razor:
@model MvcMusicStore.Models.Customer
@{ViewBag.Title = “Get Customers”;}
<div class=”cust”> <h3><em>@Model.CustomerName</em> </h3>
8. What is the meaning of Unobtrusive JavaScript ?
this is a General term that conveys general philosophy, similar to the term REST ( Representational State Transfer) . Unobtrusive JavaScript code in your page markup.
Example: instead of using events like onclick and onsubmit, Unobtrusive JavaScript attaches to Elements by their ID or class based on the HTML5 data attributes. in a line
9. what is the use of ViewModel in MVC ?
ViewModel is a plane class with properties, which is used to bind it too strongly typed view. ViewModel can have the validation rules defined for its properties using the data annotations.
10. what do you mean by Routing in MVC ?
routing is a pattern matching mechanism of incoming request to the URL pattern which are registered in route table. Class- “URLRoutingModule” is used for the same process.
11. What are actions in MVC ?
Actions are the methods in controller class which is responsible for returning the view or JSON data. action will mainly have return type - “ActionResult” and it will be in work from method - “InvokeAction” called by the controller.
No comments:
Post a Comment