yap / open mail overview
DESCRIPTION
Overview deck for the foundations of the Yahoo! Application Platform and a general overview of Open MailTRANSCRIPT
![Page 1: YAP / Open Mail Overview](https://reader036.vdocument.in/reader036/viewer/2022081505/5556915bd8b42a182f8b4f1f/html5/thumbnails/1.jpg)
Jonathan LeBlancTechnology Evangelist
Yahoo! Developer NetworkTwitter: @jcleblanc
Application Platforms on Yahoo!Yahoo! Application Platform and Open Mail
![Page 2: YAP / Open Mail Overview](https://reader036.vdocument.in/reader036/viewer/2022081505/5556915bd8b42a182f8b4f1f/html5/thumbnails/2.jpg)
DEVELOPER.YAHOO.COMEXAMPLES | TUTORIALS | CODE SAMPLES
![Page 3: YAP / Open Mail Overview](https://reader036.vdocument.in/reader036/viewer/2022081505/5556915bd8b42a182f8b4f1f/html5/thumbnails/3.jpg)
The Yahoo! Application Platform (YAP)
![Page 4: YAP / Open Mail Overview](https://reader036.vdocument.in/reader036/viewer/2022081505/5556915bd8b42a182f8b4f1f/html5/thumbnails/4.jpg)
![Page 5: YAP / Open Mail Overview](https://reader036.vdocument.in/reader036/viewer/2022081505/5556915bd8b42a182f8b4f1f/html5/thumbnails/5.jpg)
![Page 6: YAP / Open Mail Overview](https://reader036.vdocument.in/reader036/viewer/2022081505/5556915bd8b42a182f8b4f1f/html5/thumbnails/6.jpg)
![Page 7: YAP / Open Mail Overview](https://reader036.vdocument.in/reader036/viewer/2022081505/5556915bd8b42a182f8b4f1f/html5/thumbnails/7.jpg)
Open ID – Single Account Sign-in
![Page 8: YAP / Open Mail Overview](https://reader036.vdocument.in/reader036/viewer/2022081505/5556915bd8b42a182f8b4f1f/html5/thumbnails/8.jpg)
OAuth - Open Authentication
![Page 9: YAP / Open Mail Overview](https://reader036.vdocument.in/reader036/viewer/2022081505/5556915bd8b42a182f8b4f1f/html5/thumbnails/9.jpg)
![Page 10: YAP / Open Mail Overview](https://reader036.vdocument.in/reader036/viewer/2022081505/5556915bd8b42a182f8b4f1f/html5/thumbnails/10.jpg)
SDKs (Software Development Kits)
PHP, Python, Java, ActionScript 3,Objective-C, and OpenSocial REST APIs
http://www.github.com/yahoo
![Page 11: YAP / Open Mail Overview](https://reader036.vdocument.in/reader036/viewer/2022081505/5556915bd8b42a182f8b4f1f/html5/thumbnails/11.jpg)
OAuth – What Does the End-User See?
![Page 12: YAP / Open Mail Overview](https://reader036.vdocument.in/reader036/viewer/2022081505/5556915bd8b42a182f8b4f1f/html5/thumbnails/12.jpg)
OAuth – What Does the End-User See?
![Page 13: YAP / Open Mail Overview](https://reader036.vdocument.in/reader036/viewer/2022081505/5556915bd8b42a182f8b4f1f/html5/thumbnails/13.jpg)
What is OpenSocial?
• OpenSocial API• For developing applications on social networks
• Accessing social data (profiles, connections)• Fetching and inserting activities
• Implemented by many containers• Develop once, distribute broadly
![Page 14: YAP / Open Mail Overview](https://reader036.vdocument.in/reader036/viewer/2022081505/5556915bd8b42a182f8b4f1f/html5/thumbnails/14.jpg)
Fetching User Data & Making Requests
• Examples for OpenSocial & PHP• Fetching Profiles• Fetching and Inserting Updates• Fetching Connections• Making AJAX Requests
![Page 15: YAP / Open Mail Overview](https://reader036.vdocument.in/reader036/viewer/2022081505/5556915bd8b42a182f8b4f1f/html5/thumbnails/15.jpg)
![Page 16: YAP / Open Mail Overview](https://reader036.vdocument.in/reader036/viewer/2022081505/5556915bd8b42a182f8b4f1f/html5/thumbnails/16.jpg)
Collecting User Data With PHP & OpenSocial 0.8
$session = YahooSession::requireSession($key, $secret, $app_id)$user = $session->getSessionedUser();$profile = $user->getProfile();
-----------------------------------------------------------------------------------------------
var req = opensocial.newDataRequest(); var params = {};params[opensocial.DataRequest.PeopleRequestFields.PROFILE_DETAILS] = [ opensocial.Person.Field.NAME, opensocial.Person.Field.THUMBNAIL_URL];
req.add(req.newFetchPersonRequest('VIEWER', params), 'viewer_profile');req.send(response);
![Page 17: YAP / Open Mail Overview](https://reader036.vdocument.in/reader036/viewer/2022081505/5556915bd8b42a182f8b4f1f/html5/thumbnails/17.jpg)
Fetching Updates With PHP & OpenSocial 0.8
![Page 18: YAP / Open Mail Overview](https://reader036.vdocument.in/reader036/viewer/2022081505/5556915bd8b42a182f8b4f1f/html5/thumbnails/18.jpg)
Getting Updates With PHP & OpenSocial 0.8
$session = YahooSession::requireSession($key, $secret, $app_id)$user = $session->getSessionedUser();$updates = $user->getUpdates();
-------------------------------------------------------------------------------
var req = opensocial.newDataRequest();var spec = new opensocial.IdSpec();
spec.setField(opensocial.IdSpec.Field.USER_ID, opensocial.IdSpec.PersonId.OWNER);
req.add(req.newFetchActivitiesRequest(spec), 'ownerActivities');req.send(handleActivities);
![Page 19: YAP / Open Mail Overview](https://reader036.vdocument.in/reader036/viewer/2022081505/5556915bd8b42a182f8b4f1f/html5/thumbnails/19.jpg)
Inserting Updates With PHP & OpenSocial 0.8
$session = YahooSession::requireSession($key, $secret, $app_id)$user = $session->getSessionedUser();$update = $user->insertUpdate($suid, $title, $link, $description);
---------------------------------------------------------------------------------
var params = {}, activity;params[opensocial.Activity.Field.TITLE] = title;params[opensocial.Activity.Field.BODY] = body;activity = opensocial.newActivity(params);
opensocial.requestCreateActivity(activity,opensocial.CreateActivityPriority.LOW,callback);
![Page 20: YAP / Open Mail Overview](https://reader036.vdocument.in/reader036/viewer/2022081505/5556915bd8b42a182f8b4f1f/html5/thumbnails/20.jpg)
Fetching Connections With PHP & OpenSocial 0.8
![Page 21: YAP / Open Mail Overview](https://reader036.vdocument.in/reader036/viewer/2022081505/5556915bd8b42a182f8b4f1f/html5/thumbnails/21.jpg)
Fetching Connections With PHP & OpenSocial 0.8
$session = YahooSession::requireSession($key, $secret, $app_id)$user = $session->getSessionedUser();$connections = $user->getConnections();
----------------------------------------------------------------------------
var idspec = opensocial.newIdSpec({ 'userId' : 'OWNER', 'groupId' : 'FRIENDS' });
var req = opensocial.newDataRequest();req.add(req.newFetchPersonRequest('OWNER'), 'get_owner');req.add(req.newFetchPeopleRequest(idspec), 'get_friends');req.send(responseFriends);
![Page 22: YAP / Open Mail Overview](https://reader036.vdocument.in/reader036/viewer/2022081505/5556915bd8b42a182f8b4f1f/html5/thumbnails/22.jpg)
Making YQL Requests With PHP & OpenSocial 0.8
$application = new YahooApplication($key, $secret);
$results = $application->query( ‘select * from delicious.feeds.popular’);
![Page 23: YAP / Open Mail Overview](https://reader036.vdocument.in/reader036/viewer/2022081505/5556915bd8b42a182f8b4f1f/html5/thumbnails/23.jpg)
Making YQL Requests With PHP & OpenSocial 0.8
var params = {};var url = 'http://developer.yahoo.com/yql/console/?
q=select%20*%20from%20flickr.photos.search%20where%20text%3D%22Times%20Square%22'
var callback = callbackFunc;
params[gadgets.io.RequestParameters.CONTENT_TYPE] = gadgets.io.ContentType.TEXT;
params[gadgets.io.RequestParameters.METHOD] = gadgets.io.MethodType.GET;
gadgets.io.makeRequest(url, callback, params);
![Page 24: YAP / Open Mail Overview](https://reader036.vdocument.in/reader036/viewer/2022081505/5556915bd8b42a182f8b4f1f/html5/thumbnails/24.jpg)
Front-end Security
![Page 25: YAP / Open Mail Overview](https://reader036.vdocument.in/reader036/viewer/2022081505/5556915bd8b42a182f8b4f1f/html5/thumbnails/25.jpg)
Front-end Security: Caja
Caja Security• Very secure model (blacklist all)• Aims to protect end-users• Full content control
IFrame Concerns• Drive-by downloads• No content restrictions• Other known exploits
![Page 26: YAP / Open Mail Overview](https://reader036.vdocument.in/reader036/viewer/2022081505/5556915bd8b42a182f8b4f1f/html5/thumbnails/26.jpg)
Front-end Security: Caja Cajoling Process
<script type="text/javascript">function response(obj) { if (obj.text){
document.getElementById('interact').setInnerHTML('Populated!');
document.getElementById('population').setInnerHTML(obj.errors);
}}</script>
![Page 27: YAP / Open Mail Overview](https://reader036.vdocument.in/reader036/viewer/2022081505/5556915bd8b42a182f8b4f1f/html5/thumbnails/27.jpg)
Front-end Security: Caja Cajoling Process
var $dis = $v.getOuters(); $v.initOuter('onerror'); $v.so('response', ___.markFuncFreeze(function () { function response$_caller($dis, obj) { if ($v.r(obj, 'text')) { $v.cm($v.cm($v.ro('document'), 'getElementById',
[ 'interact' ]), 'setInnerHTML', [ 'Populated!' ]); $v.cm($v.cm($v.ro('document'), 'getElementById',
[ 'population' ]), 'setInnerHTML', [ $v.r(obj, 'errors') ]); } } response$_caller.FUNC___ = 'response$_caller'; var response;; response = $v.dis(___.primFreeze(response$_caller), 'response'); return response;
![Page 28: YAP / Open Mail Overview](https://reader036.vdocument.in/reader036/viewer/2022081505/5556915bd8b42a182f8b4f1f/html5/thumbnails/28.jpg)
Open Mail
![Page 29: YAP / Open Mail Overview](https://reader036.vdocument.in/reader036/viewer/2022081505/5556915bd8b42a182f8b4f1f/html5/thumbnails/29.jpg)
Apps are self contained
29
![Page 30: YAP / Open Mail Overview](https://reader036.vdocument.in/reader036/viewer/2022081505/5556915bd8b42a182f8b4f1f/html5/thumbnails/30.jpg)
“Plug-ins” implicitly enhance experience
30
![Page 31: YAP / Open Mail Overview](https://reader036.vdocument.in/reader036/viewer/2022081505/5556915bd8b42a182f8b4f1f/html5/thumbnails/31.jpg)
Today
31
?
![Page 32: YAP / Open Mail Overview](https://reader036.vdocument.in/reader036/viewer/2022081505/5556915bd8b42a182f8b4f1f/html5/thumbnails/32.jpg)
Contextual plugins
32
XXLarge File Attachment
Your file is over 25MB.
Would you like to upload and create a link to your large file?
OK
![Page 33: YAP / Open Mail Overview](https://reader036.vdocument.in/reader036/viewer/2022081505/5556915bd8b42a182f8b4f1f/html5/thumbnails/33.jpg)
Contextual plugins
33
Flickr photo(s)
Past files
Yahoo! Map
![Page 34: YAP / Open Mail Overview](https://reader036.vdocument.in/reader036/viewer/2022081505/5556915bd8b42a182f8b4f1f/html5/thumbnails/34.jpg)
And the ideas get crazier….
34
![Page 35: YAP / Open Mail Overview](https://reader036.vdocument.in/reader036/viewer/2022081505/5556915bd8b42a182f8b4f1f/html5/thumbnails/35.jpg)
Active Mail
35
![Page 36: YAP / Open Mail Overview](https://reader036.vdocument.in/reader036/viewer/2022081505/5556915bd8b42a182f8b4f1f/html5/thumbnails/36.jpg)
An evolution, not a revolution
1. We always looked for developers to build features that were a natural fit
2. This semantic shift represents enhancements to the invocation point, not radical changes in the functionality
3. e.g. contextually launch “Share Attachments”
4. e.g. invoke Picnik contextually OnCompose
5. e.g. detect an invitation and gently suggest upgrade to Evite
36
![Page 37: YAP / Open Mail Overview](https://reader036.vdocument.in/reader036/viewer/2022081505/5556915bd8b42a182f8b4f1f/html5/thumbnails/37.jpg)
Flexible API for Mail feature development
– Flickr– Groups– MyPhotos (formerly Xoopit)– Wretch– Third-party companies, as appropriate
37
![Page 38: YAP / Open Mail Overview](https://reader036.vdocument.in/reader036/viewer/2022081505/5556915bd8b42a182f8b4f1f/html5/thumbnails/38.jpg)
What we are NOT doing
38
![Page 39: YAP / Open Mail Overview](https://reader036.vdocument.in/reader036/viewer/2022081505/5556915bd8b42a182f8b4f1f/html5/thumbnails/39.jpg)
Questions?