COMP3207 - Cloud Application Development
Cloud Computing Overview
Cloud Computing: the delivery of on-demand system resources, particularly
data storage and computing power, without direct management by
the user
A Cloud Service Provider is a third-party company offering a cloud-based platform,
infrastructure, application, or storage service. Examples of
CSPs are Amazon Web Services (AWS), Microsoft Azure, and Google Cloud Platform.
Type |
Method |
Examples |
On-Premises |
Data stored locally |
Home PC |
IaaS (Infrastructure as a Service) |
- Allows management of computers, networking, and storage over a network - Allows full system management - Allows low-level control |
Amazon Cloud, Magento, VMware, VirtualBox |
PaaS (Platform as a Service) |
- Provides software and applications over the internet - Allows users to develop, run, and manage applications - Networks, servers, storage, and middleware are provided |
Google App Engine, Windows Azure, SQL Azure |
SaaS (Software as a Service) |
- Utilises the internet to deliver applications, often runs through a web browser - Hosted on a remote server - Accessible over the internet - User does not control hardware or software |
Google Apps, Dropbox, Office 365 |
Serverless Architectures
Serverless: cloud computing execution model where the cloud provider
runs the server and dynamically manages resource allocation
Serverless means that code runs only on-demand and on a per-request basis.
Frontend: frontend infrastructure includes everything the end user
interacts with, and makes up the user interface. This includes components such as local networks, web browsers, and web applications
Backend: backend architecture is comprised of hardware and storage
located on servers, and powers the frontend architecture
Type |
Method |
Examples |
BaaS (Backend as a Service) |
- Provides backend functions in a mobile or web
application Common features such as: - social network integration - user management - notifications
- Each service has its own API which can be incorporated into an app - This creates a reusable backend which improves accessibility and performance |
Firebase, Heroku, PythonAnywhere, Rackspace, BaasBox, UserGrid |
FaaS (Function as a Service) |
- Allows users to develop, run, and manage applications without
maintaining infrastructure - Abstracts servers from the user - Associated with on-demand functionality - The user only pays for execution time |
AWS Lambda, Google Cloud, Apache OpenWhisk |
Amazon Web Services
AWS Lambda: event-driven, serverless platform provided by Amazon as
part of Amazon Web Services
Microsoft Azure
Microsoft Azure: cloud computing service for developing, testing,
deploying, and managing web applications through Microsoft
servers
Google App Engine
Google App Engine (GAE): cloud computing platform for developing and hosting web
applications in Google data centers
Development Life Cycle:
JavaScript
Node.js: open-source, cross-platform, backend JavaScript runtime
environment built on Chrome's JavaScript engine which
executes JavaScript code locally.
Variables
JS has three kinds of variable declarations:
Data Types
JS uses the following eight data types:
Type |
Values |
Object |
superclass of other data types |
Boolean |
true, false |
Number |
integer, floating point number |
BigInt |
integer with arbitrary precision |
String |
sequence of characters |
Symbol |
unique immutable character |
null |
null value |
undefined |
variable which has been declared but is unassigned |
JS is dynamically typed - values are typed but variables are not
Conditional Statements
Loops & Iteration
==, != |
equal, not equal |
===, !== |
strict equal, not equal |
>, <, >=, <= |
comparative |
+, -, *, /, %, ** |
mathematical |
++, -- |
increment, decrement |
&&, ||, ! |
logical |
Collections
Functions
function square(number) {
return number*number;
}
Higher Order Functions
Object Functions
JavaScript in Web Pages
Document Object Model (DOM): formal API which abstracts the elements of HTML into a
hierarchical structure consisting of nodes accessed by standard
methods
document.querySelectorAll("p")
allA = document.querySelectorAll("a")
allURLs = Array.from(allA).map(a => a.getAttribute("href"))
allHTTPURLs = allURLs.filter(u =>
u.startsWith("http"))
Asynchronous Programming
Asynchronous Programming: method of parallel programming where tasks can run
separately to the main application thread and communicate their
completion, failure, or progress
<p class="credits"> <date>2013</date>…
document.querySelector("date").textContent
new Date().getFullYear()
function checkdate() {
if (document.querySelector("date").textContent == new Date().getFullYear())
alert("correct");
else alert("incorrect");
}
window.onload = checkdate
Callbacks & Promises
Callback: function which executes after another function is
complete
Callback declaration:
function addOne(number, callback) {
alert(number +1);
callback();
}
addOne(1, callback);
Promise: alternative to a callback which represents the result of
an asynchronous operation
A promise can be pending, fulfilled, or rejected:
Promise declaration:
Promises can be connected to consuming functions such as then and catch:
Software Development Practices and Tips
Practices for Software Development
What are the barriers to writing good code?
Technical Debt: implied cost of additional work caused by choosing an
limited solution rather than a more complex approach
Maintainability: ease with which a software system or component can be
modified to correct faults, improve performance, or adapt to a
changed environment
Top Tips for Software Development