Section Five: Networks and web technologies Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

Chapter 21 – Structure of the Internet
The Internet

A

The internet is a global network of computers that use protocols and data packets to exchange information. There are a range of different protocols to do different jobs on the network.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Chapter 21 – Structure of the Internet
The physical structure of the Internet

A

Each continent uses backbone cables connected by trans continental leased lines fed across the sea beds. National Internet Service Providers (ISPs) connect directly to this backbone and distribute the Internet connection to smaller providers who in turn provide access to individual homes and businesses.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Chapter 21 – Structure of the Internet
Uniform Resource Locators (URLs)

A

A Uniform Resource Locator is the full address of an Internet resource. It specifies the location of a resource on the Internet, including the resource name and usually the file type, so that a browser can request it from the website server.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Chapter 21 – Structure of the Internet
Internet registries and registrars

A

Internet registrars hold records of all existing website names and the details of those domains that are currently available to purchase. These are companies that act as resellers for domain names and allow people and companies to purchase them. All registrars must be accredited by their governing registry.

Internet registries are five global organisations governed by the Internet Corporation for Assigned Names and Numbers (ICANN) with worldwide databases that hold records of all the domain names currently issued to individuals and companies, and their details. These details include the registrant’s name, type (company or individual), registered mailing address, the registrar that sold the domain name and the date of registry. The registries also allocate IP addresses and keep track of which address(es) a domain name is associated with as part of the Domain Name System (DNS).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Chapter 21 – Structure of the Internet
Domain names

A

A domain name identifies the area or domain that an Internet resource resides in. These are structured into a hierarchy of smaller domains and written as a string separated by full stops as dictated by the rules of the Domain Name System (DNS).

<Root>
Generic TLDs= .com, .edu, .org
Country TLDs= .uk, .fr, .de
2LDs= .co, .gov, .sch
3LDs= . bbc, .ebay, .lidl
</Root>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Chapter 21 – Structure of the Internet
Domain Name System (DNS)

A

Each domain name has one or more equivalent IP addresses. The DNS catalogues all domain names and IP addresses in a series of global directories that domain name servers can access in order to find the correct IP address location for a resource. When a webpage is requested using the URL a user enters, the browser requests the corresponding IP address from a local DNS. If that DNS does not have the correct IP address, the search is extended up the hierarchy to another larger DNS database. The IP address is located and a data request is sent by the user’s computer to that location to find the web page data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Chapter 21 – Structure of the Internet
Fully Qualified Domain Name (FQDN)

A

A fully qualified domain name is one that includes the host server name, for example www, mail or ftp depending on whether the resource being requested is hosted on the web, mail or ftp server. This would be written as www.websitename.co.uk or mail.website.co.uk for example.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Chapter 21 – Structure of the Internet
IP addresses

A

An IP or Internet Protocol address is a unique address that is assigned to a network device. An IP address performs a similar function to a home mailing address.

130.142.37.108

The IP address indicates where a packet of data is to be sent or has been sent from. Routers can use this address to direct the data packet accordingly. If a domain name is associated with a specific IP address, the IP address is the address of the server that the website resides on.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Chapter 21 – Structure of the Internet
Wide Area Networks (WANs)

A

As a network of inter-connected networks, the Internet comprises millions, if not billions of Local Area Networks and individual users to form the world’s largest Wide Area Network. A Wide Area Network is generally defined to be one that relies on third party carriers or connections such as those provided by British Telecom. WANs are typically spread over a large geographical area, even across continents.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Chapter 21 – Structure of the Internet
Local Area Networks (LANs)

A

A Local Area Network consists of a number of computing devices on a single site or in a single building, connected together by cables. The network may consist of a number of PCs, other devices such as printers and scanners, and a central server. Users on the network can communicate with each other, as well as sharing data and hardware devices such as printers and scanners. LANs can transmit data very fast but only over a short distance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Chapter 21 – Structure of the Internet
Physical bus topology

A

A LAN can use different layouts or topologies. In a bus topology, all computers are connected to a single cable. The ends of the cable are plugged into a terminator.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Chapter 21 – Structure of the Internet
Advantage and disadvantage of a bus topology

A

Advantage of a bus topology
- Inexpensive to install as it requires less cable than a star topology and does not require any additional hardware

Disadvantages of a bus topology
- If the main cable fails, network data can no longer be transmitted to any of the nodes
- Performance degrades with heavy traffic
- Low security – all computers on the network can see all data transmissions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Chapter 21 – Structure of the Internet
Physical star topology

A

A star network has a central node, which may be a switch or computer which acts as a router to transmit messages. A switch keeps a record of the unique MAC address of each device on the network and can identify which particular computer on the network it should send the data to.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Chapter 21 – Structure of the Internet

A

Advantages of a star topology
- If one cable fails, only one station is affected, so it is simple to isolate faults
- Consistent performance even when the network is being heavily used
- Higher transmission speeds can give better performance than a bus network
- No problems with ‘collisions’ of data since each station has its own cable to the server
- The system is more secure as messages are sent directly to the central computer and cannot be intercepted by other stations
- Easy to add new stations without disrupting the network

