Devices Platforms - FEUPapm/CM/docs/01Intro.pdf · 2019. 9. 17. · Mobile Computing APM@FEUP 3...

16
1 Mobile Computing APM@FEUP Mobile Computing Devices Platforms

Transcript of Devices Platforms - FEUPapm/CM/docs/01Intro.pdf · 2019. 9. 17. · Mobile Computing APM@FEUP 3...

Page 1: Devices Platforms - FEUPapm/CM/docs/01Intro.pdf · 2019. 9. 17. · Mobile Computing APM@FEUP 3 Mobile devices - capabilities Software: distributed applications with the specificities

1Mobile Computing

APM@FEUP

Mobile Computing

Devices

Platforms

Page 2: Devices Platforms - FEUPapm/CM/docs/01Intro.pdf · 2019. 9. 17. · Mobile Computing APM@FEUP 3 Mobile devices - capabilities Software: distributed applications with the specificities

Mobile Computing

APM@FEUP 2

Mobile Devices - Categories

❖ Mobile phones

❖ Smartphones (no keyboard + touch)

❖ PDAs (personal digital assistants)

•pocket assistant without phone

❖ Wearables (watches, glasses)

❖ Handhelds (and ultra mobiles)

❖ Tablets (and phablets)

Page 3: Devices Platforms - FEUPapm/CM/docs/01Intro.pdf · 2019. 9. 17. · Mobile Computing APM@FEUP 3 Mobile devices - capabilities Software: distributed applications with the specificities

Mobile Computing

APM@FEUP 3

Mobile devices - capabilities

❖Software: distributed applications with the

specificities of mobile devices

• Information access anyplace and anytime

• Storage and local processing

• Specific interface elements

▪ Mainly based in ‘touch’, ‘multitouch’ and ‘gestures’

• Special functions and sensors

▪ GPS and localization (satellite, WiFi, …)

▪ Compass (magnetic) and orientation

▪ Acceleration and movement (accelerometer and gyroscope)

• Communications ‘wide’ and ‘short range’

▪ 3/4/5G, WiFi, Bluetooth, NFC

❖Applications

• For the enterprise

• For learning / entertainment / social interaction

Page 4: Devices Platforms - FEUPapm/CM/docs/01Intro.pdf · 2019. 9. 17. · Mobile Computing APM@FEUP 3 Mobile devices - capabilities Software: distributed applications with the specificities

Mobile Computing

APM@FEUP 4

Platforms❖ Operating Systems (many were developed and are available)

• Android

• iOS (Apple)

• BlackBerry

• Symbian

• Bada (Samsung)

• WebOS (Palm)

• Chrome OS

• Others …

❖ Generic frameworks• Java ME (some models still support it)

• PhoneGap (Apache Cordova), Ionic, Titanium Mobile, RhoMobile, …

