Building FirefoxOS apps with Clojurescript
-
Upload
timo-sulg -
Category
Technology
-
view
1.072 -
download
6
Transcript of Building FirefoxOS apps with Clojurescript
FirefoxOS.cljsClojureTRE/2014
Hello, everyone!Timo Sulg
Clojure journeyman@timgluz
TauhoLabsVersionEye
Intro
ƒ
Gaia
Gonk
Kernel&HAL
The best part
ClojureScripton top of
FirefoxOS
Apis
● 3 permission levels (web, priviliged, certified)
● HTML5 (http://caniuse.com)
● Communication● Hardware● Others
WebApis for regular applications
➔ HTML5 APIs➔ Alarm API➔ Push API➔ Archive API➔ Network information➔ Ambient light sensor➔ Proximity sensor➔ ….
Regular Applications
defaulthosted
packaged
Example: deviceorientation
Privileged applications
APIS
➔ Contacts➔ Browser➔ Device storage➔ TCP Socket➔ systemXHR➔ ….
Publishing
App-storeVerifiedcertified
Certified applications - only OEM partners, money helps too
APIS
TelephonyWifi
CameraSMS
Network stats….
Webactivities
How i can call, send sms or take pics?
Delegate.
Example: phoneWord
“Use the source!”
Pult : remote control
Pult: code
● pult○ websocket + chord○ core.async
● pult-server○ http-kit○ java.awt.Robot
Pult: structure
$> lein new foxy pult
● clojurescript● manifest file● repl configuration● gitignore
Happy 25th anniversary!!
Final remarks
● no inline code● no inline CSS● no eval()● (main arg1)
● 3rd part libraries may not work● workflow: web > simulator > device
Epilogue
Epilogue
Not “cutting edge”,unbeatable HW/price,
open & popular platform
IPhone1 vs FxOs
Good fit for:
● apps● startup founders● testing mobile sites● IoT● Kickstarter DIY
○ Hackable 8-bit sound generator○ smart watering controller○ $100 red button with API
Recap
HTML5 runtimeMany APIsClojure 1.st class citizen
hacker friendlyaffordable
Links
● Pult, https://github.com/tauho/pult● App center, https://developer.mozilla.org/en-US/Apps
● APIs, https://developer.mozilla.org/en-US/docs/WebAPI
● Style guide, https://www.mozilla.org/en-US/styleguide/products/firefox-os/
● Getting started guide, http://buildingfirefoxos.com/
● Can I use HTML5 feature: http://caniuse.com/● Phone specs: http://www.thephonedatabase.com/Search_For_Phones_Running_Firefox_OS