Download as pdf or txt
Download as pdf or txt
You are on page 1of 21

1) What is MVC?

A) MVC is a design pattern.it is used to develop applications

2) What is design pattern?


A) design pattern is a well defined solution for the problems that occurs
in software development in specific situations

3) What is MVC design pattern?


A) in MVC design pattern application development can be splitting into
3 modules
1) model
2) view
3) controller

4) What is model? & What is the role of model?


A) model is responsible for database related logic
in MVC application model will communicate with database. after
processing database operation model will return the result to
controller

5) What is view ? & What is the role of view?


A) view is responsible for presentation logic(ui logic)
view will get the data from controller and prepares output
6) What is controller? & What is the role of controller?
A) controller is responsible for application execution logic
every request will be received by controller only.
at the time of processing request ,controller will communicate with
either model or view based on processing request

7) draw the MVC diagram and explain dataflow ?


A)

in MVC user will send the request to controller .controller will


processing the request to either view or controller based on request
for example user will request the just login page controller will
communicate the view. view will prepare output based on login request
and view will passing the output to controller and controller will pass
the response to user .if user enter login id and password and press
enter again request will receiving by controller .controller will pass the
request to model because all data related logics in model. model will
communicate with database and return the result to controller
.controller will pass the data to view. view will prepare output based on
controller data and the output is passing to controller then controller
will respond the result to user

8) Write list of technologies that are using MVC design pattern?


A) Asp.net MVC (.net)
Spring MVC (java)
Structs MVC (java)
Ruby on rails mvs
Php MVC
Iphone os MVC (ios)

9) What is asp.net MVC?


A) asp.net MVC is a web framework. it is used to develop web
application by using MVC design pattern
In MVC based applications,
development process will be splitting into 3 Modules
1) model
2) view
3) controller

10) who was designed asp.net MVC &when?


A) asp.net MVC was introduced by scott in the year 2007
11) in which year onwards we are using MVC in .net?
A) 2009 onwards

12) write list of asp.net MVC versions with years?


A) ASP.NET MVC 1.0 ---------- 2009
ASP.NET MVC 2.0 ---------- 2010
ASP.NET MVC 3.0 ---------- 2011
ASP.NET MVC 4.0 ---------- 2012
ASP.NET MVC 5.0 ---------- 2013
ASP.NET MVC 5.2 ---------- 2014
ASP.NET MVC 6.0 ---------- 2015

13) asp.net MVC vs asp.net webforms?


a) is asp.net MVC is replacement of asp.net webforms?
A) no
b) is asp.net MVC is next generation of asp.net webforms?
A) yes
14) is MVC is part of .net? &Why?
A) no , MVC is a design pattern which is following by asp.net
developers which can be called as asp.net MVC
15) Why asp.net MVC? (or) What are the features of asp.net MVC (or )
What are the advantages of asp.net MVC instead of asp.net web forms?
A) because of below 10 advantages we can go asp.net MVC instead of
asp.net web forms
1) Saparation Of Code
2) Lossely Coupled (Less Dependency)
3 )Parallel Development
4) Easy To Perform Unit Testing
5) Tdd Support(Test Driven Development)
6) Clear/Clean Urls
7) Improved Performance
8) More Controlling On Html(Design)
9) Added New Concepts
10) Easy To Learn And Easy To Implement

16) What is saparation of code in asp.net MVC?


A) MVC based applications are saparates the model(database logic)
from view(presentation logic)
Due to this saparation of code application development can be easily
Single application development can be splitting into 3 modules
17) What is less dependency (or) lossely coupled in asp.net MVC?
A) in MVC based applications view are less dependent on models
This two modules(view &model) are organized by controller due to
this feature you can easily update the required module without
effecting other module

18) What is parallel development is asp.net MVC?


A) in asp.net MVC one team can develop model and other team can
develop view due to this application development process will be
Continuous parallaly
Due to this feature application development will be faster and easy

19) how in asp.net MVC easy to perform unit testing?


A) in asp.net MVC application development will be splitting into 3
modules they are model, view, controller
Because of this we can easily perform unit testing on particular module

20) What is tdd support in asp.net MVC?


A) TDD stands for test driven development
It is latest development technique
In TDD, tests will provide guidelines to the developers
Testers will provide new features (or) options to development
continuously
MVC applications are more comfortable to modify at any point of time
without effecting entire project

