Indian Institute of Technology Madras
BS Degree Programme · Examination & Study Paper
Modern Application Development II
End Term · 22 Dec 2024 (Afternoon)
Examination Instructions & Guidelines
- Solve on notebook/paper first before checking solutions.
- MCQ: Exactly 1 option is correct. Negative marking applies.
- MSQ: One or more options correct. Select all to score.
- Scientific calculator allowed for all calculations.
- Official answer key is sealed at the end of this sheet.
- Q1MCQ3 Marks·Choose one option

- Asecure=False and samesite='Strict'
- Bsecure=True and samesite='None'
- Csecure=True and samesite='Strict'
- Dsecure=False and samesite='Lax'
- Q2MCQ3 Marks·Choose one option
Which of the following is true regarding long polling?
- ALong polling opens multiple connections between the client and the server, and the server continuously sends updates to the client in real-time.
- BLong polling allows the client to make a single request to the server, where the server holds the connection open until new data is available and then sends the response.
- CLong polling involves the client repeatedly sending requests at fixed intervals to the server to check for updates, regardless of whether new data is available.
- DLong polling uses WebSockets to maintain a persistent, bidirectional connection between the client and the server.
- Q3MCQ3 Marks·Choose one option

- A

- B

- C

- D

- A
- Q4MCQ3 Marks·Choose one option
What will be the output on the console?- A7
- Berror
- Cundefined
- Derror4
- Q5MCQ3 Marks·Choose one option

- ABegin, Start, 5, End, Finish
- BBegin, Start, Finish, 5, End
- CBegin, Finish, Start, 5, End
- DBegin, Finish, Start, End, 5
- Q6MCQ3 Marks·Choose one option

- A

- B

- C

- D

- A
- Q7MCQ3 Marks·Choose one option

- AThe paragraph with the text “This paragraph is hidden” will be displayed.
- BThe paragraph with the text “This paragraph is visible” will be displayed.
- CBoth paragraphs will be displayed because of the v-if and v-else bindings.
- DNo change will happen, since v-if and v-else do not update the DOM.
- Q8MCQ3 Marks·Choose one option

- A

- B

- C

- D

- A
- Q9MCQ3 Marks·Choose one option

- A

- B

- C

- D

- A
- Q10MCQ3 Marks·Choose one option

- AHome
- BProfile
- CSecurity
- DSettings
- Q11MCQ3 Marks·Choose one option

- AThe new value will be stored in session storage, and the “userName” data property will be updated.
- BThe new value will be stored in session storage, but the “userName” data property will be reset to an empty string on page refresh.
- CThe “userName” data property will be reset to an empty string, and the session storage value will be ignored on refresh.
- DThe “userName” data property will not be updated in session storage because session storage doesn't persist across refreshes.
- Q12MCQ3 Marks·Choose one option

- AII, III, I
- BIII, I, II
- CIII, II, I
- DI, II, III
- Q13MCQ2 Marks·Choose one option
Which of the following statements is FALSE?
- ACache-Control: no-store prevents caching
- BData stored in sessionStorage remains available even after the browser is closed and reopened.
- CETag helps validate cache freshness
- DlocalStorage has larger storage limit than cookies
- Q14MCQ2 Marks·Choose one option
Which of the following statements is false when using the “async” and “await” keywords in JavaScript?
- AThe “await” keyword can only be used inside an async function.
- BThe async functions run synchronously, but their await statements execute asynchronously.
- CThe “await” keyword pauses the execution of the surrounding async function until the promise resolves.
- DThe async functions always return a promise, even if the return value is not a promise.
- Q15MCQ2 Marks·Choose one option

- A

- B

- C

- D

- E

- A
- Q16MCQ2 Marks·Choose one option
You have a Celery task send_email that needs to run every 10 minutes. How can you schedule it?
- AUsing @app.task_periodic to run the task every 10 minutes.
- BUsing @app.on_periodic to schedule a periodic task.
- CUsing Celery Beat to schedule periodic tasks.
- DCelery doesn't support scheduling tasks at fixed intervals; you need to use an external scheduler.
- Q17MCQ4.5 Marks·Choose one option

- A

- B

- C

- D

- A
- Q18MCQ4.5 Marks·Choose one option

