1 / 39

YAP / Open Mail Overview

Overview deck for the foundations of the Yahoo! Application Platform and a general overview of Open Mail

jcleblanc
Download Presentation

YAP / Open Mail Overview

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Application Platforms on Yahoo! Yahoo! Application Platform and Open Mail Jonathan LeBlanc Technology Evangelist Yahoo! Developer Network Twitter: @jcleblanc

  2. EXAMPLES | TUTORIALS | CODE SAMPLES DEVELOPER.YAHOO.COM

  3. The Yahoo! Application Platform (YAP)

  4. Open ID – Single Account Sign-in

  5. OAuth - Open Authentication

  6. SDKs (Software Development Kits) PHP, Python, Java, ActionScript 3, Objective-C, and OpenSocial REST APIs http://www.github.com/yahoo

  7. OAuth – What Does the End-User See?

  8. OAuth – What Does the End-User See?

  9. 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 • •

  10. Fetching User Data & Making Requests • Examples for OpenSocial & PHP • Fetching Profiles • Fetching and Inserting Updates • Fetching Connections • Making AJAX Requests

  11. 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_DET AILS] = [ opensocial.Person.Field.NAME, opensocial.Person.Field.THUMBNAIL_URL ]; req.add(req.newFetchPersonRequest('VIEWER', params), 'viewer_profile'); req.send(response);

  12. Fetching Updates With PHP & OpenSocial 0.8

  13. 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);

  14. 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);

  15. Fetching Connections With PHP & OpenSocial 0.8

  16. 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);

  17. Making YQL Requests With PHP & OpenSocial 0.8 $application = new YahooApplication($key, $secret); $results = $application->query( ‘select * from delicious.feeds.popular’);

  18. 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);

  19. Front-end Security

  20. 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

  21. Front-end Security: Caja Cajoling Process <script type="text/javascript"> function response(obj) { if (obj.text){ document.getElementById('interact').setInnerHTML('P opulated!'); document.getElementById('population').setInnerHTML (obj.errors); } } </script>

  22. 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;

  23. Open Mail

  24. Apps are self contained 29

  25. “Plug-ins” implicitly enhance experience 30

  26. Today ? 31

  27. Contextual plugins Large File Attachment X Your file is over 25MB. Would you like to upload and create a link to your large file? OK 32

  28. Contextual plugins Flickr photo(s) Past files Yahoo! Map 33

  29. And the ideas get crazier…. 34

  30. Active Mail 35

  31. An evolution, not a revolution 1. We always looked for developers to build features that were a natural fit 3. This semantic shift represents enhancements to the invocation point, not radical changes in the functionality 5. e.g. contextually launch “Share Attachments” 7. e.g. invoke Picnik contextually OnCompose 9. e.g. detect an invitation and gently suggest upgrade to Evite 36

  32. Flexible API for Mail feature development – Flickr – Groups – MyPhotos (formerly Xoopit) – Wretch – Third-party companies, as appropriate 37

  33. What we are NOT doing 38

  34. Questions?

More Related