MVC Framework Online Quiz


Advertisements


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.

Questions and Answers

Q 1 - You are designing an application in which a section of the main page will be populated by content from a third-party provider. You do not have control over the responsiveness of the client or how much information will be returned with each request. The call is to a Restful service and will return the information formatted in Extensible Markup Language (XML). What is the best way to implement this application?

A - Design a model that handles the data call to populate the model. Create a partial view containing only this display area and put an asynchronous service call that returns this model in the partial view controller.

B - Put a synchronous service call into the main page controller.

C - Create a partial view containing only this display area and put a synchronous service call in the partial view controller.

D - Create a partial view containing only this display area and put an asynchronous service call in the partial view controller.

E - A and D both

F - All of the above

Answer : A

Explanation

A.Because you do not have control over the responsiveness of the third- party provider and you do not know how much data might be returned from each call, you should wrap the call in the asynchronous framework. Providing the data in a strongly-typed model gives it more flexibility than working with the raw XML on the client side.

Q 2 - You are creating a solution in which the majority of the application is dynamic, but some areas can be cached for a long time. What kind of approach would you take? (Choose all that apply.)

A - Data caching

B - Donut hole caching

C - Donut caching

D - Windows AppFabric caching

E - B and C both

F - All of the above

Answer : E

Explanation

E.Donut hole caching provides the ability to cache parts of each page.Donut caching is another approach that gives the ability to cache parts of the application.

Q 3 - When you are creating a custom handler, what is the parameter being passed into the ProcessRequest method?

A - object, EventArgs

B - HttpApplication

C - HttpContext

D - Object

E - A and D both

F - All of the above

Answer : C

Explanation

C.The ProcessRequest method takes the HttpContext parameter.

Q 4 - You want to support the Internet Explorer, Firefox, and Opera web browsers in your application. Which vendor-specific extensions do you need to include with CSS3 properties? (Choose all that apply.)

A - webkit-

B - ms

C - o

D - hp

E - moz

F - B , D and E

Answer : E

Explanation

E.The -ms- prefix is used for Internet Explorer. The -o- prefix is used for the Opera browser.The -moz- prefix is used for Mozilla Firefox.

Q 5 - You are creating an ASP.NET MVC website and you want to replace a <h2>hello</h2>tag within the view with custom resources you have created. What should you use?

A - <h2>@mvcapp.Resources.Home.Index.Heading</h2>

B - <h2div="resource">Hello</h2>

C - <h2 class="resource">Hello</h2>

D - <h2>@mvcapp.Resources.Home.Index.HeadingHello</h2>

E - C and B both

F - All of the above

Answer : A

Explanation

A.This is the correct way to insert resources into a view

Q 6 - You are working on a AJAX-heavy site, and your script files are separated in your solution by function. You have already implemented minification and bundling, but you are still getting reports of poor performance when users try to access your pages. You cannot replicate the problem locally. What additional steps can you take and still provide the same user experience?

A - Compress all scripts locally and have the users download the compressed files rather than the uncompressed files.

B - Turn IIS compression on, turn on the option to compress dynamic pages, and set the minimum file size to 0 so that every file served will be compressed.

C - Turn IIS compression on, disable dynamic page compression, and set the minimum file size to the size of your smallest bundled script file.

D - There is nothing more to do without redesigning the site.

E - A and C both

F - All of the above

Answer : C

Explanation

C.This is an appropriate next step to try to compress the script and style files being sent to the client.

Q 8 - WIF adds the concepts of claims to which of the following? (Choose all that apply.)

A - IIdentity

B - IPrincipal

C - User

D - MembershipProvider

E - A and B both

F - All of the above

Answer : E

Explanation

E.The class implementing the IIdentity interface contains claims information. The class implementing the IPrincipal interface contains claims information.

Answer : E

Explanation

E.The CA validates the company or individual.The CA signs the certificate

Q 10 - Which Action Result Renders a partial view, which defines a section of a view that can be rendered inside another view?

A - ContentResult

B - RedirectResult

C - PartialViewResult

D - None of above.

E - C and D both

F - All of the above

Answer : C

Explanation

C.PartialViewResult


mvc_framework_questions_answers.htm

Advertisements
E-Books Store