• Xamarin (.NET C#) (iOS, Android, Mac, Windows)

• React Native (JS), Flutter (Dart)

❖ Application types• Web apps – generic mobile browsers (XHTML, HTML5, javascript)

• Hybrid apps – web technologies encapsulated in a native container

• Native apps – using the OS and a specific or generic framework

Page 5: Devices Platforms - FEUPapm/CM/docs/01Intro.pdf · 2019. 9. 17. · Mobile Computing APM@FEUP 3 Mobile devices - capabilities Software: distributed applications with the specificities

Generic architecture

❖ The typical three tier architecture

• In a connected environment some tiers can be remote

or shared

Mobile Computing

APM@FEUP 5

Page 6: Devices Platforms - FEUPapm/CM/docs/01Intro.pdf · 2019. 9. 17. · Mobile Computing APM@FEUP 3 Mobile devices - capabilities Software: distributed applications with the specificities

Mobile Computing

APM@FEUP 6

Generic connected application architecture

Client

Interface

Logic

Data

Server

Interface

Logic

Data

Web

Services

Sync, Caches, Notifications

wireless

Page 7: Devices Platforms - FEUPapm/CM/docs/01Intro.pdf · 2019. 9. 17. · Mobile Computing APM@FEUP 3 Mobile devices - capabilities Software: distributed applications with the specificities

Areas of special interest

❖ Application life cycle•Usually different from desktop applications

•Mobile apps could be suspended by another app

• It should be possible to resume a background app without loosing state

❖ Local data storage•Several forms: settings, files, databases, …

•Full relational databases are available on the device

•Even NoSQL flavors are now available

❖ Connectivity•Despite all advertisement, it’s not 100% reliable

•Data synchronization

•Occasionally connected functionalities

Mobile Computing

APM@FEUP 7

Page 8: Devices Platforms - FEUPapm/CM/docs/01Intro.pdf · 2019. 9. 17. · Mobile Computing APM@FEUP 3 Mobile devices - capabilities Software: distributed applications with the specificities

Specially interesting mobile design patterns (1)

❖ Interaction patterns

• Back-and-save

▪Save input screen data when the user leaves the screen

• Auto save

▪Save the user input periodically

• Guess-Don’t-Ask

▪Avoid user input, specially writing text

▪ If you can’t guess, remember

• A-la-Carte-Menu

▪ At any time the user should know all actions and options available

• Sink-or-Async

▪ Operations longer than 1 s should be asynchronous

• Logon-and-forget

▪When possible, credentials should be asked only once

Mobile Computing

APM@FEUP 8

Page 9: Devices Platforms - FEUPapm/CM/docs/01Intro.pdf · 2019. 9. 17. · Mobile Computing APM@FEUP 3 Mobile devices - capabilities Software: distributed applications with the specificities

Specially interesting mobile design patterns (2)

❖ Presentation patterns

•Babel-Tower

▪Avoid hard-coded and fixed layouts

▪Support alternative adaptable layouts

•Do-as-Romans-Do

▪Use the recommended look-and-fill for the platform (native)

•List-and-Scroll

▪Use lists and vertical scrolling only

▪Avoid horizontal scrolling (to read text)

▪ Ok for showing extra columns on a table

Mobile Computing

APM@FEUP 9

Page 10: Devices Platforms - FEUPapm/CM/docs/01Intro.pdf · 2019. 9. 17. · Mobile Computing APM@FEUP 3 Mobile devices - capabilities Software: distributed applications with the specificities

Specially interesting mobile design patterns (3)

❖ Behavioral patterns

•Predictive Fetch

▪ If the app depends on connectivity download data, likely to be

used later, whenever connectivity is available

•Memento-Mori

▪ Save relevant state and info whenever the app goes into the

background

•As-Soon-As-Possible

▪ Insist on remote operations and don’t fail at first attempt

▪ In case of failure, record, and playback when connectivity

returns

Mobile Computing

APM@FEUP 10

Page 11: Devices Platforms - FEUPapm/CM/docs/01Intro.pdf · 2019. 9. 17. · Mobile Computing APM@FEUP 3 Mobile devices - capabilities Software: distributed applications with the specificities

Diversity / Cross platform development

❖ A single framework for a large number of

platforms and devices is for now a myth

Mobile Computing

APM@FEUP 11

HELP

Page 12: Devices Platforms - FEUPapm/CM/docs/01Intro.pdf · 2019. 9. 17. · Mobile Computing APM@FEUP 3 Mobile devices - capabilities Software: distributed applications with the specificities

Cross platform approaches

❖ Abstraction layer of translation

❖ Web shell

Mobile Computing

APM@FEUP 12

Framework classes

Generic API

iOSAndroid . . .

Platforms

Apps Ex: Titanium Mobile

(in run time)

Xamarin

(in build time)

Ex: PhoneGap

JavaScript

Library

Native

Library

Plug-ins

Page 13: Devices Platforms - FEUPapm/CM/docs/01Intro.pdf · 2019. 9. 17. · Mobile Computing APM@FEUP 3 Mobile devices - capabilities Software: distributed applications with the specificities

PhoneGap

Mobile Computing

APM@FEUP 13

Page 14: Devices Platforms - FEUPapm/CM/docs/01Intro.pdf · 2019. 9. 17. · Mobile Computing APM@FEUP 3 Mobile devices - capabilities Software: distributed applications with the specificities

Titanium

Mobile Computing

APM@FEUP 14

Page 15: Devices Platforms - FEUPapm/CM/docs/01Intro.pdf · 2019. 9. 17. · Mobile Computing APM@FEUP 3 Mobile devices - capabilities Software: distributed applications with the specificities

Xamarin

Mobile Computing

APM@FEUP 15

Page 16: Devices Platforms - FEUPapm/CM/docs/01Intro.pdf · 2019. 9. 17. · Mobile Computing APM@FEUP 3 Mobile devices - capabilities Software: distributed applications with the specificities

React Native

Mobile Computing

APM@FEUP 16

class HelloWorldApp extends Component {render() { return ( <View style={{padding:40}}>

<Text>Hello world!</Text></View>);

}}

Run-time

Architecture

JSX source example

Building