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?
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 designing an ASP.NET MVC 4 application that uses an Oracle database for persistence. What session configuration choices enable you to deploy your application on a web farm? (Choose all that apply.)
E.Using a shared state server across the web farm is an available option. Using a state server designates one server to maintain state for all the servers that connect to it.A custom session provider enables you to maintain state as necessary by doing the work in your custom code. It is generally used when you try to use a dif- ferent RDBMS system or when you do not want to use the default session database design.
Q 3 - Your team is building an application and you are reviewing the functional specifications. Your team must include a stockticker in the UI that displays the companys stock price every 15 minutes, and include the capability to do partial saves of base objects as users step through a data entry wizard. You want to use the same approach for both requirements to make it easier to add functionality and maintain it going forward. What approach should you use?
B.The best way to solve this issue is to use AJAX to do asynchronous calls to check the stock price as well as manage the save process through the wizard.
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.)
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?
B.It filters out those users not on an SSL connection before performing the more resource-intensive authentication check.
Q 6 - You are adding the capability for users to customize their site's display colors. You are required to provide a slider that enables users to change each RGB element. What can you do to ensure that this gets treated in the model and stored in the database as a single RGB color? (Choose all that apply.)
E.This solution works because it combines the three discrete values into a single object on the model.Although it takes more work, using an approach of creating a model binder for the entire object, rather than just a part, successfully manages the need to have it in the model and in the database.
Q 7 - Your ASP.NET MVC web application has just been released to a group of pilot users. The users are reporting periods of extreme performance degradation. You did not encounter performance issues during development or the quality assurance phase. What can you do in your development environment to understand what is occurring in the production environment?
D - Create a set of web tests that exercise the application. Using a goal-based approach, set the process to run to 75 percent CPU utilization. When you reach that point, compare the results with the number of users in the pilot program.
C. Starting from a midlevel count of users and then increasing to the total number of possible numbers should give you an idea of what is happening during the day-to-day running of the application in production
Q 8 - WIF enables you to create a custom token. To be able to use the token, you must create a custom token handler by overriding which of the following?
B.SecurityTokenHandler is the appropriate class to override for creating a custom token handler
Q 9 - You are developing an ASP.NET MVC 2 application. A view contains a form that allows users to submit their first name. You need to display the value that is submitted, and you must ensure that your code avoids crosssite scripting. Which code segment should you use?
B.<%: Model.FirstName %> avoids cross site scripting
Q 10 - Which Helper Method Returns binary output to write to the response?
B.File Helper Method Returns binary output to write to the response