9/24/19 1 MOBILE APPLICATIONS AND CLOUD COMPUTING Roberto Beraldi Course Outline Mobile Application Cloud Computing Android iOS ≈70 % ≈ 30 % TOPIC Exam Written part Course homepage: http://www.diag.uniroma1.it/~beraldi/MACC Project (1 or 2 students) 0.3 0.7 Design Use Weight
34
Embed
MOBILE APPLICATIONS AND CLOUD COMPUTING ...beraldi/MACC/01_Introduction_OK...Data X Pattern: Model View View (MVVM) Binding makes data and view synchronized Any change in the data
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
9/24/19
1
MOBILE APPLICATIONS AND CLOUD COMPUTINGRoberto Beraldi
Functional decomposition of a generic app• User Interaction:
• occurs mostly through GUI (gestures, …)• or other channels (vibration, notification)
UI
BUSINESSLOGIC • What the application ‘does’
DATA • How data are stored and managed
Tier
(or l
evel
)
9/24/19
3
Deploy architecture: how to map a three-tier architecture (tieràdevice)• Presentation tier à {M} M=Mobile, C=Cloud• Business logic à {M,C}• Data tier à {M,C}
PRESENTATION
BUSINESS
DATA
phon
e
[M,M,M]
PRESENTATION
BUSINESS
DATAclou
dph
one
[M,M,C]cl
oud
phon
e
PRESENTATION
BUSINESS
DATA
DATA
[M,M,M|C]
Deploy architecture: how to map a three-tier architecture (tieràdevice)
• Apps may strongly rely on a set of ‘services’ running remotely
PRESENTATION
BUSINESS
DATA
[M,C,C]
PRESENTATION
BUSINESS (C)
DATA
BUSINESS (S)
[M,M/C,C]
9/24/19
4
Mashup
G B1
SMARTPHONE
B3
B4
D
B2
DB2
D
An example
-Wheatear Underground-Dropbox-Flicker
GUI
-Firebase-GAE …
-Google Maps
May
be
Stro
ngly
Inte
grat
ed in
IDE
Web
API
, WS
(may
pro
vide
s SD
K)
Backend
MB
-as-
a-Se
rvic
e(p
ush
notif
actio
n, m
essa
ges,
etc
AuthenticationService-Facebook (e.g, Oauth)
Frontend
9/24/19
5
Another example
GUI
-Cloud9-Heroku..
PaaS
& S
aaS
(writ
e yo
ur O
wn
API)
Mashup App
Backend
Web
API
, RES
Tful
l WS
Storage
Frontend
Example: using a ‘smart object’
Connect to configure
Object search for a wifi SSID
9/24/19
6
Example: using a ‘smart object’
Logical communicationE.g. Send commands
Public internet
Example: using ‘smart objects’
NAT/PATPublic network
Private network
NameàIP
Dynamic DNS
9/24/19
7
Example
Configure
Commands
Citzens of internet
INTERNET
Things(Consumer IoT)
9/24/19
8
Fog Computing
What is next?
100 ms
Bandwidth
Automated driving(<5ms)
Tactile Internet (>1Gbps,<1ms,99,999%)
10 Gbps
RTT
1 ms
ReliabilitySecurity
Mbps
Industry 4.0Mbps,<10ms,99,999%)
Content Delivery
9/24/19
9
Some popular technologies
Front-end
Back-end
Kotlintitanium
Some popular technologies
CloudServiceWeb-API
Front-end
Back-end
Storage
9/24/19
10
Deploy architecture• An App can be composed of different services access via
a standard protocol
• One widely used solution is to expose them as services accessed via a standard interface (e.g., REST) and supporting CRUD operations
Example of an interface for a chess game
Web API
(cloud)
init
• Send the current state
• Reply with the new state
Interface (remote functions)
backendfront end
move
Presentation (View) +Controller
Business logic + data
9/24/19
11
Design patterns• The design and implementation of an application is
achieved following some design pattern
• The main goal of a pattern is guide the software structure (architecture) in order to reach (among other goals) a high degree of flexibility (change or add functionality) and software testability (e.g. unit test)
• To this end, a patterns aims at organizing software in components that are loosely coupled (independent), so that the change in one component doesn’t affect other components
Model View Controller (MVC)Model View Controller
Presentation X
Business X X
Data X
• Business logic is not confined in one place
• Model and view are coupled
9/24/19
12
Patterns: MVC and MVP
MVP (Presenter): Model and View cannot communicateImproves testability and flexibility (change/add code)[MVC maybe fine for simple apps]
Model View Controller Presentation X
Business X
Data X
Pattern: Model View View (MVVM)
Binding makes data and view synchronizedAny change in the data is notified to the view by the ViewModelGood abstraction for Event driven programming
9/24/19
13
Example of MVVM in android
MVVM has strong support via jetpack MVC can still be used for small app
Example: MVC in iOS
9/24/19
14
The role of framework
• A software ‘framework’ surronds the application software
APPLICATION (SW YOU WRITE)MVC MVVM
An example
Framework
SW components
UISW you write
loop
deliver
create
onCreate
9/24/19
15
Android framework
iOS framework
9/24/19
16
Mobile app classification• Web-site for mobile devices:
• deliver web content to mobile devices, using web site style navigation
• Mobile Web: • web application that mimics native apps look and feel as well as
navigation
• [Andorid|iOS] Native:• Applications installed on the devices, purched from app stores
• Hybrid:• Mix web and native applications
• Native:• C/C++
Why so many options, how to decide?• Complexity of the app• Productivity• Cross-platform • Quality of Experience• Testability • Performance • Accessible features