Top Banner
Firefox OS Web APIs & Apps Jan Jongboom March 13, Budapest 1
67

Firefox OS Apps and Web APIs

May 06, 2015

Download

Technology

Jan Jongboom

My presentation of March 13 in Budapest abou
Welcome message from author
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
Page 1: Firefox OS Apps and Web APIs

Firefox OSWeb APIs & Apps

Jan JongboomMarch 13, Budapest

1

Page 2: Firefox OS Apps and Web APIs

@janjongboom

2

Page 3: Firefox OS Apps and Web APIs

You already have created an app

3

Page 4: Firefox OS Apps and Web APIs

Embrace the phone

4

Page 5: Firefox OS Apps and Web APIs

The mobile web is broken

5

Page 6: Firefox OS Apps and Web APIs

6

Page 7: Firefox OS Apps and Web APIs

We’re back in 1999

7

Page 8: Firefox OS Apps and Web APIs

We’re back in 1999

7

Page 9: Firefox OS Apps and Web APIs

No AJAX?!

8

Page 10: Firefox OS Apps and Web APIs

-webkit-prefix9

Page 11: Firefox OS Apps and Web APIs

Let’s open up the mobile web

10

Page 12: Firefox OS Apps and Web APIs

Firefox OS app=

website + W3C proposed phone APIs

11

Page 13: Firefox OS Apps and Web APIs

12

Page 14: Firefox OS Apps and Web APIs

13

Page 15: Firefox OS Apps and Web APIs

The web is awesome

14

Page 16: Firefox OS Apps and Web APIs

So let’s get going... (nothing fancy yet)

15

Page 17: Firefox OS Apps and Web APIs

16

Page 18: Firefox OS Apps and Web APIs

17

Page 19: Firefox OS Apps and Web APIs

18

Page 20: Firefox OS Apps and Web APIs

“Firefox OS Simulator”

19

Page 21: Firefox OS Apps and Web APIs

20

Page 22: Firefox OS Apps and Web APIs

21

Page 23: Firefox OS Apps and Web APIs

21

Page 25: Firefox OS Apps and Web APIs

22

Page 26: Firefox OS Apps and Web APIs

22

Page 27: Firefox OS Apps and Web APIs

23

Page 28: Firefox OS Apps and Web APIs

Firefox OS nagyon

egyszerű!

24

Page 29: Firefox OS Apps and Web APIs

Now get funky!

25

Page 30: Firefox OS Apps and Web APIs

26

Page 31: Firefox OS Apps and Web APIs

27

Page 32: Firefox OS Apps and Web APIs

Unleash the power of WebAPIs

28

Page 33: Firefox OS Apps and Web APIs

Regular APIs• Vibration• ScreenOrientation• GeoLocation• MouseLock• OpenWebApps• NetworkInformation• BatteryStatus• Alarm• WebActivities

• PushNotifications• WebFMApi• WebPayment• IndexedDB• AmbientLightSensor• ProxyimitySensor• Notification

Yellow = Approved by W3C

29

Page 34: Firefox OS Apps and Web APIs

30

Page 35: Firefox OS Apps and Web APIs

31

Page 36: Firefox OS Apps and Web APIs

32

Page 37: Firefox OS Apps and Web APIs

33

Page 38: Firefox OS Apps and Web APIs

34

Page 39: Firefox OS Apps and Web APIs

I only use certified APIs!

35

Page 40: Firefox OS Apps and Web APIs

Certified APIs• WebTelephony• WebSMS• IdleAPI• SettingsAPI• PowerManagementAPI• MobileConnectionAPI• WiFiInformationAPI

• WebBluetooth• PermissionsAPI• NetworkStatsAPI• CameraAPI• Time/ClockAPI• Attentionscreen• Voicemail

Requires certification process

36

Page 41: Firefox OS Apps and Web APIs

Your phone is aware of your

surroundings, take advantage!

37

Page 43: Firefox OS Apps and Web APIs

Application bus39

Page 44: Firefox OS Apps and Web APIs

Hey I need an image!

Sure, I can provide you with one!

40

Page 45: Firefox OS Apps and Web APIs

Web activities

41

Page 46: Firefox OS Apps and Web APIs

I NEED AN ADULT!42

Page 48: Firefox OS Apps and Web APIs

Offline

44

Page 49: Firefox OS Apps and Web APIs

Dealing with offline

• Have the necessary application files available

• Cache server side data

• Store app state on device

45

Page 50: Firefox OS Apps and Web APIs

Storing data

• Local Storage

• IndexedDB

• Limited storage!

• Manifest file can increase

46

Page 51: Firefox OS Apps and Web APIs

Two types of apps

• Hosted

• Assets on the server

• Cacheable via appcache

• Packaged

• ZIP archive with assets

47

Page 52: Firefox OS Apps and Web APIs

Caching with appcache

48

Page 53: Firefox OS Apps and Web APIs

49

Page 54: Firefox OS Apps and Web APIs

49

Page 55: Firefox OS Apps and Web APIs

49

Page 56: Firefox OS Apps and Web APIs

49

Page 57: Firefox OS Apps and Web APIs

49

Page 58: Firefox OS Apps and Web APIs

50

Page 59: Firefox OS Apps and Web APIs

ZIP

• One big zip file

• Resources loaded from zip file

• Still requires manifest file

51

Page 60: Firefox OS Apps and Web APIs

One more thing...

52

Page 61: Firefox OS Apps and Web APIs

The app manifest file

• Part of your packaged app

• Has metadata (name, description, version)

• Can define required permissions

https://marketplace.firefox.com/developers/docs/manifests

53

Page 62: Firefox OS Apps and Web APIs

54

Page 63: Firefox OS Apps and Web APIs

54

Page 64: Firefox OS Apps and Web APIs

54

Page 65: Firefox OS Apps and Web APIs

54

Page 66: Firefox OS Apps and Web APIs

Get hacking!

55

Page 67: Firefox OS Apps and Web APIs

Questions?

github.com/janjongboom

http://bit.ly/ffos-budapest

56