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 - A significant change has been requested in an application maintained within your company. The application is a classic ASP application that uses custom Open Database Connectivity (ODBC) drivers to connect to a relational data repository on a mainframe computer. The CIO decided that the company needs to replace this 30-year-old system. The team that worked on the original project is made up of developers who have never worked with an object-oriented approach before. Which approaches would be the best to use when designing your initial schema in Entity Framework? (Choose all that apply.)
C.The use of the Entity Designer as an integral component in the Model First approach will help unfamiliar users to walk through the process.The use of the Entity Designer as an integral component in the Model First approach will help unfamiliar users to walk through the process.
Q 2 - You are adding a reporting vertical to an enterprise application. Many of the reports will be run every morning by a set of users. Some of the reports will be identical as every member of a team will get the same report sometime in the morning. What kind of caching will provide an improvement in performance? (Choose all that apply.)
E.Data caching with the appropriate timeout will enable the data needed for the reports to be stored so that the call to the database is not necessary.A page output caching of four hours caches the output of the report for the whole morning and should eliminate the need for the report to be run a second time.AppFabric caching acts much like data caching to eliminate the need for additional calls to the database to generate the reports.
Q 3 - What are compelling reasons to switch from static web content to dynamic web content? (Choose all that apply.)
E.Displaying data from a database is an ideal reason to use a dynamic website.Personalization, or displaying information about the user on-screen, is an example of dynamic content.
Q 4 - You have been asked by a company to evaluate its web application as a user. The company wants you to review the website from outside its network and identify areas that might be problematic. You have been asked to consider SEO and accessibility. Which tools would be helpful for your review? (Choose all that apply.)
B.The Internet Explorer F12 tool enables you view HTML and CSS code, which can help you detect structural problems or errors that might affect acces- sibility or SEO.
Q 5 - Your application manages the sale of expensive well-drilling equipment. Your IT director wants you to add functionality that sends an email to a customer's sales account manager whenever someone from your client company logs in to the system. What is an appropriate solution?
A - Override the AuthorizeAttribute and apply it to the login action. Run the base method first to handle the authentication and then evaluate the status of the request. If the user is a customer, send the email.
C - Override the AuthorizeAttribute that is applied to the login action, check for the user's authentication status, and determine whether it is a customer prior to sending it to the base authentication method.
D.This is be applied only because the user is leaving the login section of the application, at which point you also know whether they have been authenticated
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 - You will be deploying your application in Windows Azure. You know that you need to include logging, but you have some concerns. What diagnostic capabilities can Windows Azure support? (Choose all that apply.)
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.
Q 8 - What attribute or code snippet within a controller enables a role named Admin to access actions or code blocks after the check-in code?
B.The Authorize attribute handles authorization on a controller and/or action basis by using the Roles= qualifier
Q 9 - You are writing an action method called AddProduct inside the Product controller. The logic in your code indicates that you need to call the Cart controller's Add method as a result of your controller's action method. Which line of code would accomplish this?
C.This will redirect to the Add method of Cart controller
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