Imperial Hack Evening
-
Upload
snig178 -
Category
Technology
-
view
1.042 -
download
0
description
Transcript of Imperial Hack Evening
![Page 1: Imperial Hack Evening](https://reader033.fdocuments.us/reader033/viewer/2022060202/559b5f7f1a28ab1d5f8b456c/html5/thumbnails/1.jpg)
Web APIsTuesday Talk - Imperial College - 26-02-
08Owen Griffin, Vodafone Group R&D
These slides are available on Google Docshttp://tiny.cc/D3HcM
![Page 2: Imperial Hack Evening](https://reader033.fdocuments.us/reader033/viewer/2022060202/559b5f7f1a28ab1d5f8b456c/html5/thumbnails/2.jpg)
- Quick Introduction- Mobile Development- Web APIs- Facebook Mashup- Other applications- Your ideas
![Page 3: Imperial Hack Evening](https://reader033.fdocuments.us/reader033/viewer/2022060202/559b5f7f1a28ab1d5f8b456c/html5/thumbnails/3.jpg)
This is who we work for
![Page 4: Imperial Hack Evening](https://reader033.fdocuments.us/reader033/viewer/2022060202/559b5f7f1a28ab1d5f8b456c/html5/thumbnails/4.jpg)
What's life like in R&D?
![Page 5: Imperial Hack Evening](https://reader033.fdocuments.us/reader033/viewer/2022060202/559b5f7f1a28ab1d5f8b456c/html5/thumbnails/5.jpg)
Summertime in Newbury
What's life like in R&D?
![Page 6: Imperial Hack Evening](https://reader033.fdocuments.us/reader033/viewer/2022060202/559b5f7f1a28ab1d5f8b456c/html5/thumbnails/6.jpg)
like these
APIsJavascript
Widgets
XHTMLXML
Ajax
SVGRuby on Rails
PHPJava
What do I do?
- Investigate Web Technologies
![Page 7: Imperial Hack Evening](https://reader033.fdocuments.us/reader033/viewer/2022060202/559b5f7f1a28ab1d5f8b456c/html5/thumbnails/7.jpg)
- Play with mobile devices
What do I do?
![Page 8: Imperial Hack Evening](https://reader033.fdocuments.us/reader033/viewer/2022060202/559b5f7f1a28ab1d5f8b456c/html5/thumbnails/8.jpg)
What do I do?
www.betavine.net
Member of the Betavine Development Team"An Open Community & Resource Website"
![Page 9: Imperial Hack Evening](https://reader033.fdocuments.us/reader033/viewer/2022060202/559b5f7f1a28ab1d5f8b456c/html5/thumbnails/9.jpg)
How many people own more than one mobile?
Zzzzz...
Questions
![Page 10: Imperial Hack Evening](https://reader033.fdocuments.us/reader033/viewer/2022060202/559b5f7f1a28ab1d5f8b456c/html5/thumbnails/10.jpg)
Has anyone done any mobile development before?
Questions
![Page 11: Imperial Hack Evening](https://reader033.fdocuments.us/reader033/viewer/2022060202/559b5f7f1a28ab1d5f8b456c/html5/thumbnails/11.jpg)
Has your application worked on more than 10 devices?
Questions
![Page 12: Imperial Hack Evening](https://reader033.fdocuments.us/reader033/viewer/2022060202/559b5f7f1a28ab1d5f8b456c/html5/thumbnails/12.jpg)
Mobile Development
- Worldwide mobile telephone subscriptions reached 3.3 billion- Thousands of different devices- Hundreds of different platforms- Too many choices for mobile development
Mobile Platforms- Windows Mobile- Symbian - Google Android- Apple iPhone- Java ME- Flash Mobile- Linux
![Page 13: Imperial Hack Evening](https://reader033.fdocuments.us/reader033/viewer/2022060202/559b5f7f1a28ab1d5f8b456c/html5/thumbnails/13.jpg)
Web Development
Easier than mobile development? Less devices, less platforms?
More developers and a larger audience?
Is the Web Browser a platform?
![Page 14: Imperial Hack Evening](https://reader033.fdocuments.us/reader033/viewer/2022060202/559b5f7f1a28ab1d5f8b456c/html5/thumbnails/14.jpg)
Web APIsAll the web sites mentioned before allow their users to access their information through an API.
There are 1000's of mini-applications on the web which make use of publically available Web APIs.
E.g.
http://www.flickr.com/services/api/
Allows you to:Search photosFind contactsTransform photosContribute
Uses HTTP withSOAPJSONXML-RPCREST
![Page 15: Imperial Hack Evening](https://reader033.fdocuments.us/reader033/viewer/2022060202/559b5f7f1a28ab1d5f8b456c/html5/thumbnails/15.jpg)
What can be done with Web APIs?
MashupsGoogleMaps mashups
Berkshire Floods1000's @ Google Maps Mania
Flickr MashupsRetrievrFastr
Social Network "Applications"Facebook applicationsOpenSocial
![Page 16: Imperial Hack Evening](https://reader033.fdocuments.us/reader033/viewer/2022060202/559b5f7f1a28ab1d5f8b456c/html5/thumbnails/16.jpg)
Services:Text Messages
Simple SMS messagesWAP Push links
Exchange of web linksApplication Trigger
Prompt applications to load on the phoneSupported formats:
JSONXMLRSSPlain text
Designed with mobile applications in mind. Simplistic - doesn't use a traditional authentication model. Read More..
![Page 17: Imperial Hack Evening](https://reader033.fdocuments.us/reader033/viewer/2022060202/559b5f7f1a28ab1d5f8b456c/html5/thumbnails/17.jpg)
Mobile Mashup Example
- Facebook, Bebo and MySpace, accounted for 5.17% of all UK Internet visits during October 2007
- So lets write a Facebook application...
Has anyone written a Facebook application before?
![Page 18: Imperial Hack Evening](https://reader033.fdocuments.us/reader033/viewer/2022060202/559b5f7f1a28ab1d5f8b456c/html5/thumbnails/18.jpg)
Uber Picture Poke
- Allows you to Poke your friends by showing them a photo of yourself on their mobile
- Requires both a Java Mobile MIDlet and a Facebook application
-The Facebook application uses the Betavine API to send an Application Trigger message to the MIDlet. The message contains a URL to an image. The image is downloaded and displayed on the mobile.
- http://apps.facebook.com/uberpicturepoke/
![Page 19: Imperial Hack Evening](https://reader033.fdocuments.us/reader033/viewer/2022060202/559b5f7f1a28ab1d5f8b456c/html5/thumbnails/19.jpg)
Uber Picture Poke - MIDlet
What we need to do:- Listen for messages- Download an image- Display an image
Lets just look at some code...
Has anyone written a MIDlet before?
![Page 20: Imperial Hack Evening](https://reader033.fdocuments.us/reader033/viewer/2022060202/559b5f7f1a28ab1d5f8b456c/html5/thumbnails/20.jpg)
Uber Picture Poke - FacebookThe Facebook application needs to:- List all of our friends which also have this application- Send an Application Trigger message to the MIDlet
Facebook API is extensive.. - http://developer.facebook.com/
The method we need is- Friends.getAppUsers
There is a helpful PHP library which interfaces with the API.
Facebook allows us access to all sorts of information, but.. does not let us find the users' mobile number.
![Page 21: Imperial Hack Evening](https://reader033.fdocuments.us/reader033/viewer/2022060202/559b5f7f1a28ab1d5f8b456c/html5/thumbnails/21.jpg)
Uber Picture Poke - Demo
![Page 22: Imperial Hack Evening](https://reader033.fdocuments.us/reader033/viewer/2022060202/559b5f7f1a28ab1d5f8b456c/html5/thumbnails/22.jpg)
Uber Picture Poke - FacebookSending the Application Trigger message:$url = "http://www.vodafonebetavine.net/api/send/trigger.plain?uaid=" . $uaid . "&dest=" . $mobile . "&message=" . $picture . "&port=" . $port;
$curl = curl_init();curl_setopt($curl, CURLOPT_URL, $url);curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);curl_setopt($curl, CURLOPT_TIMEOUT, 4);$response = curl_exec($curl);$error = curl_errno($curl);$httpcode = curl_getinfo($curl, CURLINFO_HTTP_CODE);if ($error != 0 || $httpcode != 200) { echo $response;} else { echo "<p>Poking.. " . $mobile . "</p>";}
![Page 23: Imperial Hack Evening](https://reader033.fdocuments.us/reader033/viewer/2022060202/559b5f7f1a28ab1d5f8b456c/html5/thumbnails/23.jpg)
Uber Picture Poke - Demo
![Page 24: Imperial Hack Evening](https://reader033.fdocuments.us/reader033/viewer/2022060202/559b5f7f1a28ab1d5f8b456c/html5/thumbnails/24.jpg)
References
- betavine.net developer resources
- betavine.mobi
- Reuters - Global cellphone penetration reaches 50 pct
- Social Network Usage Statistics
- Flickr API
- Facebook Developers