Pts your javascript functions must not block or the

This preview shows page 7 - 9 out of 9 pages.

28. (1 pts) Your JavaScript functions must not block, or the browser UI will become unresponsive. A. True B. False
Explanation: Javascript is single-threaded. 29. (1 pts) Using JavaScript to validate user input in the browser saves you the duplication of validating that input on the server, thus helping DRY
Explanation: You can never trust the client/browser. 30. (1 pts) Since XmlHttpRequest is asynchronous, an event handler that wants to communicate state to the AJAX callback should do so via the global object
Explanation: You pass the results via the callback routine. 31. (1 pts) AJAX functionality can be tested even when the server side of the app is not running
32. (1 pts) The server's response to an AJAX request must consist of HTML A. True B. False Explanation: We showed XML (the X in AJAX) and JSON responses.
RottenPotatoes has just rolled out a new feature that lets you click on the name of an actor and then shows you all recent movies starring that actor. Next to the entry for The American, Ru clicks on George Clooney’s name. Below is a series of steps in the “life cycle” of what happens as a result of that click. Indicate which part of the overall SaaS system is primarily responsible for each step:
33. __ E___ (1 pt) Determine the IP address corresponding to RottenPotatoes.com 34. __ F___ (1 pt) Initiate HTTP connection to that IP address on port 80 35. __ F___ (1 pt) Determine which cookie(s), if any, correspond to RottenPotatoes.com
36. __ F___ (1 pt) Send URL of clicked link, and cookie(s) if necessary, to RottenPotatoes.com 37. __ D___ (1 pt) Convert incoming URL to appropriate method call in Ruby on Rails app 38. __ A___ (1 pt) Perform search for all movies containing actor George Clooney 39. __ C___ (1 pt) Determine which results will be shown (if there were matches for George Clooney) or whether an error message will be shown (if there were no matches) 40. __ B___ (1 pt) Construct XHTML page containing list of movies or the error message Explanation: DNS handles name resolution; browser initiates HTTP (request), looks up cookies, sends URL; routing calls controller method; model does search; controller makes decision on results; view constructs page.

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture