Question: 1. A simple internet forum allows users to log in, to start threads, to post replies in existing threads, to view a thread and all
1. A simple internet forum allows users to log in, to start threads, to post replies in existing threads, to view a thread and all its replies, to view a list of all threads, and to search all of the posts that have been made.
(a) If you created such a forum using an MVC framework, name the two models that, even from this short description, you can infer would be needed. [2 marks]
(b) Explain how, if you created such a forum using an MVC framework, the view a thread and all its replies controller action would use the relevant model and view. Make sure you discuss what the model, the view and the controller would do in your answer. [6 marks]
(c) Which of the activities described above would, if you follow best practice, require you to use the HTTP POST method, and which the HTTP GET method when passing data to the various server-side scripts? [6 marks]
(d) The forum uses sessions to track logged in users. Discuss how a session cookie is set in the users browser, sent to the webserver, or used by the server-side script at each of these stages of the login process:
(i) The user visits the login page (for the first time) [2 marks]
(ii) The user submits their (valid) login details to the server [2 marks]
(iii) The (now logged in) user starts a new forum thread [2 marks]
(e) You decide to enrich the forums ability search all of the posts that have been made using AJAX to have the search box autocomplete. Explain briefly how the AJAX request would be triggered, what data it would submit to the server, what sort of response the server would give, and what the client-side script would do with this response.
(a) Three approaches to adapting web content for display on different devices are shown below. For each approach, describe what it means and give an example of how it might be implemented. (i) Client-side. [6 marks] (ii) in-network [6 marks] (iii) Server-side [6 marks] (b) Describe, with examples, the aspects of a web page which might need to be altered using the above approaches to optimise the page for different devices. [7 marks]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