Disadvantages of a star network
- May be costly to install because of the length of cable required
- If the central device goes down, network data can no longer be transmitted to any of the nodes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Chapter 21 – Structure of the Internet
Advantage and disadvantage of a star topology

A

Advantages of a star topology
- If one cable fails, only one station is affected, so it is simple to isolate faults
- Consistent performance even when the network is being heavily used
- Higher transmission speeds can give better performance than a bus network
- No problems with ‘collisions’ of data since each station has its own cable to the server
- The system is more secure as messages are sent directly to the central computer and cannot be intercepted by other stations
- Easy to add new stations without disrupting the network

Disadvantages of a star network
- May be costly to install because of the length of cable required
- If the central device goes down, network data can no longer be transmitted to any of the nodes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Chapter 21 – Structure of the Internet
Physical vs logical topology

A

The physical topology of a network is its actual design layout, which is important when you select a wiring scheme and design the wiring for a new network.

The logical topology is the shape of the path the data travels in, and describes how components communicate across the physical topology. The physical and logical topologies are independent of each other, so that a network physically wired in star topology can behave logically as a bus network by using a bus protocol and appropriate physical switching.

For example, any variety of Ethernet uses a logical bus topology when components communicate, regardless of the physical layout of the cable.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Chapter 21 – Structure of the Internet
Wi-Fi

A

Wi-Fi is a local area wireless technology that enables you to connect a device such as a PC, smartphone, digital audio player, laptop or tablet computer to a network resource or to the Internet via a wireless network access point (WAP). An access point has a range of about 20 metres indoors, and more outdoors.

In 1999, the Wi-Fi Alliance was formed to establish international standards for interoperability and backward compatibility. The Alliance consists of a group of several hundred companies around the world, and enforces the use of standards for device connectivity and network connections.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Chapter 21 – Structure of the Internet
Wireless Access Point (WAP)

A

In order to connect to a wireless network, a computer device needs a wireless network adaptor. The combination of computer and interface controller is called a station. All stations share a single radio frequency communication channel, and each station is constantly tuned in on this frequency to pick up transmissions. Transmissions are received by all the stations within range of the wireless access point.

To connect to the Internet, the WAP usually connects to a router, but it can also be an integral part of the router itself.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Chapter 21 – Structure of the Internet
Mesh network topologies

A

Mesh networks are becoming more common with the widespread use of wireless technology. Each node in a mesh network has a connection to every other node, by transmitting data across any intermediate nodes. Only one node requires a connection to the Internet and all others can share this connection. Mesh networks can quickly become big enough to cover entire cities.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Chapter 21 – Structure of the Internet
Advantages of a wireless mesh network

A

The advantages of a mesh network include:
- No cabling costs
- The more nodes that are installed, the faster and more reliable the network becomes, since one blocked or broken connection can easily be circumvented by another route. In this respect, the mesh topology can be described as ‘self healing’.
- New nodes are automatically incorporated into the network
- Faster communication since data packets do not need to travel via a central switch

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Chapter 22 – Internet communication
Circuit switching

A

Circuit switching creates a direct link between two devices for the duration of the communication. The public telephone system is an example of a circuit switched network. When a caller dials a number, various switches in telephone exchanges set up a path between the caller and the recipient. The connection is set up for the entire duration of the call including periods of silence and pauses. This enables two people to hold a call without any delay in the delivery of speech.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Chapter 22 – Internet communication
Packet switching

A

Packet switching is a method of communicating packets of data across a network on which other similar communications are happening simultaneously. Website data that you receive arrives as a series of packets and an email will leave you in a series of packets.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Chapter 22 – Internet communication
Data packet

A

A unit of data made into a single package that travels along a given network path. Data packets are used in Internet Protocol (IP) transmissions for data that navigates the Web, and in other kinds of networks

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Chapter 22 – Internet communication
Routing packets across the Internet

A

The success of packet switching relies on the ability of packets to be sent from sender to recipient along entirely separate routes from each other. At the moment that a packet leaves the sender’s computer, the fastest or least congested route is taken to the recipient’s computer. They can be easily reassembled in the correct order at the receiving end and any packets that don’t make it can be requested again.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Chapter 22 – Internet communication
Routers

A

Each node in the diagram above represents a router. Routers are used to connect at least two networks, commonly two LANs or WANs, or to connect a LAN and its ISP’s network. The act of traversing between one router and another across a network is referred to as a hop. The job of a router is to read the recipient’s IP address in each packet and forward it on to the recipient via the fastest and least congested route to the next router, which will do the same until the packet reaches its destination. Routers use routing tables to store and update the locations of other network devices and the most efficient routes to them. A routing algorithm is used to find the optimum route. The routing algorithm used to decide the best route can become a bottleneck in network traffic since the decision making process can be complicated. A common shortest path algorithm used in routing is Dijkstra’s algorithm.

When a router is connected to the Internet, the IP address of the port connecting it must be registered with the Internet registry because this IP address must be unique over the whole Internet.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

Chapter 22 – Internet communication
Gateways