21) What is clear &clean urls in asp.net MVC?


A) MVC applications are using urls based on controllers
Beacause all MVC urls are controller based not file based
All asp.net web forms urls are file based
MVC urls are called as clean/clear urls. because it can contain less no
of characters (query srting, file extention) in url
Due to this feature search engine optimization will be easy
Example for asp.net webforms url
1) /products.aspx
2) /product.aspx?cat=5&&sum=70
Example for asp.net MVC urls
1) /producs
2) /products/shirts
3) /products/shirts/men

22)how asp.net MVC will improve the performance of the web


application?
A) compare to asp.net web forms application ,asp.net MVC application
will provide more performance
In asp.net webforms application process the webpage with lot of
activities they are
1)page events
2) server side control objects
3)load request data
4)process the values
5)converting html and ……..
Due to this behavior asp.net webforms execution will be time
consuming and add extra burden on the server
Asp.net MVC does not perform all the above activities, because it
doesn’t support server side controls due to this reason processing will
be more faster

23)how in asp.net MVC we can have more controlling on html?


A) in asp.net MVC view(ui logic) will be developing with the help of html
Due to this reason we can easily integrate client side libraries with MVC
views
Example for client side libraries— jquery, angularjs , bootstap etc….

24)What are the newly added concepts in asp.net MVC?


A) in asp.net MVC new concepts are added to make web application
development will be more comfortable
Those concepts are
1)filters
2)routing
3)attribute
4)WEB API
5)scaffold templates and……

25) how asp.net MVC easy to learn and easy to implement?


A) asp.net MVC developed based on existing .net
While developing the asp.net MVC application we can reuse the most
of the c#.net &asp.net webforms concepts

26)What are the sub templets we have under asp.net MVC web
application?
A) 1) empty
2) basic
3) internet application
4) intranet application
5) mobile application
6) web api
7) single page application

27) which template is suitable for biggeners?


A) basic
28) What are the difference between basic and empty tempates?
A) Empty and basic templets are same but the difference is
basic template can contain extra 2 folders they are
1)content(.css files)
2)scripts(.js files)

29)What is the difference between internet application and intranet


application?
A)internet application can use anyWhere in the world,it can contain
“n” number of users
Internet application can contain different group of information
Ex:fb,gmail
Intranet application can use only with in the organization, it can
contain limited users
Intranet application can contain only specific group information
Ex: institutes,organization …

30)What is the difference between asp.net MVC internet application


and asp.net MVC intranet application ?
A) in asp.net MVC internet application same as asp.net MVC intranet
application .but the difference is internet has forms authentication
security and intranet has windows authentication security
31)which authentication will be following by the asp.net MVC internet
application?
A) forms authentication

32) which authentication will be following by the asp.net MVC intranet


application?
A) windows authentication
33) What we can do by using web API?
A) by using web API we can create web services by using MVC design
pattern
34)WHAT WE CAN DO BY USING WCF?
A)By using wcf we can develop normal web services
35) What is the difference between WCF & web API?
A) using WCF we can develop normal web service ,using WEB API we
can develop web service by using MVC design pattern. web api services
are called as http services
36) IN .NET which services are called as http services?
A) WEB API Services
37) Why web API services are called as http services?
A) Because which uses only http Protocal
38) which Protocal is use by web API services?
A) http Protocal
39) write the list of the folders which will come in basic MVC
application?
A) there are 6 important folders come with basic mvc application
1)App_Start
2)Content
3)Controllers
4)Models
5)Scripts
6)Views

40) What App_Start folder contains?


A) this folder can cointain apppilication start up related files
41) list out the default files with in app_start folder contains?
A) By default this folder can contain 4 c# files
1] BundleConfig.cs
2] FilterConfig.cs
3]RouteConfig.cs
4]WebAPIConfig.cs
42) Where we will define default controller?
A) RouteConfig.cs
43) What is the importance of routeconfig.cs file?
A) in this file we will have details about default controller
44)What contant folder may contain?
A) contant folder contain all CSS files
45)Where we should add application startup setting related files?
A) APP_START Folder
46)Where we should add css files?
A) Content folder
47)Where we shoud add image files?
A) Content folder
48) What controller folder may contain?
A) this folder can contain all controller class files(.cs)
49)can I have multiple controllers? Or can I put multiple controllers in
controllers folder?
A) yes

50) What models folder can contain?


