nerdexam
Google

PROFESSIONAL-CLOUD-DEVELOPER · Question #66

You are writing a single-page web application with a user-interface that communicates with a third-party API for content using XMLHttpRequest. The data displayed on the UI by the API results is less c

Sign in or unlock PROFESSIONAL-CLOUD-DEVELOPER to reveal the answer and full explanation for question #66. The question stem and answer options stay visible for context.

Building and Testing Applications

Question

You are writing a single-page web application with a user-interface that communicates with a third-party API for content using XMLHttpRequest. The data displayed on the UI by the API results is less critical than other data displayed on the same web page, so it is acceptable for some requests to not have the API data displayed in the UI. However, calls made to the API should not delay rendering of other parts of the user interface. You want your application to perform well when the API response is an error or a timeout. What should you do?

Options

  • ASet the asynchronous option for your requests to the API to false and omit the widget displaying
  • BSet the asynchronous option for your request to the API to true and omit the widget displaying the
  • CCatch timeout or error exceptions from the API call and keep trying with exponential backoff until
  • DCatch timeout or error exceptions from the API call and display the error response in the UI

Unlock PROFESSIONAL-CLOUD-DEVELOPER to see the answer

You've previewed enough free PROFESSIONAL-CLOUD-DEVELOPER questions. Unlock PROFESSIONAL-CLOUD-DEVELOPER for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Topics

#Asynchronous Programming#Web API Integration#UI Performance#Error Handling
Full PROFESSIONAL-CLOUD-DEVELOPER Practice