A

Routing packets from one network to another requires a router if the networks share the same protocols, for example TCP/IP. Where these protocols differ between networks, a gateway is used rather than a router to translate between them. All of the header data is stripped from the packet leaving only the raw data and new data is added in the format of the new network before the gateway sends the packet on its way again. Gateways otherwise perform a similar job to routers in moving data packets towards their destination.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

Chapter 22 – Internet communication
Media Access Control (MAC) addresses

A

Every computer device, whether it’s a PC, smartphone, laptop, printer or other device which is capable of being part of a network, must have a wired or wireless Network Interface Card (NIC). Each NIC has a unique Media Access Control address (MAC address), which is assigned and hard-coded into the card by the manufacturer and which uniquely identifies the device. The address is 48 bits long, and is written as 12 hex digits, for example:

00-09-5D-E3-F7-62

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

Chapter 22 – Internet communication
The importance of protocols and standards

A

A protocol is a set of rules defining common methods of data communication. These rules need to be standard across all devices in order for them to communicate with each other. HTTP (HyperText Transfer Protocol) has become the standard protocol for browsers to render web pages. TCP/IP is also used worldwide and enables communication with any other computer connected to the Internet regardless of its location.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

Chapter 22 – Internet communication
The TCP/IP protocol stack

A

The Transmission Control Protocol / Internet Protocol (TCP/IP) protocol stack is set of networking protocols that work together as four connected layers, passing incoming and outgoing data packets up and down the layers during network communication.

There are four layers:
* Application layer
* Transport layer
* Network layer
* Link layer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

Chapter 22 – Internet communication
The application layer

A

The application layer sits at the top of the stack and uses protocols relating to the application being used to transmit data over a network, usually the Internet. If this application is a browser, for example, it would select an appropriate higher level protocol for the communication such as HTTP, POP3 or FTP.
Imagine the following text data is to be sent via a browser using the Hypertext Transfer Protocol (HTTP):

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

Chapter 22 – Internet communication
The transport layer

A

The transport layer uses the Transmission Control Protocol (TCP) to establish an end-to-end connection with the recipient computer. The data is then split into packets and labelled with the packet number, the total number of packets and the port number through which the packet should route. This ensures it is handled by the correct application on the recipient computer. In the example below, port 80 is used as this is a common port used by the HTTP protocol, called upon by the destination browser.

If any packets go astray during the connection, the transport layer requests retransmission of lost packets. Receipt of packets is also acknowledged.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

Chapter 22 – Internet communication
The network layer

A

The network layer, sometimes referred to as the IP layer or Internet layer, adds the source and destination IP addresses. Routers operate on the network layer and will use these IP addresses to forward the packets on to the destination. The addition of an IP address to the port number forms a socket, e.g. 42.205.110.140:80, in the same way that the addition of a person’s name is added to a street address on an envelope in order to direct the letter to the correct person within a building. A socket specifies which device the packet must be sent to and the application being used on that device.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

Chapter 22 – Internet communication
The link layer

A

The link layer is the physical connection between network nodes and adds the unique Media Access Control (MAC) addresses identifying the Network Interface Cards (NICs) of the source and destination computers. These means that once the packet finds the correct network using the IP address, it can then locate the correct piece of hardware. The destination MAC address is that of the device that the packet is being sent to next. Unless the two computers are on the same network, the destination MAC address will initially be the MAC address of the first router that the packet will be sent to.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

Chapter 22 – Internet communication
Transferring files with FTP

A

File Transfer Protocol (FTP) is a very efficient method used to transfer data across a network, often the Internet. FTP works as a high level protocol in the Application layer using appropriate software. The user is presented with a file management screen showing the file and folder structure in both the local computer and the remote website. Files are transferred simply by dragging them from one area to the other. FTP sites may also be used by software companies offering large updates, or by press photographers to upload their latest photographs to a remote newspaper headquarters, for example.
Most FTP sites require a username and password to authenticate the user, but some sites could be configured to allow anonymous use without the need for any login information.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

Chapter 22 – Internet communication
The role of a mail server in retrieving and sending email

A

A mail server acts as a virtual post office for all incoming and outgoing emails. These servers route mail according to its database of local network user’s email addresses as it comes and goes, and store it until it can be retrieved. Post Office Protocol (v3) (POP3) is responsible for retrieving emails from a mail server that temporarily stores your incoming mail. When emails are retrieved, they are transferred to your local computer, be it a desktop or mobile phone, and deleted from the server. As a result, if you are using different devices to access email via POP3, you will find that they don’t synchronise the same emails on each device. Internet Message Access Protocol (IMAP) is another email protocol that is designed to keep emails on the server, thus maintaining synchronicity between devices. Simple Mail Transfer Protocol (SMTP) is used to transfer outgoing emails from one server to another or from an email client to the server when sending an email.

33
Q

Chapter 23 – Network security and threats
What is a firewall?

A

A firewall is a security checkpoint designed to prevent unauthorised access between two networks, usually an internal trusted network and an external, deemed untrusted, network; often the Internet. Firewalls can be implemented in both hardware and/or software. A router may contain a firewall.

A typical firewall consists of a separate computer containing two Network Interface Cards (NICs), with one connected to the internal network, and the other connected to the external network. Using special firewall software, each data packet that attempts to pass between the two NICs is analysed against preconfigured rules (packet filters), then accepted or rejected. A firewall may also act as a proxy server.

34
Q

Chapter 23 – Network security and threats
What is Packet filtering?

A

Packet filtering, also referred to as static filtering, controls network access according to network administrator rules and policies by examining the source and destination IP addresses in packet headers. If the IP addresses match those recorded on the administrator’s ‘permitted’ list, they are accepted. Static filtering can also block packets based on the protocols being used and the port numbers they are trying to access. A port is similar to an airport gate, where an incoming aircraft reaches the correct airport (the computer or network at a particular IP address) and is directed to a particular gate to allow passengers into the airport, or in this case to download the packet’s payload data to the computer.

35
Q

Chapter 23 – Network security and threats
What are Proxy servers?

A

A proxy server intercepts all packets entering and leaving a network, hiding the true network addresses of the source from the recipient. This enables privacy and anonymous surfing. A proxy can also maintain a cache of websites commonly visited and return the web page data to the user immediately without the need to reconnect to the Internet and re-request the page from the website server. This speeds up user access to web page data and reduces web traffic. If a web page is not in the cache, then the proxy will make a request of its own on behalf of the user to the web server using its own IP address and forward the returned data to the user, adding the page to its cache for other users going through the same proxy server to access. A proxy server may serve hundreds, if not thousands of users.

Proxy servers are often used to filter requests providing administrative control over the content that users may demand. A common example is a school web-proxy that filters undesirable or potentially unsafe online content in accordance with the school usage policies. Such proxies may also log user data with their requests.

36
Q

Chapter 23 – Network security and threats
What is Encryption?

A

Encryption is one way of making messages travelling over the Internet secure.

37
Q

Chapter 23 – Network security and threats
Worms, Trojans and viruses

A

Worms, Trojans and viruses are all types of malware or malicious software. They are all designed to cause inconvenience, loss or damage to programs, data or computer systems.

38
Q

Chapter 23 – Network security and threats
Viruses and worm subclasses

A

Viruses and worms have the ability to self-replicate by spreading copies of themselves. A worm is a sub-class of virus, but the difference between the two is that viruses rely on other host files (usually executable programs) to be opened in order to spread themselves, whereas worms do not. A worm is standalone software that can replicate itself without any user intervention. Viruses come in various types but most become memory resident when their host file is executed. Once the virus is in memory, any other uninfected file that runs becomes infected when it is copied into memory. Other common viruses reside in macro files usually attached to word processing and spreadsheet data files. When the data file is opened, the virus spreads to infect the template and subsequently other files that you create. Macro viruses are usually less harmful than other viruses but can still be very annoying.

39
Q

Chapter 23 – Network security and threats
Trojans

A

A Trojan is so-called after the story of the great horse of Troy, according to which soldiers hid inside a large wooden horse offered as a gift to an opposition castle. The castle guards wheeled the wooden horse inside their castle walls, and the enemy soldiers jumped out from inside the horse to attack. A Trojan is every bit as cunning and frequently manifests itself inside a seemingly useful file, game or utility that you want to install on your computer. When installed, the payload is released, often without any obvious irritation. A common use for a Trojan is to open a back door to your computer system that the Trojan creator can exploit. This can be in order to harvest your personal information, or to use your computer power and network bandwidth to send thousands of spam emails to others. Groups of Internet-enabled computers used like this are called botnets. Unlike viruses and worms, Trojans cannot self-replicate.

40
Q

Chapter 23 – Network security and threats
System vulnerabilities

A

Malware exploits vulnerabilities in our systems, be they human error or software bugs. People may switch off their firewalls or fail to renew virus protection which will create obvious weaknesses in their systems. Administrative rights can also fail to prevent access to certain file areas which may otherwise be breached by viral threats. Otherwise cracks in software where data is passed from one function, module or application to another, (which is often deemed to have been checked and trusted somehow by the source) may open opportunities for attackers.

People are often the weakest point in security. Passwords are no guarantee of protection against unauthorised access since these are sometimes written down, guessed or dishonestly ‘blagged’ using social engineering techniques to persuade the password holder to divulge their authentication credentials.

41
Q

Chapter 24 – HTML and CSS
HyperText Markup Language (HTML)

A

HTML is the language or script that web pages are written in. It describes the content and structure of a web page so that a browser is able to interpret and render the page for the viewer. HTML is usually used in conjunction with Cascade Style Sheets (CSS) which dictate the style and formatting of a web page rather than its content.

42
Q

Chapter 24 – HTML and CSS
HTML Tags

A

HTML is made up of tags written in angle brackets, often in opening and closing pairs, e.g. <html> and </html>.
A standard web page comprises two sections – a head and a body. The head contains the title of the webpage that may appear in a window header or browser tab, and any script that may enrich your page content. The body contains the main content of the page, defining text, images and hyperlinks. An HTML file can be created using a text editor such as Notepad, or using software such as Adobe Dreamweaver.

<html> = All code enclosed within these tags is interpreted as HTML
<body> = Defines the content in the main browser content area
<head> = Defines the browser tab or window heading area
<title> = Defines the text that appears with the tab or window heading area
<h1>, <h2>, <h3> = Heading styles in decreasing sizes
<p> = A paragraph separated with a line space above and below
<img></img> = Self closing image tag with parameters: <img src = location, height=x, width=y>
<a> = Anchor tag defining a hyperlink with location parameter <a> Link text </a>
<ol>, <ul> = Defines an ordered (numbered) or unordered (bulleted) list
<li> = Defines an individual list item within either a numbered or bulleted list
</li></ul></ol></a></p></h3></h2></h1></title></head></body></html>

43
Q

Chapter 24 – HTML and CSS
The HTML <div> tag

A

The <div> tag facilitates the division of a page into separate areas, each of which may be referred to uniquely by name, and styled differently using CSS.

44
Q

Chapter 24 – HTML and CSS
CSS Script

A

CSS is a scripting language similar to HTML that is used to describe the layout and styles of a web page. Styles can be applied to existing HTML elements such as <h1>, <p> or <div>.

45
Q

Chapter 24 – HTML and CSS
Embedded, inline and external CSS

A

CSS script can be inserted directly into the HTML document <head> as internal or embedded CSS between its own <style </style> tags. It can also be entered directly within the HTML body, known as inline CSS, as shown in lines 15 and 19 of the example HTML script overleaf. Either of these methods enable styles to be kept within the HTML document, and inline CSS can help make one-off style adjustments that are unlikely to affect any other part of the website. By far the most common technique, however, is to make style declarations in an external style sheet. A link to the external sheet can be placed in the HTML file using the <link></link> tag, for example see line 4 of the HTML script on the following page. Linking to an external style sheet has the advantage that multiple HTML or webpage files within the same site can each link to the same style sheet so that formatting can be applied consistently without the need to duplicate CSS styles.

46
Q

Chapter 24 – HTML and CSS
Identifiers and classes

A

Identifier and class selectors are named ‘hooks’ onto which you can hang styles. You can then apply these grouped styles to an HTML element such as a <div> element by adding the class or id name as a parameter, e.g.

<div>.

The styles for the id selector called page are listed within curly brackets within the CSS document:
#page{max-width:800px; margin: 20px auto; padding: 30px; background-color: #cc6633;}
</div>

47
Q

Chapter 24 – HTML and CSS
Identifiers

A