- AThe increment mutation will be called immediately after the dispatch.
- BThe incrementAsync action will be executed synchronously, and increment will be committed before the promise resolves.
- CThe state will be updated after the asynchronous operation completes.
- DThe action will be skipped since mutations cannot be called inside actions.
- Q19MCQ4.5 Marks·Choose one option

- AThe watcher will be triggered and log "User object changed: { name: 'Bob', age: 30 }".
- BThe watcher will not be triggered because “name” is a nested property of “user” object.
- CThe watcher will be triggered, but it will only log the new “name” value, i.e., “Dev”, and not the entire user object.
- DThe watcher will throw an error because deep watching is not supported on nested objects.
- Q20MCQ4.5 Marks·Choose one option

- A[2, 4, 6]
- B[2, 4, 6, 8]
- C[4, 8, 12]
- D[2, 4, 6, 16]
- Q21MCQ4.5 Marks·Choose one option

- ARequired
- BInvalid format, Email exists, Required
- CRequired, Email exists
- DValidating..., Required
- Q22MCQ4.5 Marks·Choose one option

- A

- B

- C

- D

- A
- Q23MCQ4.5 Marks·Choose one option

- AThe task will immediately execute and print the result 'Task completed'.
- BThe task will execute asynchronously, and 'Task completed' will be printed after a 10-second delay.
- CThe task will execute synchronously, blocking the main thread for 10 seconds.
- DNone of these
- Q24MCQ4.5 Marks·Choose one option

- A

- B

- C

- D

- A
- Q25MSQ2 Marks·Choose all correct options

- A

- B

- C

- D

- A
- Q26MSQ2 Marks·Choose all correct options
Which of the following statements are true about Lighthouse?
- ALighthouse measures various performance metrics, including Time to Interactive and Speed Index.
- BLighthouse generates a single score for UI design only.
- CIt can emulate network throttling and device types during performance evaluation.
- DLighthouse focuses exclusively on performance and ignores accessibility.
- Q27MSQ2 Marks·Choose all correct options
Which of the following statement(s) is/are correct regarding the behavior of local storage in Vue.js applications?
- AThe local storage data persists even after the browser is closed and reopened.
- BThe local storage data is automatically cleared every session.
- CThe local storage can only store strings, and storing objects requires manual serialization and de-serialization.
- DVue's reactivity system automatically updates the local storage when bound to a Vue data property.
- Q28MSQ2 Marks·Choose all correct options

- AThe class, namely “classB” will always be applied to the div element.
- BThe classes, namely “classA” and “classB” will always be applied to the div element.
- CThe class, namely “classA” will only be applied to the div element, if the variable “isClassA” evaluates to true.
- DThe class, namely “classB” will only be applied to the div element, if no variable with name “isClassA” exists.
- Q29MSQ3 Marks·Choose all correct options
Which of the following statements correctly describe the use of asynchronous messaging systems and frameworks?
- ACelery allows web servers to offload long-running tasks to worker processes, decoupling task execution from user requests.
- BPush queues are used for real-time operations, while pull queues are better suited for batch processing.
- CServer-Sent Events (SSE) provide a persistent connection between server and client, enabling bi-directional communication.
- DRedis is a high-performance in-memory database that supports Pub/Sub.
- Q30MSQ3 Marks·Choose all correct options
Which of the following statement(s) is/are true about Webhooks?
- AA Webhook is a method for a server to send real-time data to another server as an HTTP POST request.
- BWebhooks are typically used for sending periodic updates at regular intervals.
- CA client must continuously poll a Webhook URL to receive data.
- DWebhooks are usually used in event-driven architectures, where an event triggers an HTTP POST request to a specified endpoint.
- Q31MSQ3 Marks·Choose all correct options
Which of the following statement(s) is/are true regarding Server-Sent Events (SSE) and WebSockets?
- ASSE is a two-way communication protocol, while WebSockets are unidirectional.
- BWebSockets are more suited for scenarios requiring bi-directional communication.
- CSSE is based on HTTP and can only be used for server-to-client communication, while WebSockets are based on TCP and support both directions.
- DSSE is an extension of WebSockets, providing enhanced support for server-to- client communication.
- Q32MSQ3 Marks·Choose all correct options
Which of the following is/are typical use case(s) for Celery tasks?
- AProcessing time-consuming or resource-intensive background jobs asynchronously.
- BDirectly handling incoming HTTP requests in web servers.
- CScheduling periodic tasks like sending emails or cleaning up the database.
- DServing real-time notifications over WebSockets.