A) this folder can contain database logic related c# files(.cs)
51) What is extention of model files?
A) .cs
52) which code we will write with in the model files?
A) ado.net code or entity framework code
53) What scripts folder can contain?
A) it contain client side scripting files(.js)
54)What files by default with in the script folder?
A) jquery related files
55) Where we should add user defined client side scripting files?
A) scripts folder
56) What views can contain?
A) this folder can contain html webpages
57)how to develop a views in asp.net MVC?
A) in mvc views are developed with both c# code
and html tags
58) What is the extention of views in asp.net MVC?
A) .cshtml
59) what are the responsibilities of controller?
A) mainly controller has 4 responsibilities they are
1) Receiving the request
2) process the request by executing action method ,to communicate
With model or to communicate with view
3)executes the corresponding view
4) sending the response

60) when controller will communicate with model?


A) At the time of execution of action method, controller will
communicate with model based on requirement.
61) what is controller?
A) controller is a class
62) can we have create multiple controllers in u r controller folder?
A) yes
63) what controller class will contain?
A) corresponding Action method
64) is home controller is user defined or predefined class?
A) user defined
65) what is the super class for all user defined controller classes?
A) controller class
66) what is the namespeace for predefined controller class ?
A) System.Web.Mvc
67) write the inheritance hierarchy of all controller classes?
A) inheritance hierarchy of all controller classes

68) what is the base class for predefined controller class?


A) ControllerBase
69) is predefined Controller class and predefined controllerBase class
are what type of classes?
A) abstract classes
70) what is the super class for ControllerBase class?
A) Icontroller
71) what is Icontroler?
A) interface
72) what is the highest super class for all controller classes?
A) Interface
73) what action method can contain?
A) Action method can contain request processing logic
74) write the syntax of action method?
A) public ActionResult Index()
{
return View();
}
75) can I write action method as a static method?
A) no ,by default action methods are non static
76) what is the access modifier of action method?
A) public
77) what is the return type of index method?
A) ActionResult
78) which method is calling by index method?
A) View() method
79)what is the return type of view method?
A) ViewResult
80) is view method is a user defined or predefined?
A) predefined,
It is predefined member method of predefined controller class
81) what is view result?
A) ViewResult is a predefined class
82) write the derived classes of action result classes?
A) abstract class ActionResult
{
}
class ViewResult :ActionResult
{
}
Class RedirectToRouteResult:ActionResult
{
}
class ContentResult:ActionResult
{
}
class JsonResult:ActionResult
{
}
class FileResult:ActionResult
{
}
.............etc

83) what is action result?


A) ActionResult is a predefined abstract class, it is parent class(super
class) for all result classes
84)write the types of action methods?
A) Action methods are 3 types they are
1) Action method with view result
2) Action method with non view result
3) non action methods
85)what is action method with view result?
A) Action methods that will return view page(webpage) as output
86)what action method with view result will retun?
A) view page(webpage)
87)what is action method with non view result?
A) Action method that will return data instead of html formatted
output(webpage)
88)what action method with non view result will return?
A) Data
89)what is non action method?
A) A method that should access with in the controller which is not for
end users that can be called as non action methods
90) which attribute we will use to define non action method?
A) [NonAction]
91) in which programming we will use action methods with non view
result?
A) Ajax Programming
92) what is an attribute?
A) every Attribute in asp.net mvc is a predefined class ,Attributes in
mvc are used to provide a special instruction to execution engine. So
that it will be handled saparately
93) how attribute is defined by Microsoft?
A) Microsoft has defined all asp.net mvc Attributes as a predefined
classes with in a base class library called System.Web.Mvc
94) what is base class library or namespeace for attribute classes in
asp.net mvc?
A) System.Web.Mvc
95)write the list of predefined attribute classes?
A) NonActionAttribute
HttpGetAttribute
HttpPostAttribute
……so on
96)where we will write the attribute?
A) At the top of method definition (or) property definition (or) class
definition .
97)which attribute we will use to define a non action method?
A) [NonAction] attribute
98)which will executes the views in asp.net?
A) View Engine
99)what is view engine?
A) View engine is SubSystem of MVC framework . it will executes the
view pages saparatly
View engine separately(independently) process the views
100)what are the view engines supported by asp.net mvc?
A) they are 2 view engines
1) webform(aspx) view engine
2)Razor engine

You might also like