Identifiers are defined with a hash tag (#) preceding the id name, e.g. #header (CSS lines 21-26). Identifiers must be unique to every webpage. In this ‘Germ theory’ example, #header is a good example of a unique element since a webpage is likely only to contain one header.

48
Q

Chapter 24 – HTML and CSS
Classes

A

Classes work in a similar way to an identifier but use a full stop as a prefix to the class name e.g. .list (CSS Script lines 35-38). Classes can be used multiple times on a webpage. There are two lists which share common formatting unique to the list element such as the font colour. This can be defined in the CSS and applied to all list <div> regions on the page. See HTML Script lines 22 and 32.

49
Q

Chapter 25 – Web forms and JavaScript
Web forms

A

Web forms enable websites to collect user input data and selections. Input types include textboxes, check boxes and radio buttons.
Input can be validated and submitted to the website owner’s database or processed as part of a search query to find, for example, train times or your nearest shop branch when you enter a postcode.

50
Q

Chapter 25 – Web forms and JavaScript
Creating a web form using basic HTML form controls

A

A simple, unformatted web form that uses basic text boxes for input and a pair of buttons to submit and reset the page can be created very quickly. It will remain functionless however until actions are applied to it. JavaScript can be used to add behaviours to a web page, and included in that, active web forms.

The HTML script below should be compared with the screenshot of the page below.

<h1>Register</h1>

<form>
<label>Enter your email to register:</label>
<input></input>
<button>Submit</button>
<button>Reset</button>
</form>

51
Q

Chapter 25 – Web forms and JavaScript
Form handling with submit and reset actions

A

The button type is specified as an attribute of the button, e.g. type=”reset”. This will provide some basic functionality in the case of the reset button which clears the form data. A submit button type will send data to a form handler specified in the action attribute of the <form> tag. The form handler on the server will then process the form data – in this case, an email address.

52
Q

Chapter 25 – Web forms and JavaScript
JavaScript

A

JavaScript is a script language that uses all of the same programming constructs that are familiar in languages such as Python and VB. It should not be confused with the language Java. JavaScript is commonly used to add interactivity to websites, including the manipulation of page objects, animations, navigation tools and form validation. JavaScript is interpreted rather than compiled. Compilers produce object code which is specific to a particular type of processor. JavaScript needs to be translated into the object code for whichever computer the browser is running on, and will be translated by the interpreter when the web page is displayed. An interpreter in the browser reads the JavaScript code, interprets each line and runs it. Some of the latest browsers however, use ‘Just-In-Time’ compilation which compiles JavaScript into executable bytecode just before execution.

53
Q

Chapter 25 – Web forms and JavaScript
Input

A

JavaScript can be used to process input data on the client’s computer. This may change the local page interactively or post data to a server. The advantages of processing input data before it is posted to a server are that:
* the local computer can validate erroneous data before submission to a database
* a busy server is relieved from having to process everything itself.

54
Q

Chapter 25 – Web forms and JavaScript
Output

A

JavaScript can reference and interact with HTML elements to edit, style or move them. For example, a validation script may change a ‘postcode’ input label to become red if a user has entered invalid data:
document.getElementById(“postcode”).style.color=”red”;

55
Q

Chapter 25 – Web forms and JavaScript
Using JavaScript to control webpage functions

A

Building on the example of a basic web form above, JavaScript can be used to create a simulated Captcha form

The HTML form elements are given ids in order for the JavaScript to reference them. (See lines 16-19 of the HTML form script below.) Buttons are given onClick attributes in order to execute JavaScript functions when they are pressed. Their type has also been changed to become “button” rather than submit or reset actions.

56
Q

Chapter 25 – Web forms and JavaScript
JavaScript output

A

JavaScript commands can access and edit HTML elements outside of the

 tags, and write directly to the web page document using the command document.write("Hello World"); for example. The attribute .innerHTML of an HTML element can be edited directly.

Another method is to cause the browser to display a pop-up alert box with a custom message requiring the user’s attention.

57
Q

Chapter 25 – Web forms and JavaScript
Functions and variables

A

JavaScript functions are declared within curly brackets {} and called using the function name e.g. setupForm();. Function parameters may be included inside the round brackets, but if there are none, empty brackets must be used.

58
Q

Chapter 25 – Web forms and JavaScript
Validation

A

Validation routines are commonly built in to webpages using JavaScript since the script is executed locally on the client’s machine. The function validateForm() checks the user input and either changes form labels and styling in response to an invalid entry, or displays the alert box above.

59
Q

Chapter 25 – Web forms and JavaScript
Arrays in JavaScript

A

JavaScript arrays can hold any type of data. In this example there are two arrays – one to hold a set of three captcha images and the other to hold the answers to each of them. var captcha=[“captcha1.jpg”,”captcha2.jpg”,”captcha3.jpg”]; var captchaAnswer=[“weasel”,”moose”,”polecat”];

60
Q

Chapter 26 – Search engine indexing
Search engines

A

Search engines such as Google are systems that locate resources on the Internet. These resources could be web pages, documents, images or other files.

61
Q

Chapter 26 – Search engine indexing
Search engine indexing

A

Search engines rely on a database or index of web pages to find the pages you are looking for. To build this index, a software program called a web crawler or spider is used. This constantly goes out to all the pages currently on the index, and then on to fetch all those sites linked to by those sites and so on until they have linked to all or nearly all web pages and resources on the Internet. Different search engines use their own crawler programs so a search in one engine might return different results from another.

62
Q

Chapter 26 – Search engine indexing
Key words, meta tags, and descriptions

A

Search engines look for key words and phrases within web pages or resource content that match your
search terms. These are visible to the user and part of the main web page content.

Meta tags and descriptions are a list of keywords or concise phrases specified by the website owner that are built into each webpage. Descriptions are displayed with the page title in search results as shown above. These can be defined in the HTML documents within the <head> section to help searches.

63
Q

Chapter 26 – Search engine indexing
Search results

A

There are believed to be over 200 factors affecting search results that may help position your own website nearer the top of the results list. Other than metatags and descriptions, these include:
* using keywords in the <title> tag
* the age of your website and date of last update (or frequency of updates)
* the number and relevancy of keywords appearing in <h1> tags and
* the relevancy of the domain name to the content</title>

64
Q

Chapter 26 – Search engine indexing
Google’s PageRank algorithm

A

In the 1990s two postgraduate Computer Science students called Larry Page and Sergey Brin met at Stanford University. Brin was working on data mining systems and Page was working on a system to rank the importance of a research paper according to how often it was cited in other papers. The pair realised that this concept could be used to build a far superior search engine to the existing ones, and they started to work on a new Search Engine for the Web. The problem they set themselves was how to rank the thousands or even millions of web pages that had a reference to the search termtyped in
by a user. To make a search engine useful, the most reliable and relevant pages need to appear first in the list of links. Until that point, pages had generally been ranked simply by the number of times the search term or its synonyms appeared on the page. Page’s and Brin‘s insight was to realise that the usefulness and therefore the rank of a given page, say Page X, can be determined by how many visits to Page X result from other web pages containing links to the page. Taking this further, links from a Page Y that itself has a high rank are more significant than those from pages which have themselves only had a few visits. The importance or authority of a page is also taken into account so that a link from a .gov page or a page belonging to the BBC site, for example, may be given a higher PageRank rating.

An initial version of Google was launched in August 1996 from Stanford University’s website. By mid- 1998 they had 10,000
searches a day, and realised the potential of their invention.

They represented the Web as a directed graph of pages, using an algorithm to calculate the PageRank (named after Larry Page) of each page. Every web page is a node and any hyperlinks on the page are edges, with the edge weightings dependent on the PageRank algorithm.

By 2015, Google was processing 40,000 search queries every second, worldwide. David Vise, the author of The Google Story noted that “Not since Gutenberg* … has any new invention empowered individuals, and transformed access to information, as profoundly as Google.”

65
Q

Chapter 26 – Search engine indexing
Calculating PageRank

A

PageRank is effectively a popularity contest between websites defined by the number of votes or inbound links they receive, with a weighting to give more importance to some votes than others. This weighting is swayed by either the number of outbound links a site has or the importance (or PageRank) of a site. A website with a good reputation and high PageRank will have a higher weighting assigned to its ‘votes’ but its total vote is shared or diluted amongst all of the sites it links to.
The PageRank algorithm itself is defined as:
PR(A) = (1-d) + d (PR(T1)/C(T1) + … + PR(Tn)/C(Tn))
where:
* PR(A) is the PageRank of page A
* C(Tn) is the total count of outbound links from web page n including the inbound link to page A. All webpages have a notional vote of 1. This is shared between all those it links to.
* PR(Tn)/C(Tn) is the share of the vote that page A gets from pages T1 … Tn. Each of these vote fractions is added together and multiplied by d.
* d is the damping factor set to prevent PR(Tn)/C(Tn) from having too much influence. It is notionally set to 0.85, which in probability terms says that after roughly six click-through links, the average user will either stop their session or enter a new web address in their browser directly rather than following another link.
The PageRank of a page is constantly being recalculated and updated.

66
Q

Chapter 26 – Search engine indexing
Applying the algorithm

A

The PageRank of one web page is determined in part by the PageRank of other pages that link to it.

However, the PageRank algorithm works without the need to know any of the other PageRanks of back- linked pages. (A back-link can be defined as an inbound link from another site.) Instead, a guess can be made in the first instance and after several iterations of the algorithm, the PageRank begins to home in on the correct figure. It can take dozens, if not hundreds or even millions of iterations before this number finally stops moving. Once settled, the average PageRank of all pages will be 1.

67
Q

Chapter 27 – Client server and peer-to-peer
Client-server networking

A

In a client-server network, one or more computers known as clients are connected to a powerful central computer known as the server. Each client may hold some of its own files and resources such as software, and can also access resources held by the server. In a large network, there may be several servers, each performing a different task.

  • File server holds and manages data for all the clients
  • Print server manages print requests
  • Web server manages requests to access the Web
  • Mail server manages the email system
  • Database server manages database applications
    In a client-server network, the client makes a request to the server which then processes the request.
68
Q

Chapter 27 – Client server and peer-to-peer
Advantages of a client-server network

A
  • Security is better, since all files are stored in a central location and access rights are managed by the server
  • Backups are done centrally so there is no need for individual users to back up their data. If there is a breakdown and some data is lost, recovery procedures will enable it to be restored
  • Data and other resources can be shared
69
Q

Chapter 27 – Client server and peer-to-peer
Disadvantages of a client-server network

A
  • It is expensive to install and manage
  • Professional IT staff are needed to maintain the servers and run the network
70
Q

Chapter 27 – Client server and peer-to-peer
Cloud computing

A

Cloud computing refers to a growing service-based industry providing access to software or files via the Internet using the client-server model. File storage companies such as DropBox, OneDrive or Google Drive offer file storage facilities where users’ files are kept on remote servers. Other companies offer software via the cloud, a provision known as Software as a Service (SaaS). Microsoft, for example offers cloud-based Office applications. Accounting packages are also available through website logins where all the company data and application are stored offsite.

71
Q

Chapter 27 – Client server and peer-to-peer
Peer-to-peer networks

A

In a peer-to-peer network, there is no central server. Individual computers are connected to each other, either locally or over a wide area network so that they can share files. In a small local area network, such as in a home or small office, a peer-to-peer network is a good choice because:
* it is cheap to set up
* it enables users to share resources such as a printer or router
* it is not difficult to maintain

Peer-to-peer networks are also used by companies providing, for example, video on demand. A problem arises when thousands of people simultaneously want to download the latest episode of a particular TV show. Using a peer-to-peer network, hundreds of computers can be used to hold parts of the video and so share the load. This is the main principle behind dozens of torrent websites that enable the sharing of
files, often containing copyright material.

72
Q

Chapter 27 – Client server and peer-to-peer
The downside of peer-to-peer networking

A

Peer-to-peer networking has been widely used for online piracy, since it is impossible to trace the files which are being illegally downloaded. In 2011, the US Chamber of Commerce estimated that piracy sites attracted 53 billion visits each year. The analyst firm NetNames estimated that in January 2013 alone, 432 million unique Web users actively searched for content that infringes copyright.

73
Q

Chapter 27 – Client server and peer-to-peer
Case study: Piracy sites

A

In January 1999, 19-year-old Shawn Fanning and Sean Parker created the Napster software, which enabled the peer-to-peer “sharing” of music – in actual fact, the theft of copyright music. Instead of storing the MP3 files on a central computer, the songs are stored on users’ machines. When you want to download a song using Napster, you are downloading it from another person’s machine, which may be next door or on the other side of the world.

All you need is a copy of the Napster utility and an Internet connection. Napster was sued for copyright infringement in 2000 but argued that they were not responsible for copyright infringement on other people’s machines. However, they lost the case and were pushed into bankruptcy, but the service has since reinvented itself on a legitimate, subscription basis.

74
Q

Chapter 27 – Client server and peer-to-peer
The consequences of piracy

A

In 2014, Popcorn Time was launched, allowing a decentralised peer-to-peer service for illegal streaming of movies. Popcorn Time has already been translated into 32 languages and has been described as a “nightmare scenario” for the movie industry. The more movies that are stolen and illegally downloaded online, the fewer resources moviemakers have to invest in new films. In 2013 there was a 21% drop in the 18-24 age group buying tickets to watch movies, and numbers may plummet further in the next few years.

A 2011 report by the London-based International Federation of the Phonographic Industry (IFPI) estimated that 1.2 million European jobs would be destroyed by 2015 in the music, movie, publishing and photography industries because of online piracy.

75
Q

Chapter 27 – Client server and peer-to-peer
Client- and server-side processing

A

In the client-server model, data may be processed on either side.

76
Q

Chapter 27 – Client server and peer-to-peer
Web servers

A

A client will send a request message to a server which should respond with the data requested or a suitable message otherwise.
This is commonly seen when a client browser sends an HTTP request to a web server for dynamic web page data or a web resource, or when using a web page with an online search facility such as checking availability via a booking form.

77
Q

Chapter 27 – Client server and peer-to-peer
Client-side processing

A

Client-side processing describes situations where data is processed on the client computer, rather than on the server. This may happen because the client computer has specific software that can process the information, or to lighten the load on the server’s processor. Processing data on the client-side can also improve security as it can avoid unnecessary data transfer. JavaScript is a client-side language and is frequently used to provide interactivity on a web page. Client-side processing can also adjust styles for different platforms or screen sizes.

  1. Initial data validation
  2. Provides web page interactivity
  3. Manipulates user interface elements
  4. Applies styles (CSS)
  5. Reduces the load on the server
  6. Reduces the amount of web traffic
78
Q

Chapter 27 – Client server and peer-to-peer
Server-side processing

A

Servers often process an enormous volume of data on behalf of multiple clients. They can also process the data much faster than a client computer. There are specific languages that are used for server-side processing such as SQL or PHP. Search requests (e.g. for a search engine or a company database) may be sent to the server where they may be applied to a database using SQL. Database search results are then sent back to the client browser. Validation may also be carried out on the server where an invalid entry must be compared with data already on a server database. Examples may include checking user credentials, or looking up valid airport locations. JavaScript may also be circumvented mailicously so server-side validation is important for the integrity of server data.

  1. Provides further validation
  2. Used to query a Database
  3. Updates server databases
  4. Performs complex calculations
  5. Encodes data to readable HTML
  6. Keeps organisational data secure
79
Q

Chapter 27 – Client server and peer-to-peer
API (Application Programming Interface)

A

An API is a set of protocols that governs how two applications should interact with one another. An API sets out the format of requests and responses between a client and a server and enables one application to make use of the services of another. An organisation may use the Twitter API to enable relevant tweets to be regularly fed through to a display window within their on website. Price comparison websites may also use an API to gather data from individual company websites in order to display a list of each of them for the consumer.

80
Q

Chapter 27 – Client server and peer-to-peer
Thin- versus thick-client computing

A

The ‘thickness’ of a client computer refers to the level of processing and storage that it does compared with the server it is connected to. The more processing and storage that a server does, the ‘thinner’ the client becomes. If all the processing and storage is done by the server, then all that is required for the thinnest-client computer is a very basic machine with very little processor power and no storage. This is often known as dumb terminal. The decision to go ‘thick’ or ‘thin’ rather depends on your specific requirements and each option comes with its own advantages and disadvantages.

81
Q

Chapter 27 – Client server and peer-to-peer
Thin-client

A

Advantages
- Easy to set up, maintain and add terminals to a network with little installation required locally.
- Software and updates can be installed on the server and automatically distributed to each client terminal.
- More secure since data is all kept centrally in one place.

Disadvantages
- Reliant on the server, so if the server goes down, the terminals lose functionality.
- Requires a very powerful, and reliable server which is expensive.
- Server demand and bandwidth increased.
- Maintaining network connections for portable devices consumes more battery power than local data processing.

82
Q

Chapter 27 – Client server and peer-to-peer
Thick-client

A

Advantages
- Robust and reliable, providing greater up-time.
- Can operate without a continuous connection to the server.
- Generally better for running more powerful software applications.

Disadvantages
- More expensive, higher specification client computers required.
- Installation of software required on each terminal separately and network administration time is increased.
- Integrity issues with distributed data.