All Final
All Final
TM352
Web, mobile and cloud technologies
Final Examination
Fall 2021 – 2022
Date: /2022
Instructions:
At the same time, Receiver calculates x^b = 7^4 = 2401 and sends this to
Sender. [2.5 marks]
4.Sender and Receiver have now created the exact same secret number,
having been calculated in two different orders:
(x^a)b = (7^3)^4 = 343^4 = 823543
(x^b)a = (7^4)^3 =2401^3 = 823543
]
},
"topping":
[
{ "id": "5001", "type": "None" },
{ "id": "5002", "type": "Glazed" },
{ "id": "5005", "type": "Sugar" },
]
}
<root>
<batters>
<batter>
<element>
<id>1001</id>
<type>Regular</type>
</element>
<element>
<id>1002</id>
<type>Chocolate</type>
</element>
</batter>
</batters>
<id>0001</id>
<name>Cake</name>
<ppu>0.55</ppu>
<topping>
<element>
<id>5001</id>
<type>None</type>
</element>
<element>
<id>5002</id>
<type>Glazed</type>
</element>
<element>
<id>5005</id>
<type>Sugar</type>
</element>
</topping>
<type>donut</type>
</root>
3) Demonstrate the steps that should occur at sender and receiver to preserve the
confidentiality of a message sent from Omar to Ahmed using an Asymmetric key
method. [10 marks]
a. Omar wants to send a private message to Ahmed which no one else can read.
b. Omar looks up Ahmed’s public key (which might be published in a directory,
obtained in an open email from Ahmed or embodied in a digital certificate).
c. Omar then encrypts the message with Ahmed’s public key and sends the
encrypted message to Ahmed. [5 marks]
d. Ahmed receives the message and decrypts it using his private key[5 marks]
The following represents a sample of the file content for only four currencies
[ {
“from”: “USD”,
“to”: {“EUR” :86, “CAD” :123, “AUD” : 133}
For example if we want to convert from USD dollar to EUR the amount 17 then the result should be
17*86/100.0 =14.62 and so on.
The service should accept three parameters the “to”, “from” and the amount to be converted
and should return the resultant value to be displayed as HTML
1) Implement the service as RESTFUL service with the required annotations and read the
formulas from a JSON file called “currency.json” that contains an array of transactions
using the classes Json, JsonObject, and JsonArray
2) Design and write the HTML code the HTML page that would consume or call the service.
3) Specify the parameter type you have used in your implementation and the HTTP method
used.
4) In case that the web application should be viewed from a mobile browser, what are the
principles of responsive web design
void close() //Closes this reader and frees any resources associated with the
reader.
JsonArray readArray() //Returns a JSON array that is represented in the input
source.
JsonObject readObject() //Returns a JSON object that is represented in the input
source.
void close() //Closes this JSON writer and frees any resources associated with
the writer.
void writeArray(JsonArray array) //Writes the specified JSON array to the output
source.
void writeObject(JsonObject object) //Writes the specified JSON object to the
output source.
Any other correct solution would be accepted. This is one of the correct solutions,
1.@POST
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
@Produces(MediaType.TEXT_HTML)
double Value=Double.parseDouble(amount);
double result=0;
reader.close();
for(int i=0;i<array.size();i++)
JsonObject ob=array.getJsonObject(i);
if(ob.getString("from").equals(from))
result=toObejct.getInt(to)*Value/100.0;
break;
return ""+result;
//annotations 5 marks
//calculations 2 marks
2.
<html>
<head>
<title>Conversions</title>
</head>
<body>
</form>
</body>
</html>
1. Fluid design
2. Flexible images
3. CSS media queries (and device breakpoints).
End of Questions
TM352
Web, mobile
and cloud technologies
Final Examination
Summer Semester
2019/2020
Date: 28 / 8 /2020
Number of Exam Pages: 4
Time Allowed: 3hours
(including this cover sheet(
Instructions:
PART I
1) According to UCSB and IBM cloud model, the number of supported services in the
abstraction layer is
a. 8 c. 5
b. 1 d. 11
4) .is an HTTP method responsible for getting the headers of a web page
a. PUT c. GET
b. HEAD d. POST
a. Java c. Objective-C
b. Swift d. javascript
a. Nova c. Swift
b. Neutron d. Cinder
a. PaaS c. SaaS
b. laaS d. HaaS
PART II
<!DOCTYPE html>
<head>
<title>Borrowing Page</title>
</head>
<form action="/borrow" method="post">
<label>Book ID </label>
<input name="book_id" id= “book_id” ><br>
<label>Book name </label>
<input name="book_name" id = “book_name”><br>
<label>number of borrowing days </label>
<input name="no_days" id = “no_days”>
<button type="submit">Submit</button>
</form>
</html>
<bookstore>
<book category="COOKING">
<title >The Boston Cooking—School Cookbook</title>
<author>Fannie Merrit Farmer</author>
<year>1896</year>
<price>49.99</price>
</book>
<book category="CHILDREN">
<title >The Wonderful Wizard of Oz</title>
<author>L. Frank Baum</author>
<year>1900</year>
<price>39.95</price>
</book>
<book category="CHILDREN ">
<title >Alice's Adventures in Wonderland</title>
<author>Charles "Lewis Carroll" Dodgeson</author>
<author>C'narles Dodgeson</author>
<author>Lewis Carroll</author>
<year>1865</year>
<price>29.99</price>
</book>
</bookstore>
TM352 / Final 3 of 4 Fall 2019-20
Solved by- Ayman Metwali
{
"bookstore": {
"book": [
{
"title": "The Boston Cooking—School Cookbook",
"author": "Fannie Merrit Farmer",
"year": 1896,
"price": 49.99
},
{
"title": "The Wonderful Wizard of Oz",
"author": "L. Frank Baum",
"year": 1900,
"price": 39.95
},
{
"title": "Alice's Adventures in Wonderland",
"author": [
"Charles \"Lewis Carroll\" Dodgeson",
"C'narles Dodgeson",
"Lewis Carroll"
],
"year": 1865,
"price": 29.99
}
]
}
}
3) Demonstrate the steps required to confirm the integrity and senders identity of a message that
should be sent by Ali to Hossam, separating the steps that should be done at the sender and
receiver using public and private keys.
[7 marks]
At the sender:
Ali wants to send a message to Hossam.
Ali first writes the message and hashes it, then encrypts the resulting message digest with his
private key.
He then sends both the message in plaintext and the encrypted message digest to Hossam.
At receiver
When Hossam receives the message and encrypted digest, he decrypts the digest using Ali’s
public key and also re-computes the message digest by hashing the plaintext message.
He then compares the digest he calculated with that sent by Ali: any discrepancy indicates that
the message has been tampered with, or that it didn’t come from Ali.
[5 marks]
Virtual machines:
The virtual machine form of virtualisation takes the resources of a single physical host
computer (CPUs, memory and input/output devices) and shares them between multiple
guest computers.
The virtualisation software, or hypervisor, provides the code to manage and protect
the virtual servers, together with the code for device drivers.
A guest OS consumes a lot of memory to store the code that will manage memory,
schedule processes, buffer disk drive reads and writes and communicate over a network.
It is responsible for creating each virtual server, protecting a virtual server’s memory
space from other virtual servers, scheduling usage of the processors and cleaning up
when a virtual server is disposed of.
Contained within each virtual server is the code for a ‘guest’ operating system (guest OS)
and its associated application.
The guest OS is responsible for managing its own application.
In the VM model, each VM requires a guest OS, even though two of the VMs run the
same application – in this case ‘App A’.
Virtual Machine Image
Container Image
App A App A App B
Bin/Libs Bin/Libs Bin/Libs
Host OS Host OS
Server Server
Containers:
Application container essentially a file containing an application and associated
libraries.
The important difference is that an application container has no separate operating
system and is, therefore, much smaller: megabytes instead of gigabytes.
In the container model, shown on the right, if two containers run the same application
they can share any common functionality, such as the middleware represented by the
‘Bin/Libs’ layer
5) List three main techniques used for responsive design, which helps in creating sites for mobile
environments [3 marks]
Fluid design
Flexible images
CSS media queries (and device breakpoints)
PART III
School bus monitoring software is responsible for sending the current location of the bus to
the parents. In the process of designing and developing such software you as part of the
development team are required to
Provide an example of the URL that could be used to call the service. Note that the
class path is
http://School site/BusMonitoring/BusLocation/
http://school_site/Bus_monotring/BusLocation/longtiude1/latitude1/logtiude2/latitude2
@Path("Bus_monotring ")
public class school_site
{
@GET
@Path("BusLocation ")
@Produces(MediaType.TEXT_HTML)
Global DNS
Global NTP Server
Server
Internet
Router/NAT
Local NTP
Local DNS Server
Server Firewall
Load Balancer
Web Servers
Firewall
Database
myshop.co.uk
1. user expenence
a. installation ,
b. access time
2. development and update costs
3. used development technologies
4. the efficiency of using mobile device resources.
Based on the result of the comparison table provide a justification of your design choice for
acceptance or rejection for each choice
Installation: Run on the mobile device’s These are the apps that you
web browser (or a specially have to download from
tailored browser). places such as Apple’s App
Store, Google Play or
Windows Marketplace.
Development and update Developers require less skill But are likely to be more
costs and experience. time-consuming to port and
difficult to develop compared
to web apps
Used development Use HTML, CSS and Java for Android and
technologies JavaScript, and can therefore Objective-C for iOS
run on any operating system
that will run a standard web
browser application.
The efficiency of using mobile Native apps are capable of less efficiently than the native
resources making full use of the apps
device’s hardware limited in scope than native
capabilities (GPS, applications
microphones,
accelerometers, etc.).
End of Questions
2) Software as a Service (SaaS) is one the cloud model, you are asked to draw a diagram
that shows different layer, starting from the tenant down to the hardware.
4) In HTML5 the <form> element becomes quite a powerful tool in terms of support for
exchanging data. In this question you are asked to provide a complete HTML page
that has the flowing features:
Send an HTTP “post” request to a server-side servlet with the name
“registration_method”
Uses German Language
Uses Character set "utf-8"
Title “Engslish Skills Final Fall 2019”
The user should add his name, last name and a password to be able to submit a
“registration” request.
Provide the full HTML page that fulfill the above requirements.
Answer:
<label>Last name:</label>
<input type="text" name="LastName" value="Briggs">
label>User password:</label>
p = (c + k′) mod 26
where k′ is 23 =(26-k), Cipher:
‘XYZ
Answer: ‘XYZ’ (23,24,25). Decrypts to ‘uvw’ (20, 21, 22)
6) You are asked to write a JASON object that contains the following elements:
Inside the object, we have several name/value pairs. These are:
"CusomerID": 200
A property with the name CusomerID and the integer value 200.
"CusomerName": “Sami Samer”
A property with the name CusomerID and the integer value 200.
"contents": [ ... ]
A property with the name contents, whose value is an array.
Inside the contents array, we then have two objects representing individual order lines
in the cart. Each object contains three properties: itemID, itemName and quantity.
( You are free to fill the value of the these objects)
"customerEmail": "[email protected]"
A property with the name customerEmail and the string
value [email protected].
"orderCompleted": true
A property with the name orderCompleted and the Boolean value true.
Answer:
{
"customerID": 200,
“customerName”: “Sami Samer”,
"contents": [
{# accept any value for these objects
"itemID":1 ,
"itemName": "dddd" ,
"quantity": 2
},
{
"itemID": 2,
"itemName": "fffff" ,
"quantity": 2
}
],
"customerEmail": "[email protected]",
"orderFinished": true
}
7) In HTML5 the <form> element is used to send an HTTP client “get” request. provide
a complete HTML page that has the flowing features:
▪ Send an HTTP “get” request to a server-side servlet with the name “login_
servlet”
▪ Uses English Language
▪ Uses Character set “utf-8"
▪ The title is “AOU login page”
▪ The user should add his short ID as text and a password to be able to submit a
“login” request.
<label>student password:</label>
<input type="password" name="psw">
<!-- the main body of the form here -->
<button type="submit">Login</button>
</form>
</body>
</html>
8) You are asked to write a JASON object that contains the following elements:
o A property with the name tutorName and the integer value “Samer Adham”
o A property with the name semetser and the integer value “fall2020/2021”
o A property with the name Offred and the Boolean value true.
o Inside the sections array, we then have two objects representing individual
section for this course. Each object contains two properties: secID and
secLOcation.
}
],
}
p = (c + k′) mod 26
where k′ is 22 =(26-k), Cipher:
‘DF’
Answer: ‘ADF’ (1,4,6). Decrypts to ‘X,Z,B’ (23, 26, 2)
10) Platform as a Service (PaaS) is one the cloud model, you are asked to draw a diagram
that shows different layer, starting from the tenant down to the hardware.
Answer:
1) Define the cloud computing using your own word.
Answer:
Cloud computing is a model for enabling ubiquitous, convenient, on-demand
network access to a shared pool of configurable computing resources (e.g.,
networks, servers, storage, applications, and services) that can be rapidly
provisioned and released with minimal management effort or service provider
interaction.
The capability provided to the consumer is to deploy onto the cloud infrastructure
consumer-created or acquired applications created using programming languages,
libraries, services, and tools supported by the provider.
The consumer does not manage or control the underlying cloud infrastructure
including network, servers, operating systems, or storage, but has control over the
deploye applications and possibly configuration
6) The cloud service model Infrastructure as a Service (IaaS).
Answer:
The capability provided to the consumer is to provision processing, storage,
networks, and other fundamental computing resources where the consumer is able
to deploy and run arbitrary software, which can include operating systems and
applications.
7) The final part of the NIST cloud definition describes four different deployment
models.
Answer:
Private cloud
Public cloud
Hybrid cloud
Community cloud
8) Explain virtual machine:
Answer:
The virtual machine form of virtualisation takes the resources of a single physical
host computer (CPUs, memory and input/output devices) and shares them between
multiple guest computers.
10) The solution to overcome the resource and time overhead of virtual machine?
Explain how?
Answer:
12) What is the role of global [ُ إserver within a cloud system?
Answer:
The global NTP server sits outside the application, but its role is very important
because it provides the data required to synchronise the clocks of all the servers in
the application using the network time protocol (NTP)
13) What is the role of the global DNS server within a cloud system?
Answer:
The global DNS server is the key to the way that browsers locate websites because
they convert fully qualified domain names (e.g. www.open.ac.uk) into IP addresses
(137.108.198.32).
14) The router element fulfils two essential functions, what are they?
Answer:
The first of these is to convert the low-level signals and packets of one network
type into the signals and packets of another network type
▪ for example, to convert between the IEEE 802.3 (Ethernet) standard for
wired networks and the ADSL standard that connects your home to the
internet
The second function of a router is to interconnect different networks, such as
between different organisations or between departmental networks within a single
organisation.
17) What is the responsibility of a network node with -in the openstack cloud project?
Answer:
The network node is responsible for managing the network elements that are used
by VMs to communicate with the internet, which includes assigning IP addresses to
VMs, routing traffic amongst the VMs and between the VMs and the internet.
18) What is the responsibility of a compute node with -in the openstack cloud project?
Answer:
A compute node is the host computer for the guest VMs.
When a new VM is to be launched, the controller node posts a message to the
selected compute node and the compute node loads the image from the image
storage device.
The images block represents the disk storage used for VM images and it is managed
by one of the services running on the controller node.
New images can be loaded or removed by tenants, shared between tenants, or
marked as private for use by a single tenant.
20) How can and admin we manage/control the openstack cloud system?
Answer:
An OpenStack cloud has two modes of control, a web-based interface and a set of
application programming interfaces (APIs) for use with RESTful web services
22) The openstack is composed of many services, explain The networking Neutron
service.
Answer:
The networking Neutron service is chiefly concerned with providing connectivity for
VM instances so that they can interact with the outside world, usually on a company
intranet or the internet
23) The openstack is composed of many services, explain The compute service Nova.
Answer:
The compute service Nova is chiefly concerned with managing VM instances.
It can manage very large pools of VMs, scaling horizontally, and is very flexible in
working with a wide range of virtualisation technologies
24) The openstack is composed of many services, explain The image service Glance.
Answer:
The image service Glance manages the storage of VM images and disk images in a
range of different back-ends.
There are two types of storage in the basic architecture: block storage provided by
Cinder, and object storage provided by Swift.
25) Dd OpenStack is a collection of services, each service supports four approaches to
access, list all of them.
Answer:
The simplest method of accessing services is via the web dashboard Horizon
Each service has a command-line interface (CLI).
Each service has a set of Python-based application programmable interfaces (APIs).
Can be called using a declarative scripting approach written in YAML
(http://yaml.org/).
26) The mobile web (WAP 2.0) was established as standard circa 2002, for what kind of d
devices were built and how webpages where built?
Answer:
The ‘mobile web (WAP 2.0) standard circa 2002, was made tailored for viewing on
small-screen phones with low-resolution displays and GPRS (signaling).
Web pages built for the mobile web used a special markup language called Wireless
Markup Language (WML).
27) There are three broad ways in which mobile web designers can choose to address
the screen size issue:
Answer:
▪ do nothing
▪ maintain separate websites for desktop and mobile devices
▪ have one website that works for both desktop and mobile devices.
28) If the mobile web designers choose to do nothing to address the screen size issue,
what are the pros contras?
Answer:
Doing nothing doesn’t render the website unusable for mobile users, means relying
on touchscreen gestures to zoom in and out of the scaled-down website.
Extra effort for the user means that they may abandon your site for a competitor’s if
it offers a better mobile experience.
The advantage of doing nothing is, of course, that there is no extra work for
designers and developers, and so no extra cost.
29) What does the technique called ‘browser sniffing’ and in which context it is used ?
Answer:
The separate mobile site approach requires a way of detecting that a mobile device
is trying to access the website.
The redirection of mobile browsers to a separate URL is accomplished by a technique
called ‘browser sniffing
30) What does it mean “Responsive web design » in the contexte of web design.
Answer:
A design that offers the best possible user experience regardless of a user’s device,
screen size or resolution.
Works equally well on a desktop, tablet or mobile device.
Mobile users do not do anything in order to use the website effectively
31) Responsive web design relies primarily on taking advantage of three web design
techniques, list all of them.
Answer:
▪ Fluid design
▪ Flexible images
▪ CSS media queries.
33) How CSS media queries is used to allow wbpb pages well on a desktop, tablet or
mobile device?
Answer:
Responsive design is implemented using the same HTML but using different CSS in
order to present content differently according to screen width
34) What are A web apps? Give example.
Answer:
A web app is an application that runs inside a web browser.
It allows the user to fulfil a function that traditionally may have been fulfilled by a
desktop application.
For example, email, calendar and contacts used to require the installation of
software on your desktop machine.
38) D Generally, mobile apps are categorised as either native or web-based, what are
web-app, give example.
Answer:
Web apps are applications that run inside a web browser to simulate local
functionality.
Use HTML, CSS and JavaScript, and can therefore run on any operating system that
will run a standard web browser application.
Web apps → cross-platform.
Examples: Gmail, Outlook and Google Maps
39) List the main advantages of native apps.
Answer:
Native apps: include quality control through rating and feedback of other users.
They can be distributed through application stores: Google, Apple and Windows.
Work more efficiently with the target operating system.
45) If we chose cordova a tool for hybrid app, how the Interaction between the web
view and device functionality is achieved?
Answer:
Interaction between the web view and device functionality is provided through
JavaScript APIs provided by the Apache Cordova framework.
Each API essentially consists of two parts:
A JavaScript library that allows code running within the web view to request tasks
available on the mobile platform in question.
A library of functions that translate a request into the appropriate call to a native
API.
47) List at least five Cordova plug-ins for the device functions across mobile device
platforms.
Answer:
Cordova provides plug-ins for the following device functions across mobile device
platforms:
▪ battery status
▪ camera
▪ contacts
▪ accelerometer
▪ compass
▪ compass
▪ file system
▪ geolocation
▪ globalisation
▪ browser
▪ media
▪ media capture
▪ network information
▪ Web design typically follows the so-called model–view–controller
(MVC) pattern:
▪ Model – the underlying representation or data of the program.
▪ View – the presentation of the program to the users.
▪ Controller – where the business logic is held splash screen
▪ status bar
▪ storage
▪ vibration
49) Web design typically follows the so-called model–view–controller (MVC) pattern,
explain it.
Answer:
Model – the underlying representation or data of the program.
View – the presentation of the program to the users.
Controller – where the business logic is held
50) Specific to Cordova apps, what technology we use designing the presentation and for
implementing the business logic?
Answer:
Specific to Cordova apps, we use HTML5/CSS for designing the presentation, and
JavaScript for implementing the business logic.
We will use an internal data structure in the app for the timer model.
Take Home Exam for Final Assignment 2020-2021/Spring Semester
KSA Branch
Contents: Page #
General Instructions:
You are required to use the Answer Template attached with the FTHE to answer the
questions, you must declare the No Plagiarism Statement, and the footer of the
answer sheet must include your name and ID
Plagiarism Warning:
As per AOU rules and regulations, all students are required to submit their own THE-
Final work and avoid plagiarism. The AOU has implemented sophisticated techniques
for plagiarism detection. You will be penalized for any act of plagiarism as per the AOU's
rules and regulations.
public static void main(String[] args) { public static void main(String args[])
{
int num, reversedInteger = 0, remainder, originalInteger; int temp;
Scanner input = new Scanner(System.in); boolean isPrime=true;
System.out.println("Enter a number :"); Scanner scan= new Scanner(System.in);
num = input.nextInt(); System.out.println("Enter any number:");
originalInteger = num; int num=scan.nextInt();
for(int i=2; i<=num/2; i++)
while( num != 0 ) {
{ temp=num%i;
remainder = num % 10; if(temp==0) {
reversedInteger = reversedInteger * 10 + remainder; isPrime=false;
num /= 10; break;
} }
}
if (originalInteger == reversedInteger) if(isPrime)
System.out.println(originalInteger + " is a palindrome."); System.out.println(num + " is a Prime Number");
else else
System.out.println(originalInteger + " is not a palindrome."); System.out.println(num + " is not a Prime Number");
} }
} }
1.2 Given below is a Java Method. (5 Marks)
testSquireRoot(int num)
{
if (testNum < 0)
testNum := -testNum;
num := testNum;
}
Clients can only take insurance themes from one of the firm's branches, and the appropriate branch
should be noted for each insurance plan. A branch must have at least one staff contracted with it.
Each client is assigned a unique id and the information about each client to be kept by the system
are id, name, address, telephone, nationality and national Id. Each client is permitted to book a
number of insurance themes. Each insurance plan must link a client with an insurance theme and
the branch in which the insurance plan was made earlier. A branch must have at least one insurance
plan offered for clients. For each plan, the system also keep the registration date and policy amount.
Each client company may have zero or more insurance plans. Each client company must be advised
by a single staff and must belong to a single insurance theme. Each client company has a maximum
number of registrations and the system must ensure that the number of plans for a client company
does not exceed this maximum. For each client company, the system should record a unique id,
registration date, maximum number of registrations and address. One staff must coordinate each
insurance theme. A theme can have multiple client companies.
Each insurance theme consists of a number, at least one, of theme sub divisions arranged in a
certain criteria. A division sequence number could indicate this criterion. Each insurance theme is
Briefly describe any two design patterns using your own words.
You should describe two key advantages of applying the design patterns you
have selected
Provide at least one real world application of them.
3.2 Below given paragraph is based on the insurance management system scenario 12 Marks
described in question-2.
Assume a situation in which the insurance company’s HR system is utilizing a third party
billing system to provide a functionality to process the bonus amount of employees. In
the company’s HR System, the employee information has been stored as string array.
The third party billing system has various methods and a method called
computeBonus() will be used to calculate the employees’ bonuses. The method
requires an input value as a list, which is the employee list. This method is written in a
way to loop though each employee record. Then compute bonus and deposit into their
bank account. Here the problem is that the company’s HR System will not be able to
call the third party billing system because of the incompatibility of the data types
between the two systems. The third party billing system uses a list and the HR system
uses a string array which are in compatible.
Suggest an architectural pattern to make the two systems or their interfaces
work together.
Justify your answer
Your answer should include an appropriate diagram to demonstrate the
suggested pattern with explanation.
Identify all the operations in the classes.
Construct a sequence diagram for the following scenario based on the insurance policy application process:
To approve the application process of a client in which the initial message from the user interface is sent to the
policy class to verify the client. Then the user interface sends a message to the client by sending the application
number. The client will identify a policy scheme and send to the policy class. The client will complete the
application and then send the details to the manager.
You are required to identify the classes and corresponding operations. You do not need to consider the
alternative scenario to answer this question.
4.2 You are required to draw a state chart diagram for the below given scenario based on 7 Marks
Question-1.
This question is based on the insurance management system scenario described in question-2. Assume a
scenario of insurance policy application various states according to the below given description.
The insurance company manages various types of policies for its clients. The policy application process can be
done online. For a client, the application documents are accessible from anywhere after login to the system.
When the client login to the system, he/she sees all the options available. When the client clicks on policies
option, he/she will be able to search for the type of policies. Once the client finds a particular policy type they
can select the policy. The policy details will be displayed on the screen. The client confirms and the process
ends. The client can do the search for another type also, if they could not find the one he/she is looking for.
End of THE-Final
Code: TM352
Plagiarism Warning:
As per AOU rules and regulations, all students are required to submit their own THE-Final work and avoid plagiarism. The
AOU has implemented sophisticated techniques for plagiarism detection. You will be penalized for any act of plagiarism
as per the AOU's rules and regulations.
Declaration of No Plagiarism by Student (to be signed and submitted by student with THE-Final work):
I hereby declare that this submitted THE-Final work is a result of my own efforts and I have not plagiarized any
other person's work.
Signature : …………………………………………………..
Date : …………………………………………………..
https://www.coursehero.com/file/78680573/TM352-THE-Final-2020-2021-Falldocx/
Question 1: (80 marks)
Foreigner guide software is responsible for viewing and recommending various places. In the
process of designing and developing such software you as part of the development team are
required to
Provide an example of the URL that could be used to access the Web service given that the
site is http://ForeignerGuide_site.com
Based on the result of the comparison table provide a justification of your design choice for
acceptance or rejection for each choice
End of Assessment
https://www.coursehero.com/file/78680573/TM352-THE-Final-2020-2021-Falldocx/
Powered by TCPDF (www.tcpdf.org)
TM352 Web, Mobile and cloud technologies 1
Final Revision
T M 3 52
TM352 Web, Mobile and cloud technologies 2
Load
Balancer
Load
Balancer
Linux
MySQL
Linux Linux
MySQL MySQL
Important The elastic load balancing (ELB) service is responsible for distributing requests within and
across availability zones, As for a traditional network, it is the ELB that receives the internet traffic,
which it then distributes.
5) What is the role of the global DNS server within a cloud system?
❖ The global DNS server is key to the way that browsers locate websites because they convert fully
qualified domain names (e.g. www.open.ac.uk) into IP addresses (137.108.198.32).
❖ Recall that messages sent over the internet are sent using IP addresses, not friendly names.
UK Domain
Computer
The global NTP server sits outside the application, but its role is very important because it provides
the data required to synchronise the clocks of all the servers in the application using the network
time protocol (NTP)
Disk Drivers
Virtual
Drivers
Network
Operating
I/O System
Virtual server
Application
Virtual
Drivers
Operating
System
Virtual server
Application
Memory Allocation
TM352 Web, Mobile and cloud technologies 4
Important : Hybrid cloud. The cloud infrastructure is a composition of two or more distinct cloud
infrastructures (private, community, or public) that remain unique entities, but are bound together by
standardized or proprietary technology that enables data and application portability (e.g., cloud bursting
for load balancing between clouds).
8) What does the technique called ‘browser sniffing’ and in which context it is used?
When creating Separate mobile site (maintain separate websites for desktop and mobile devices)
- The only way to cater for these differences was to have separate sites for mobile & desktop users.
- This approach requires a way of detecting that a mobile device is trying to access the website.
- It then needs to redirect user to a separate mobile URL using either client- or server-side techniques.
- The redirection of mobile browsers to a separate URL is accomplished by a technique ‘browser sniffing’.
- Browser sniffing works because when requests a web page it identifies itself with a user agent string.
- This string contains details of the type of browser and the platform it is running on.
- A client- or server-side script then uses this to call a different web page
10)What does an image represent within the openStack project and what for is used?
Images: the images block represents the disk storage used for VM images and it is managed by one of
the services running on the controller node.
- New images can be loaded or removed by tenants, shared between tenants, or marked as private
for use by a single tenant.
Important: Storage: the storage block represents disk storage used for persistent data required by the
VMs.
User
Global DNS
Global NTP Server
Server
Internet
Router
Controller
Network
Images
OpenStack Cloud
Storage
Key
Management
VM traffic
Internet
myshop.co.uk
TM352 Web, Mobile and cloud technologies 6
11)How CSS media queries is used to allow web pages well on a desktop, tablet or mobile device?
CSS media queries (and device breakpoints)
- Responsive design is implemented using the same HTML but using different CSS in order to present
content differently according to screen width.
- In a responsive website when narrowing your browser window, you’ll notice that there are certain
widths at which the display contents change, these widths are called breakpoints.
- As a web designer, you decide at which widths you will implement these breakpoints.
- One way of deciding breakpoints is to work down from your desktop-designed website and narrow
your browser window until the design ‘breaks’.
- That is, it no longer works effectively for this screen size.
- At this width you will need a different design.
- For example, at a width of 960 pixels the website starts to break.
- Users can no longer see all of the Go button to activate a search, or ‘Contact Us’ link in global
navigation
- This would therefore be a good place to implement a breakpoint to call a different style sheet.
12)Describe in your own words the cloud service model Software as a Service (SaaS).
Software as a Service (SaaS). consumer uses provider’s applications running on a cloud infrastructure.
The applications are accessible from various client devices through either a thin client interface, such
as a web browser.
The consumer does not manage or control the underlying cloud infrastructure including network, servers,
operating systems, storage
Application
Middleware
Operating System
Hardware
TM352 Web, Mobile and cloud technologies 7
PART II
1) Infrastructure as a Service (IaaS) is one of the cloud models, you are asked to draw a diagram
that shows the different layers, starting from the tenant down to the hardware.
Operating System
Hardware
Infrastructure as a Service (IaaS). The capability provided to the consumer is to provision processing,
storage, networks, and other computing resources where the consumer is able to deploy and run
arbitrary software, which can include operating systems and apps.
Consumer doesn’t manage or control underlying cloud infrastructure but has control over operating
systems, storage, and deployed applications; and possibly limited control of select networking
components
2) OpenStack is a collection of services each produced by a different project under the OpenStack
foundation. In general, each service supports four approaches to access it, explain each of them
carefully, and provide examples if necessary.
Accessing OpenStack: Each service supports four approaches to access:
1. The simplest method of accessing services is via the web dashboard Horizon,
2. Each service has a (CLI). Some client software has to be installed (OpenStack CLI clients), &
commands can then be issued from a shell or console. (glance image-list)
3. Each service has a set of Python-based application programmable interfaces (APIs).
In general the APIs can be used from the Python language, from an HTTP REST client such as
the Linux curl command, or from a browser-based REST client.
Example: Services cimport glanceclient.v2.client as glclient
glance = glclient.Client(...)
images = glance.images.list()
4. Can be called using a declarative scripting approach written in YAML (http://yaml.org/).
- In OpenStack terminology a YAML description, which can create any number of resources and
actions, is called a ‘stack’.
TM352 Web, Mobile and cloud technologies 8
3) In HTML5 the <form> element is used to send an HTTP client “get” request. provide a complete
HTML page that has the flowing features:
- Send an HTTP “get” request to a server-side servlet with the name “login_ servlet”
- Uses English Language
- Uses Character set “utf-8"
- The title is “AOU login page”
- The user should add his short ID as text and a password to be able to submit a “login”
request. Provide a full HTML page that fulfill the above requirements.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title> AOU login page</title>
</head>
<body>
<form method="get" action="/ login_ servlet ">
<label> short ID:</label> <input type="text" name=" short ID " value="5577”>
<label> password:</label> <input type="password" name="password">
<button type="submit">login</button>
</form>
</body>
TM352 Web, Mobile and cloud technologies 9
4) You are asked to write a JASON object that contains the following elements: Inside the object,
we have several name/value pairs. These are
- A property with the name courseCode and the integer value “TM352”.
- A property with the name tutorName and the integer value “Maher Maher”
- property with the name semetser and the integer value “fall2019/2020”
- A property with the name Offred and the Boolean value true.
- A property with the name sections, whose value is an array.
- Inside the sections array, we then have two objects representing individual section for this
course. Each object contains two properties: sectionID and sectionLOcation. (You are free
to fill the value of these objects)
{ "courseCode": "TM352",
“tutorName”: “Maher Maher”,
"semester": " fall2019/2020",
"offred": true,
"sections": [
{
" sectionID ":100 ,
" sectionLOcation ": "Floor 1" ,
},
{
" sectionID ": 2,
" sectionLOcation ": "Lab2" ,
}
],
}
5) Assuming A is 1 and Z is 26, in a 26-character alphabet, the Caesar Cipher for a single character
can be expressed in pseudocode as: c = (p + k) mod 26 Assuming k is 6, and that a message
(composed of three characters) has been encrypt and the result is the word ‘CED’. You are asked
to decrypt the message, by first providing the decryption formula and Appling it to get the original
message
K=6
K’ = 26 – k = 26 - 6 = 20
C = (p+k) mod 26
char C E D
number 3 5 4
P+k 23 25 24
Mod 26 23 25 24
Plain text w y x
TM352 Web, Mobile and cloud technologies 10
PART III
There is only one (1) question, worth ten (10) marks. Suppose that you are in charge of the design of a
customer web application that is described below:
It is a startup company that collected crowd funds to develop a new game idea, where different players
across the world can cooperate to start a space mission to acquire the planet Mars. Players should be
able to use any devices, mobile and desktop having any kind of existing and future operating. The game
participants during any mission phase have to work together for many hours before moving to the next
phase.
Because mobile and desktop devices had different design considerations, there are two ways to cater for
these differences, you have the choice between the following two choices:
- Have separate sites for mobile and desktop users.
- Have one website that works for both desktop and mobile devices, using “Responsive web design
“.
You are asked to pick up one design and to justify your answer in front of a technical team form well
known consulting company, taking into consideration the audience who are going to use the web
application and the context of the application usage.
Provide a comparation table between your choice and the other choice. Use the following criteria for the
comparison table, you are free to add/replace any criteria.
[ one mark for each criterion, total of four marks]
1- Extra requirements to deploy the web site
2- User experience regardless of a user’s device, screen size or resolution
3- The technology used to develop the web site
4- Site maintenance
Based on the result of the comparison table provide a justification of your design choice that is in line
with table results. You are free to model the different criteria based on their importance for this kind of
app, some criteria are more relevant for this app context, so you have to provide a convincing design
choice, because this will be evaluated by experts, be precise and consistent and you should give the
impression that your technical skills about the different design choice are sound. [6 marks]
عمل الطالب حمدي ودعواتكم التوفيق للجميع
A protocol is a set of rules
All communications are governed by protocols.
Protocols are the rules that communications will follow.
Protocols Allow messages exchange between any two points on a network
• TCP/IP Model : The most common and is maintained by the Internet Engineering Task
Force (IETF)
Open Systems Interconnection (OSI) model was developed in the 1980s as a standard.
Open Systems Interconnection (OSI) model represent the communication functions of a
telecommunication or computing system without regard to the diverse underlying internal
structure and technology.
OSI Model
Description
Layer
2 - Data Link Describes methods for exchanging data frames over a common media.
TCP/IP Model
Description
Layer
Application Represents data to the user, plus encoding and dialog control.
Network Access Controls the hardware devices and media that make up the network.
The TCP/IP protocol suite does not specify which protocols to use when transmitting over a
physical medium.
OSI Layers Physical and Data Link discuss the necessary procedures to access the media and the
physical means to send data over a network.
Encapsulation
the process by which a lower-layer protocol receives data from a higher-layer protocol and then
places the data into the data portion of its protocol data unit (PDU) adding its own protocol
specific information .
Occurs at the sender
The reverse process is called decapsulation which occurs at the receiver
The HyperText Transfer Protocol (HTTP) is an application layer protocol enables communication
between distributed systems
It supports a mixture of network configurations : (HTTP)
Because (HTTP) makes no assumptions about hardware and network configuration it is defined
as a stateless, application-layer protocol
HTTP is essentially a request–response protocol
HTTP and HTTPS (the secure version of the protocol)
HTML web pages are pages written in HyperText Markup Language
The HTML document itself begins with <html> and ends with </html>.
The visible part of the HTML document is between <body> and </body>.
Client HTTP application could be an application that connects to the server typically on port 80
and sends HTTP requests
Client HTTP application is typically a web browser but we can connect to the server using an
programmed application(for example: java application )
The HTTP status codes are always three-digit numbers They are grouped into categories by the
first digit
The categories are shown in Table 4. Activity 2: Using HTTP from the client side
There are a number of things that can go wrong in any HTTP request
The HTTP protocol does not need to know messages are passed over networks
These details are governed in turn by other protocols that appear at lower levels in the Internet
Protocol (IP) stack
As HTTP messages pass down the stack, protocol layers add information to them.
GET: Requests a resource.
HEAD: The HEAD message asks for the headers but not the body that would be returned by an
identical GET method.
POST: Submits data.
PUT: Uploads a file or other resource.
DELETE: Deletes a file or other resource.
Packet loss, or ‘dropped packets’, occurs when one or more packets fail to reach their intended
destination.
Packet loss is typically caused by network congestion, or as faulty hardware or poor cabling.
at endpoints in the system determine whether or not packets were lost and whether through
TCP they should be retransmitted.
In a TCP connection the TCP protocol can also utilise the best route to avoid troublesome
network congestion.
A TCP connection consists of two socket endpoints, where each socket is specified as a host
and a port.
open standards are standards published for public use and available for third parties to read
and implement without royalties.
open standards are published for public use and available for third parties to read and
implement without royalties.
Open standards exist mainly to provide maximum interoperability irrespective of software,
operating systems and hardware.
Open standards also help to maximise access to resources and services on the web.
Engaging with open standards enables:
application independence: ensuring that access to resources is not dependent on any single
application
platform independence: ensuring access to resources is not restricted by particular hardware
platforms
architectural integrity: ensuring that the architectural framework for IT developments is robust
and can be further developed in the future.
The World Wide Web Consortium (W3C), the web standards body looking after a large number
of web technologies (HTML, URL, XML, HTTP (jointly with the Internet Engineering Task Force
IETF), CSS, WAI guidelines, Web Services, etc.)
W3C publishes documents that define Web technologies W3C publishes Recommendations,
which are considered Web standards.
The IETF is an open standards organisation responsible for publishing internet standards to
participate in the IETF there is no formal membership or membership requirements.
Architecture The discipline that defines the conceptual structure and functional behaviour of a
computer system, determining the overall organization, the attributes of the component parts,
and how these parts are combined.
It uses of open standards of the internet (XML, HTML, HTTP, TCP/IP, etc.).
Web services are typically intended for computer-to- computer interaction.
Commonly the protocols used in SOA include HTTP, FTP and SMTP
SOAP relies on other open application layer protocols, such as HTTP, or Simple Mail Transfer
Protocol (SMTP), for the exchange and transmission of the messages.
SOAP is a standard in its own right in that it is a W3C
◆ SOAP is an XML-based protocol with a message structure consisting of three distinct
parts:
an envelope that defines a framework for describing what is contained in a message and how
to process it
a set of encoding rules for expressing any specific instances of application-defined data types
a convention for representing remote procedure calls and responses
SOAP is a framework that specifies a structure and encoding for information.
SOAP consists of three parts:
• The SOAP envelope … construct defines an overall framework for expressing what is in
a message; who should deal with it, and whether it is optional or mandatory.
• The SOAP encoding rules … defines a serialization mechanism that can be used to
exchange instances of application-defined data types.
• The SOAP RPC representation … defines a convention that can be used to represent
remote procedure calls and responses.
A SOAP message consists of a single mandatory SOAP envelope
The SOAP message comprises an XML document information item that contains three distinct
elements:
<envelope>
<header>
<body>.
The request might be encoded in XML like this:
<?xml version="1.0"?>
<Convert>
<convert>
<fahr>41.0</fahr>
</convert>
</Convert>
The response might look like this:
<?xml version="1.0"?>
<Convert>
<convertResponse>
<celsius>5.0</celsius>
</convertResponse>
<Convert>
Upon request SOAP messages are transmitted from the sender to receiver.
Any software agent that sends or receives these messages is called a SOAP node.
The node that performs the initial transmission of a message is called the original sender.
The final node that consumes and processes the message is called the ultimate receiver and
any node the message between is called an intermediary.
Looks like this: SOAP defines three attributes to control how intermediaries and the ultimate
receiver process any given header block: role, Relay and mustUnderstand.
XML is a standard for documents that contain marked-up data and has become a common
format for data interchange on the web.
XML is an (approximate) abbreviation for Extensible Markup Language
XML is a standard published by the World Wide Web Consortium (W3C).
XML markup is very simple; each piece of data is marked with tags that both delimit and
identify it.
XML differs from HTML in one crucial aspect: the set of tags in XML is not fixed but can be
extended at will, simply by using a new tag for a new purpose.
An important difference between XML and HTML is that XML tags can focus on the
meaning of data rather than on its representation.
In being able to choose one’s own tags in authoring XML it is possible to create naming
conflicts within the code.
HTML XHTML
All tags and attributes are not necessarily to be in In this, every tag and attribute should be in lower
lower or upper case. case.
Doctype is very necessary to write at the top of
Doctype is not necessary to write at the top.
the file.
Filename extension used are .html, .htm. Filename extension are .xhtml, .xht, .xml.
A security policy defines what people can and can’t do with network components and
resources.
attacks result from a combination of poor coding standards, improperly configured servers,
and inadequate use of encryption techniques.
◆ The OWASP Top 10 – 2013 is as follows:
A1 Injection
A2 Broken Authentication and Session Management
A3 Cross-Site Scripting (XSS)
A4 Insecure Direct Object References
A5 Security Misconfiguration
A6 Sensitive Data Exposure
A7 Missing Function Level Access Control
A8 Cross-Site Request Forgery (CSRF)
A9 Using Components with Known Vulnerabilities
A10 Unvalidated Redirects and Forwards
According to Stallings (2014), this definition introduces three key objectives that are at the
heart of computer security:
◆ Confidentiality: This term covers two related concepts:
Data confidentiality: Assures that private or confidential information is not made available or
disclosed to unauthorized individuals.
Privacy: Assures that individuals control or influence what information related to them may be
collected and stored and by whom and to whom that information may be disclosed.
◆ Integrity: This term covers two related concepts:
Data integrity: Assures that information and programs are changed only in a specified and
authorized manner.
System integrity: Assures that a system performs its intended function in an unimpaired
manner, free from deliberate or inadvertent unauthorized manipulation of the system.
Availability: Assures that systems work promptly and service is not denied to authorized users.
These three concepts form a simple but widely applicable security model, often referred to as
the CIA triad
Exercise 1
15 minutes
For each of the following scenarios, which type of interference is taking place?
A hash is a calculation performed on a message, with the result given as a single value.
will result in a different hash value, so the hash value acts as a fingerprint of the message.
The Diffie–Hellman protocol is a way of generating a shared secret between two people in such
a way that the secret can’t be seen by observing the communication.
Diffie–Hellman key exchange relies on a series of mathematical operations that, if carried out
in two different orders but with the same numbers, will produce the same result.
Authentication is related to identification: it is demonstrating that you are who you say you
are.
Authorisation relates to permissions: it’s about what you are permitted to do, which might be
related to who you are, but not necessarily so.
Modern web servers support several methods for authenticating users, but we will limit this
discussion to the following options:
basic authentication
digest authentication
client certificates.
The security mechanisms used in IPv6 are described within the IP Security (IPSec) architecture,
which IPv6 implements, and which are extensions to IP header capabilities.
The NIST (National Institute of Standards and Technology) document defines a set of five
essential characteristics.
1. On-demand self-service. A consumer can unilaterally provision computing capabilities,
such as server time and network storage, as needed automatically without requiring
human interaction with each service provider.
2. Broad network access. Capabilities are available over the network and accessed through
standard mechanisms that promote use by heterogeneous thin or thick client platforms.
3. Resource pooling. The provider’s computing resources are pooled to serve multiple
consumers using a multi-tenant model, Examples of resources include storage,
processing, memory, and network bandwidth.
4. Rapid elasticity. Capabilities provisioned and released, in some cases automatically
(orchestration), to scale rapidly outward and inward commensurate with demand. To
the consumer, the capabilities available for provisioning often appear to be unlimited.
5. Measured service. Control and optimize resource use by leveraging a metering
capability to the type of service. Resource usage can be monitored, controlled, and
reported, providing transparency for both the provider and consumer of the utilized
service.
The three service models defined by NIST are:
1. Software as a Service (SaaS). the consumer uses provider’s applications running on a
cloud infrastructure.
Accessible from various client devices through either a thin client (web browser).
The consumer does not manage or control the underlying cloud infrastructure including
network, servers, operating systems, storage
2. Platform as a Service (PaaS). The consumer can deploy onto the cloud infrastructure
consumer-created or acquired applications created using programming languages,
libraries, services, and tools supported by the provider.
The consumer does not manage or control the underlying cloud infrastructure including
network, servers, operating systems, or storage, but has control over the deployed applications
and possibly configuration settings for the application-hosting environment.
3. Infrastructure as a Service (IaaS). The consumer can provision processing, storage,
networks, and other fundamental computing resources where the consumer is able to
deploy and run arbitrary software, which can include operating systems and
applications.
The consumer does not manage or control the underlying cloud infrastructure but has control
over operating systems, storage, and deployed applications; and possibly limited control of
select networking components
The final part of the NIST cloud definition describes four different deployment models, as
follows:
1. Private cloud. The cloud infrastructure is provisioned for exclusive use by a single
organization comprising multiple consumers (e.g., business units).
It may be owned, managed, and operated by the organization, a third party, or some
combination of them, and it may exist on or off premises.
2. Community cloud. The cloud infrastructure is provisioned for exclusive use by a specific
community of consumers from organizations that have shared concerns (e.g., mission,
security requirements, policy, and compliance considerations).
It may be owned, managed, and operated by one or more of the organizations in the
community, a third party, or some combination of them, and it may exist on or off premises.
3. Public cloud. The cloud infrastructure is provisioned for open use by the general public.
It may be owned, managed, and operated by a business, academic, or government
organization, or some combination of them.
It exists on the premises of the cloud provider.
4. Hybrid cloud. The cloud infrastructure is a composition of two or more distinct cloud
infrastructures (private, community, or public).
The image service Glance manages the storage of VM images and disk images in a range of
different back-ends.
There are two types of storage in the basic architecture: block storage provided by Cinder, and
object storage provided by Swift.
OpenStack is a collection of services each produced by a different project under the OpenStack
foundation.
In general, each service supports four approaches to access:
1. The simplest method of accessing services is via the web dashboard Horizon,
2 Each service has a command-line interface (CLI). Some client software has to be installed
(OpenStack command-line clients), and commands can then be issued from a shell or console.
Example: glance image-list
3. Each service has a set of Python-based application programmable interfaces (APIs).
In general the APIs can be used from the Python language, from an HTTP REST client such as the
Linux curl command, or from a browser-based REST client.
Example:
Services cimport glanceclient.v2.client as glclient
glance = glclient.Client(...)
images = glance.images.list()
4. Can be called using a declarative scripting approach written in YAML (http://yaml.org/).
In OpenStack terminology a YAML description, which can create any number of resources and
actions, is called a ‘stack’.
3. The most common cloud operation performed in platforms such as OpenStack is to start a
VM.
Before you can start a VM you have to have established appropriate networking and an
environment for it to run in and be accessible. Before you go on to actually work with
OpenStack and run a VM, you can preview the process by viewing some short videos in Activity
Later, in a subsequent activity, you will be guided through the steps shown in the video
Mobile web v The ‘mobile web (WAP 2.0) standard circa 2002, was made tailored for viewing on small-
screen phones with low resolution displays and GPRS (signaling). v Web pages built for the mobile web
used a special markup language called Wireless Markup Language (WML). v A separate protocol for
sending and receiving these pages between browser and server called Wireless Application Protocol
(WAP). v Nokia’s 7110, released in 1999, was the first mobile phone to come with a WAP browser. v It
didn’t have a touch screen and the display was greyscale.
Mobile website design strategies
As a website designer, it is crucial that you know your audience.
Because of the growing part of your audience is likely to be using a
mobile device.
The unique characteristics that differentiate mobile and desktop.
devices pose challenges for those designers who want to create.
websites that will work well with both.
Foremost amongst these challenges is the issue of screen size.
Foremost amongst these challenges is the issue of screen size.
• do nothing.
• maintain separate websites for desktop and mobile devices.
• have one website that works for both desktop and mobile devices.
We will consider each of these strategies in turn
Responsive web design
• A design that offers the best possible user experience regardless of a user’s device,
screen size or resolution.
• Works equally well on a desktop, tablet or mobile device.
• Mobile users do not do anything in order to use the website effectively.
• Adjusts their content according to the width of the web browser window.
• Text is reflowed and resized, columns collapsed and expanded, menu options appear
and disappear, images shrink and enlarge.
Three principles of responsive web design
v Responsive web design relies primarily on taking advantage of
three web design techniques:
• Fluid design
• Flexible images
• CSS media queries
Fluid design
• Rather than images being cropped as the viewport width becomes smaller.
• The whole image got smaller as the viewport width decreased.
• The website is made up of layer upon layer of CSS styling, in orderto see the effect of
using flexible rather than fixed images.
CSS media queries (and device breakpoints)
• Responsive design is implemented using the same HTML but using different CSS in order
to present content differently according to screen width.
• In a responsive website when narrowing your browser window, you’ll notice that there
are certain widths at which the display contents change, these widths are called
breakpoints.
• As a web designer, you decide at which widths you will implement these breakpoints.
Web apps
❖ Native apps: include quality control through rating and feedback of other users.
❖ They can be distributed through application stores: Google, Apple and Windows.
❖ Work more efficiently with the target operating system.
❖ But are likely to be more time-consuming to port and difficult to develop compared to
web apps
❖ A native app for one platform would require substantial changes to make it run on
another platform.
❖ Native apps are capable of making full use of the device’s hardware capabilities (GPS,
microphones, accelerometers, etc.).
❖ Developers (Android, iOS and Windows Phones) requires a specialised technical skillset,
❖ Native apps for Android devices simpler than creating them for iOS.
❖ Developing apps for Windows mobile devices is also a comparatively simpler.
Native apps
Developers (Android, iOS and Windows Phones) requires a specialised technical skillset,
Native apps for Android devices simpler than creating them for iOS.
Developing apps for Windows mobile devices is also a comparatively simpler.
❖ Web apps will work on all OSs,
❖ Developers require less skill and experience.
❖ But less efficiently than the native apps.
❖ Are generally built using HTML5, CSS3 and JavaScript.
❖ Run on the mobile device’s web browser (or a specially tailored browser).
❖ HTML5 will encode the application’s interface, CSS3 will give it its distinctive ‘look and
feel’ and JavaScript will provide business logic processing.
Web apps
❖ They are slower to load and less responsive than native apps.
❖ There are also security issues: they reveal their source code to users.
❖ When connecting to a remote server-based system it can potentially compromise
security.
❖ Despite the fact that HTML5 introduces a number of new features (Canvas, Web
Workers, Video, etc.,).
❖ However, web applications will inevitably be rather more limited in scope than native
applications.
hybrid approach
❖ Developing a web app or a native app is not a simple choice.
❖ It is impossible to give a generic recommendation.
❖ unless you know the contextual factors such as programming experience, resources, the
intended scope of the application, and so on.
❖ A middle ground in the native versus web app debate-→is the hybrid approach.
❖ It allows developers to deploy native code to multiple mobile device platforms from a
single code base made of HTML, CSS and JavaScript.
❖ No need for native app developers skills.
❖ Existing skills (web) enables quick and easy app deployment to multiple mobile
platforms.
❖ The hybrid (partly web app, partly native app) approach to app development is typically
enabled by a software framework.
❖ A layer between the browser technology and the underlying device capabilities.
❖ No need to know device-specific application program interfaces (APIs).
❖ There are a number frameworks (development) to choose from.
❖ Most popular one is the open-source Apache Cordova
Hybrid apps
Interaction between the web view and device functionality is provided through JavaScript APIs
provided by the Apache Cordova framework.
Each API essentially consists of two parts:
▪ A JavaScript library that allows code running within the web view to request tasks
available on the mobile platform in question.
▪ A library of functions that translate a request into the appropriate call to a native API.
▪ A Cordova plug-in can be seen as an intermediate JavaScript broker between browser
events and native APIs (Java for Android and Objective-C for iOS).
▪ Plug-ins frees programmers form the details in native operating systems.
▪ Cordova provides plug-ins for the following device functions across mobile device
platforms: battery status
▪ camera
▪ contacts
▪ accelerometer
▪ compass
▪ compass
▪ file system
▪ geolocation
▪ globalisation
▪ browser
▪ media
▪ media capture
▪ network information
▪ splash screen
▪ status bar
▪ storage
▪ vibration.
▪ Apache Cordova supports building and deploying mobile apps to all major mobile device
platforms including:
▪ Android
▪ Blackberry
▪ iOS
▪ Ubuntu
▪ Windows Phone.
Installing and configuring Apache Cordova
▪ Setting up your hybrid development environment using the Apache Cordova framework
takes some time, but you only have to do it once.
▪ Cordova is the main piece of software that we need to build hybrid apps,
▪ But in order to install Cordova we need some software called Node.js, so we must install
this first.
▪
▪ Node.js, or ‘Node’, as it is sometimes called, is a server-side JavaScript engine.
▪ It allows the execution of JavaScript outside of the web browser.
▪ Your Node.js download included npm, the command line tool that enables installation
of additional Node.js applications, including Cordova.
Mobile requirements and design
▪ It is likely that you can already find some apps delivering the same, or similar, functions
to your idea.
▪ If not, congratulations, you have identified a gap.
2-resouse pooling: The provider's computing resources are pooled to serve multiple consumers
1- Software as a Service (SaaS): The consumer provides a service in order to run some applications
Tenant Tenant Tenant
Application
Middleware
Operating System
Hardware
2- Platform as a Service (PaaS): Provides a service to the consumer in order to provide a software
environment to run the applications that he wants
Tenant Tenant Tenant
Middleware
Operating System
Hardware
3- Infrastructure as a Service (IaaS): It provides the consumer with almost complete control over
the service
Tenant Tenant Tenant
Operating System
Hardware
physical layer and abstraction layer
Applications (SaaS)
Abstraction
Layer Software (PaaS)
Infrastructure (IaaS)
Physical
Server, Storage & Network
Layer
-physical layer : The layer that the consumer controls the service
-abstraction layer :The part that the consumer cannot control or change anything in the service
1- Public cloud: Applications and services that everyone can access- It exists on the premises
2-Private cloud: applications and service specific for Organization-it may exist on or off premises.
4-Community cloud: The cloud infrastructure is provisioned for exclusive use by a specific community of
consumers from organizations that have shared concerns- it may exist on or off premises
California Santa Barbara (UCSB) and IBM layered cloud model (UCSB+IBM model) :
Note : model comprises physical layer five layers / abstraction layer two more layers
Cloud applications (SaaS)
1-Storage(Dass)
2-communication(Cass)
2-firmware/hardware(Haas
Note: developed by Christofer Hoff to include in his professional presentations about cloud security.
fore the many elements hidden within the NIST and UCSB+IBM models:
de
Presentation Presentation
dd
Data Voice Video PC Mobile
be
Modality Platform
Em
t
en
em
APIs
ag
an
M
Salesforce
d
te
Applications Google Apps
ula
Native Web
Em
Oracle On Demand
d
d
re
re
ctu
c tu
Data Metadata Content
u
ru
str
St
Un
e
g
at
se
g
gin
tic
uin
ba
Integration and middleware Google App Engine
sa
n
e
ta
he
es
Qu
Da
t
Au
M
t
en
em
APIs an
ag Amazon API
M
Infrastructure as a Service (IaaS)
d
te
Software as a Service (SaaS)
de
Platform as a Service (PaaS)
ica
Presentation Presentation
g
lan d
Data Voice Video
Security PC Mobile
ed
cin
Ba Loa
ModalityCore connectivityPlatform
and delivery DNS
t
en
b
Em
th
Au
nt
me
Abstraction
APIs Images
ge
na
Ma
Amazon EC2
Salesforce
te
d
pu
Hardware
e
Network Storage
m
lat
u
Em
Oracle On Demand
ed
Facilities
d
r
ctu
c tu
str
St
Un
a te
g
e
g
gin
1-IaaS
as
tic
uin
n
e
ss
the
Qu
Da
Me
Au
t
en
em
te
Software as a Service (SaaS)
Platform as a Service (PaaS)
ca
g
lan d
cin
nti
Ba Loa
Abstraction Images
Amazon EC2
ute
1-Facilities
2-Hardware
3- Abstraction
Note: corresponds to the software kernels and middleware of the UCSB+IBM model and represents any
hypervisor or cluster management software./ image
4-Core Connectivity and Delivery
Note : The graphical representation of the third and fourth layers is intended to highlight their
interdependence.
Domain NamePresentation
System (DNS), load balancing, security and authentication
d
de
Presentation
Data Voice Video PC Mobile
ed
Modality Platform
b
Em
5. APIs
nt
me
APIs
ge
Note : represents the application programming interface that gives the IaaS tenant the means to Ma
na
Salesforce
manage, monitor and control all of their cloud components./ managerment
d
e
lat
Applications Native Web Google Apps
u
Em
2- PaaS Oracle On Demand
ed
red
r
ctu
u
str
Str
Un
te
g
e
tica
g
gin
as
uin
ssa
n
e
the
Qu
Da
Me
Au
t
en
em
Note: single
APIs layer Amazon API
ag
n
Ma
Infrastructure as a Service (IaaS)
ca
g
lan d
cin
nti
Ba Loa
Note: These are not tenant services, but services that support functioning of the cloud.
Au
Abstraction Images
3-SaaS:
Amazon EC2
database, Hardware
messaging and authentication
ute
Network Storage
mp
Co
de
Presentation Presentation
dd
Modality Platform
Em
APIs
ag
an
M
Salesforce
d
te
Native Web
Em
Oracle On Demand
d
d
re
re
ctu
c tu
str
St
Un
e
g
at
se
g
gin
tic
uin
ba
he
es
Qu
Da
t
Au
M
t
en
em
te
Software as a Service (SaaS)
Platform as a Service (PaaS)
ica
g
lan d
cin
Ba Loa
Abstraction Images
2- Applications
3- API
-The level of detailed required will depend on the end goals of the task.
- Hoff :if you need to implement regulatory requirements related to email usage
saas
Application
Middleware
Operating System
Hardware
Paas
Middleware
Operating System
Hardware
Iaas
Tenant Tenant Tenant
Operating System
Hardware
Applications (SaaS)
Abstraction
Layer Software (PaaS)
Infrastructure (IaaS)
Physical
Server, Storage & Network
Layer
d
de
Presentation Presentation
Data Voice Video PC Mobile
ed
Modality Platform
b
Software kernels and middleware
Em
Physical
nt
Layer
me
APIs Firmware/Hardware (HaaS)
ge
na
Ma
Salesforce
ed
lat
Applications Native Web Google Apps
u
Em
IaaS Oracle On Demand
ed
d
re
r
ctu
c tu
Data Metadata Content
Looking within the IaaS block you can see five layers.
u
ru
str
St
Un
a te
g
e
g
gin
as
tic
uin
Integration and middleware Google App Engine
tab
n
e
ss
the
Qu
Da
Me
Au
t
en
em
te
Software as a Service (SaaS)
Platform as a Service (PaaS)
ca
g
lan d
cin
nti
Ba Loa
Abstraction Images
Amazon EC2
ute
Virtual machines
Disk Drivers
Operating
System
Network
Application
I/O
Memory Allocation
Host OS Host OS
Server Server
Load
Balancer
Load
Balancer
Linux
MySQL
Linux Linux
MySQL MySQL
User
Global DNS
Global NTP Server
Server
Internet
Router/NAT
Local NTP
Local DNS Server
Server Firewall
Load Balancer
Web Servers
Firewall
Database
myshop.co.uk
Expanded representation of the OpenStack cloud
Controller
Node Network
Node
Images
Storage
Key
Management
VM traffic
Internet