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.

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.

Answer : C

Explanation

C.You handle the mapping of the request in the MapRequestHandler.

Answer : F

Explanation

F.You should build in validation to check that at least one field has been populated before saving an entry.Although the partner company has not provided any requirements, your company is responsible for data entry and therefore should ensure that the data passing through the application meets some minimum criteria.The application has many entry fields so it is difficult to predict when an entry hits a valid stage. However, you already know you have constraints on the data being input because of the size of the database columns in which you will be storing them. A MaxLength validator on each field would help ensure that there is no loss of data.Although either field in the form can be anything, they should have a maximum length limit imposed so the data does not exceed the size of the database column they will be stored in. You should also validate that neither field is empty.

Answer : C

Explanation

C. Text revealed by mouse-overs not being picked up by search engine crawlers indicates that content is being skipped

Answer : D

Explanation

D.The key is separating your data input fields from the provided input fields. You can strongly-bind to yours because you have full control over the relationship between your model and your view, and can then use the ToValueProvider to merge the other model that is tied to the provided input fields.

Q 6 - Your application has an intermittent issue, based on the user's path through the application, in which the application seems to stop running. Even when running in debug mode, the application calls a web service and then stops. The application locks and the call never returns, thus the user's request is never completed and eventually times out. What performance or profiling tool will provide the most pertinent information about your application?

A - CPU sampling in the Performance Wizard

B - Memory allocation in the Performance Wizard

C - Resource contention data in the Performance Wizard

D - Tracing from the System.Diagnostics namespace that logs the times of web service call and web service return

E - The Health Monitoring tool, for capturing security information related to the interaction with the web service

F - A and D both

Answer : C

Explanation

C.Thread and resource profiling will give some understanding of what kind of actions are taking place that will cause a resource or thread to be blocked

Answer : E

Explanation

E.You can control the diagnostics setting through configuration within your Windows Azure–hosted application.Although the Windows Azure VMs get recycled when the role restarts, saving the logs to the Windows Azure storage system outside of your VM would ensure that they are available.You can treat the Windows Azure diagnostics system like a traditional logging tool by writing messages to the system.

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.

Answer : E

Explanation

E.The AntiXSS Library is more performant than the traditional .NET Framework.AntiXSS takes an accepted-list approach, which means only those characters that have been approved are allowed through.AntiXSS was designed to allow additional support for globalization.

Answer : A

Explanation

A.Strongly typed views are created with model class

mvc_framework_questions_answers.htm
Advertisements