Web App Development 2

1. What sequence of commands would you issue to upload and share your new source code in a GitHub repository? You can assume the added code won’t cause a conflict with existing code.

2. At a high-level, we have two kinds of architecture to consider in web application development: Information Architecture and System Architecture. Which of the follow statements best describes the role of Information Architecture. Information Architecture is concerned with:

3. Building web applications involves an array of challenges and complexities, these include:

4. The responsibilities of the middleware include: (select option where all correctly apply):

5. When using HTTP, two methods are commonly used. Select the statement that best describes what each method does.

6. Asynchronous JavaScript and eXtensible Markup Language (also known as AJAX) is a useful combination of technologies, which enables the web app to: (select the statement that best applies).

7. Developing web applications typically involves developing distributed applications that run on web browsers. What are the problems and benefits associated with developing applications in such an environment?

8. Web Application Frameworks have both benefits and drawbacks, which of the following statements best enumerates the benefits and drawbacks:

9. Most web application frameworks make use of the Model View Controller architecture (or some variant of). What are the advantages and disadvantages of the MVC architecture. Select the statement that best applies.

10. An N-Tier architecture creates a number of problems for developers, but also provides a number of benefits:

11. CSS stands for:

12. Which CSS selector applies to all h2 tags within a class called "yellow":

13. Which CSS selector applies to all div tags within the ID called "red":

14. This question uses the following code:

p {
background-color: yellow;
border: 1px solid black;
}
p #blue {
background-color: blue;
}

Given the HTML code shown below how would the element be rendered:
<p><p id="blue">Hello World</p></p>

15. This question uses the following code:

p {
background-color: yellow;
border: 1px solid black;
}
p #blue {
background-color: blue;
}

Given the HTML code shown below how would the element be rendered:
<p><p class="blue" style="background-color: green">Goodbye World</p></p>

16. Which line of JQuery code selects the element with a class red and assigns an event to when the element is clicked:

17. Which line of code selects a paragraph element with the class "blue", and assigns a hover event to it, such that on hover the text turns "green", and off hover it turns "red".

18. The structure of Uniform Resource Locator structure is as follows:

19. REST and SOAP provide different ways for exchanging structured information. However, they both have advantages and disadvantages. Select the statement that best applies.

20. What is the role of XML on the web? Select the statement that best describes the role of XML on the web.

21. Which of the following HTML TAGS is used at the start of a list item element?

22. What command would you issue to download an existing GitHub repository (that you have not downloaded before)?

23. Which of the following design philosophies does Django adhere to?

24. Suppose that Question is a model that is used to represent a multiple-choice question. Which of the following commands will print a list of the Question objects that are stored in the database?

25. Suppose that the following URLconf is added to urls.py in the mysite project:

url(r'^polls/',include('polls.urls')),

What happens when the user navigates to
https://wad2.pythonanywhere.com/polls/extra?

26. What effect does the following URLconf have?

url(r'^(?P<question_id>[0-9]+)/results/$', views.results, name='showresults')

27. Suppose that a view wishes to pass on a variable to a template, which should display the value of the variable. How should the view do this?

28. Which of the following is not an assertion from the class Django.Test.Testcase?

29. Which of the following are good strategies for creating tests in Django?

30. Which option from the following list best describes a 1-tier architecture?

31. Building web applications involves an array of challenges and complexities; these include:

32. Which of the following are HTTP methods for sending data?

33. Which of the following are good choices of URL? Choose all that apply.

34. What are the main components of Entity-Relationship diagrams?

35. Consider the following ER Diagram:

What line of code should be in the Course model?

36. Consider the following HTML and CSS code:

How will "Test message" be displayed?

37. Consider the following HTML and CSS code:

How will "WAD2" be displayed?

38. Consider the following HTML and JavaScript code:

What will the document.write method print out?

39. In the example event handling web page involving 5 nested div blocks, how many event listeners are triggered when the user clicks on the div block labelled 5?
HTML:

JS:

40. Consider the following HTML and JavaScript code:

What should be inserted at point *****?

41. Consider the following JavaScript code:

What will be returned if getReturnVal() is called?

42. What is the correct jQuery code to set the background colour of all p elements to red?

43. Which of the following XML fragments is well-formed?

44. Consider the XHTML code below. Is it well-formed?

45. Asynchronous JavaScript and eXtensible Markup Language (also known as AJAX) is a useful combination of technologies, which enables a web app to (select the statement that best applies):

46.

Consider the above HTML and JavaScript code contained in Parser.html. What text will be displayed when Parser.html is opened in a browser?

47. Which of the following statements best describes the differences between a DOM parser and a SAX parser?

48. When using HTTP, two communication methods are commonly used. Select the statement that best describes what each method does.

49. Web Application Frameworks have both benefits and drawbacks. Which of the following statements best describes the benefits and drawbacks:

50. Most web application frameworks make use of the Model View Controller design pattern (or some variant of this). What are the advantages and disadvantages of the MVC pattern? Select the statement that best applies:

51. What sequence of commands would you issue to upload and share your code in a GitHub repository? You can assume the added code wont cause a conflict with existing code.

52. The typical architecture of a web application follows a:

53. What design pattern does the django web application use:

54. An overriding principle when design web applications is:

55. The responsibilities of the middleware include: (select option where all correctly apply):

56. What does HTTP stand for?

57. The two most frequently used in HTTP requests are:

58. Which problem does HTTP suffer from:

59. AJAX stands for:

60. AJAX enables us to (Select the option where all statements apply):

61. CSS stands for:

62. Which selector applies to all tags with a class called blue and are paragraph elements:

63. Which selector applies to all tags with the ID called blue and are div elements:

64. The following code applies to the following question:
p {
background-color: yellow;
border: 1px solid black;
}
p .blue {
background-color: blue;
}

Given the HTML code shown below how would the element be rendered:
<p id=“blue”>Hello World

65. The following code applies to the following question:
p {
background-color: yellow;
border: 1px solid black;
}
p .blue {
background-color: blue;
}

Given the HTML code shown below how would the element be rendered:
<p style=“background-color: green”>Goodbye World

66. By referencing the Javascript as follows in the HTML is an example of:
<head>
<link type="text/javascript" href="broken.js">
</head>

67. Assume that user has visited the site on previous occasions, and within the HTML on the site a piece of Javascript is referenced as follows:
<head>
<link type="text/javascript" href="notbroken.js">
</head>
Select the option, where all apply:

68. Which line of JQuery code selects the element with a class brown and assigns an event to when the element is clicked:

69. Which line of code selects a paragraph element, and assigns a hover event to it, such that on hover the text turns blue, and off hover it turns red.

70. When writing JQuery code, it should be encapsulated by: