Question 82


2.2.2 Question

Multiple Choice

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 company’s 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?

  • A. Use JavaScript to refresh the page every 15 minutes and to manage whether wizard buttons are enabled or disabled.
  • B. Use AJAX to make asynchronous calls to the server on a timer for the stock price and to automatically save the base objects as the user navigates through the wizard.
  • C. Use jQuery to refresh the page every 15 minutes and to manage whether wizard buttons are enabled or disabled.
  • D. Use data validation annotations on the model to ensure that the stock price is validated every 15 minutes and that the client saves the base object information after every wizard step.

Answer:

B
Explanation
A. Incorrect: This approach will update the stockticker, but enabling and disabling the wizard buttons will not ensure that the base objects are saved.
B. Correct: 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.
C. Incorrect: This approach will update the stockticker, but enabling and disabling wizard buttons will not ensure that the base objects are saved.
D. Incorrect: Data validation annotations will not meet any of the requirements.