- MVC Framework - Home
- MVC Framework - Introduction
- MVC Framework - Architecture
- MVC Framework - ASP.NET Forms
- MVC Framework - First Application
- MVC Framework - Folders
- MVC Framework - Models
- MVC Framework - Controllers
- MVC Framework - Views
- MVC Framework - Layouts
- MVC Framework - Routing Engine
- MVC Framework - Action Filters
- Advanced Example
- MVC Framework - Ajax Support
- MVC Framework - Bundling
- Exception Handling
MVC Framework Online Quiz
Following quiz provides Multiple Choice Questions (MCQs) related to MVC Framework. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.
Q 1 - You have been given requirements for a dashboard page that will contain summary information from your order processing system in a single display table. However, this summarization needs to be done by combining data requests from the order system, the shipping system, and the accounting system. The dashboard page will be the only place you use this combined data. What is the best way to implement this requirement?
A - Make the various data requests and compile the information in the controller for display.
Answer : B
Explanation
B.You will have a better chance of code reuse if you break down the separate calls into their own models and then create another model to pull them together and compile them.
Q 2 - You are creating an ASP.NET MVC 4 web application that will be accessed by a large number of traditional consumers. If you need to be able to access state information on the client side in JavaScript/jQuery, where can you store it? (Choose all that apply.)
Answer : E
Explanation
E.Query string information is available across all browsers and is usable on both the client and server.Cookies can be stored for a period of time on the client and be read from either client- or server-side operations.
Q 3 - You are designing a web application. You want to create a certain look and feel while reusing styles across pages as much as possible. How should you handle styles?
A - Use only one or two styles throughout your application to simplify maintenance.
B - Use a specific (unique) style for every element.
C - Use general styles for common elements and specific styles for elements that are unique.
Answer : C
Explanation
C.You should use general styles as much as possible. Achieving a certain look and feel means that you might have to create some specific styles, however.
Q 4 - You are modifying an existing ASP.NET MVC web application to incorporate mobile access. What should you do to ensure that mobile devices view mobile-only pages? (Choose all that apply.)
A - Run the Install-Package jQuery.Mobile.MVC command using the Package Manager console.
B - Create a _Layout.Mobile.cshtml master layout page.
C - Create additional views with .Mobile, such as Index.Mobile.cshtml.
Answer : E
Explanation
E.This installs all the necessary mobile packages.All mobile views and mobile master layout ensure that the page will load accordingly.
Q 5 - You have a set of requirements that expects a particular action to be accessed only through HTTPS by an authenticated user. What is the best way to meet these requirements?
A - Use the Authorize attribute before the RequireHttps filter.
B - Use the RequireHttps attribute before the Authorize filter.
Answer : B
Explanation
B.It filters out those users not on an SSL connection before performing the more resource-intensive authentication check.
Q 6 - You are helping a client estimate the effort involved in adding comprehensive monitoring to an enterprise-level ASP.NET MVC application. Which of the following are useful considerations while building the estimate? (Choose all that apply.)
Answer : E
Explanation
E.Adding health monitors is an easy task. Determining which options pro- vide the information you need will be time-consuming because of the number of choices.Generic logging is a useful addition and can be added as items are refac- tored; it is not an all-or-nothing type of work.
Q 7 - You support hardware purchasing for an ASP.NET MVC application in your company. The application is finished, and the development team knows the number of intended users. Which approach will give the team the best understanding of the application's hardware needs?
Answer : C
Explanation
C.This approach will give them an objective analysis of the amount of users a server can manage at a particular level of memory or CPU usage
Q 8 - Why should you create a custom role provider? (Choose all that apply.)
A - To use a data source not regularly supported
B - To use the SimpleRoleProvider
C - To use a database design different than .NET provides
Answer : E
Explanation
E.Because traditional providers work only on SQL Server, accessing a differ- ent data provider such as MySQL would require a custom provider.Using a different database design would require that you create a custom provider.
Q 9 - What roles does a CA play in a PKI? (Choose all that apply.)
A - Serves the certificate for the web server
B - Validates the company or individual purchasing the certificate
C - Signs the certificate as authentic
D - Provides the Domain Name System (DNS) connections between the client and server
Answer : E
Explanation
E.The CA validates the company or individual.The CA signs the certificate
Q 10 - Whichtools is used for unit testing in MVC
Answer : A
Explanation
A.MOQ are used to perform unit testing in MVC.