IB DP Computer Science Option C: Web science -: C.1 –Creating the web SL Paper 2

Question

Pugh University has a website that allows computer science students to enter their name and customize the web pages.
Consider the section of HTML and CSS code shown below.
File name: index.html

<!DOCTYPE html>
<html>
<body>
<script>
                                         function setVar(){
                                                var subject=document.getElementById(“kippers”).value;
                                                document.getElementById(“subj”).innerHTML = subject;
                                                 }
</script>
<h2>My First Page</h2>
<p>Welcome to the <span id=”subj”></span> Faculty</p>

 <input type=”text” id=”kippers”/>
<button onclick=”setVar();”/>clickme</button>
</body>
</html>

When a student enrolls, they must enter their name on a web page. Before being added to the database, the system should check that the name typed is not blank and that it has not already been added to the database.

Consider the following URL:
https://www.follettibstore.com
The common gateway interface (CGI) offers a standard protocol for web servers.
a.i. State the output of the index.html file in the web browser.[2]
a.ii.Describe the processing that takes place when the user inputs “Pugh” into the text box and then uses the clickme button.[3]
b. Explain why these two validation checks occur on different computer systems.
c. Explain how website certificates are used to authenticate a user’s browser through secure protocol communications like HTTPS.[3]
d. Describe the working of the common gateway interface (CGI).[4]
e. Pugh University uses cloud computing services, such as Google Docs or Office 365.$[4]$
Describe how cloud computing is different to a client-server architecture.

▶️Answer/Explanation

Ans:

a.i. )
Award [1] for the text within the $\langle p\rangle$ tags (My First Page large font/Welcome to the Faculty in a smaller font;
Award [1] for the text box and correctly labelled button;
My First Page
Welcome to the Faculty
clickme

OR
Initially it displays:
My First Page – in large font;
Welcome to the Faculty – in normal font;
A text box + a button labelled “clickme”;
A Then if you type in the text box and then press the button, it displays what is typed between “Welcome to the” and “Faculty” – e.g. type “Science” and it will display; “Welcome to the Science Faculty”;
Note: Students either show the output on the web-browser or describe what would be displayed on the web-browser.

a.ii)
The button’s onclick method is called, i.e. setVar();
This first sets the variable subject to the value of the HTML element with id kippers, i.e. the text box;
and then sets the inner text of the element with id subj, i.e. the span, to “Pugh”, so that the display is “Welcome to the Pugh Faculty”;

b. )
Award [1] for identifying correct validation check.
Award [1] for describing the validation check.
Presence check:
It happens in JavaScript in the web page on the client; because this will save the server handling many transactions/to avoid sending a null value that will need to be handled by the server;
Lookup check
It happens on the server; because the database is stored on the server rather than on the client’s computer;

c. )
The website certificate is used to initiate sessions between the user’s browser and the server;
The web server sends the browser a copy of its SSL certificate;
If the browser trusts the certificate, it sends a message to the web server;
The web server sends back a digitally signed acknowledgement to start an SSL encrypted session;

d. )
The Common Gateway Interface (CGI) is used to provide interactivity to web applications/enable forms to be submitted;
It uses a standard protocol that acts as an intermediary between the CGI program and the web server;
The CGI allows the web server to pass a user’s request to an application program;
And then the forwarded data is received to the user’s browser;

e.)
Cloud computing is based on sharing computing resources over the internet;
Cloud computing can be offered as a service to individuals and companies (SaaS) which means they do not have to maintain the infrastructure;
Cloud computing and applications are more scalable than client-server architectures;
Client-server architecture does not need to be operating over the internet, but instead can be limited to a local network;
Client-server architectures may require more maintenance of the infrastructure by the organization who are using it;
cloud computing is typically more resilient than client server, because the services offered are more widely distributed, rather than being concentrated on one server or on a small number of alternative servers;

Question

The internet and World Wide Web are often considered to be the same, or the terms are used in the wrong context.
Many organizations produce computer-based solutions that implement open standards.
A search engine is software that allows a user to search for information. The most commonly used search algorithms are the PageRank and HITS algorithms.
a. Distinguish between the internet and the World Wide Web.[2]
b. Outline two advantages of using open standards.$[4]$
c. Outline why a search engine using the HITS algorithm might produce different page ranking from one using the PageRank algorithm.[2]
d. Web crawlers browse the World Wide Web.[3]
Explain how data stored in a meta-tag is used by a web crawler.

▶️Answer/Explanation

Ans:

a. )
The internet is a global network of interconnected computers / a network of networks;
The World Wide Web is software / a service that runs on the hardware of the internet and provides access to content / a collection of pages that can be accessed through hyperlinks / a way of accessing and sharing the information that is held on the internet in webpages;
The World Wide Web uses the http protocol. This is only one of the many protocols used by the internet;
E-mail, File Transfer Protocol (FTP), and instant messaging services are part of the internet but not of the web;

b. )
Open standards provide a publicly available specification for a specified task;
This is an agreed set of parameters that enable interoperability and/or compatibility to occur;
Using Open standards means that you are not subject to a governing body with its own agenda/self-interest; Thus, you can be confident that you won’t be subject to fees/bias;
Open standards promote interoperability;
This enables the various devices to communicate with each other;
Open standards advocates also argue that openness encourages better and more secure systems;
this is because more people are able to analyse the standards and resulting software and no-one has a proprietary interest in suppressing knowledge of problems to keep sales up.

c. )
The HITS Algorithm ranks the page based on a combination of its importance as a hub and an authority;
The PageRank Algorithm ranks the page by counting the number and quality of links to a page to determine the relative importance of the website;

d.)
Meta tags are included in the header of a web-page which are available to a web-crawler and give information about the page that it could make use of;

When the web-page is crawled, a copy of the HTML is replicated in the search engine database;
When a user enters text into a search the search engine retrieves the data indexed from the web-page;
And the search engine ranks and displays the content (in order of relevance);

Scroll to Top