• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Opensocial & Yap
 

Opensocial & Yap

on

  • 3,305 views

From my talk "OpenSocial & YAP" at the Brazil Hack Day 2008

From my talk "OpenSocial & YAP" at the Brazil Hack Day 2008

Statistics

Views

Total Views
3,305
Views on SlideShare
3,299
Embed Views
6

Actions

Likes
2
Downloads
26
Comments
1

2 Embeds 6

http://brhackday.pbwiki.com 3
http://brhackday.pbworks.com 3

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel

11 of 1 previous next

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • Most of this presentation was verbal with the slides serving mainly for visual points of reference. Here is an overview of what I talked about while each slide was up:

    1: Introduction to presentation
    - talked a little about how I worked on a team to develop Whaddyathink?, an OpenSocial app built on Orkut and MySpace and deployed on MySpace. We're now enabling it on YAP

    2: Presentation overview

    3: OpenSocial intro slide

    4: OpenSocial.org
    - OpenSocial defines standard JS and RESTful APIs for creating social applications

    5: The OpenSocial page on code.google.com
    - The OpenSocial standard is also presented here along with useful code snippets

    6: Whaddyathink? on Orkut
    - The main point is code portability
    - The app my team and I created and deployed on MySpace.
    - The 'create' view is shown
    - This app was partially developed on Orkut
    - The code base still works on Orkut, though we never published it there

    7: Whaddyathink? on MySpace
    - Again, the main point is that the same app is running on two different sites
    - Slide also used to show another view of the app, the 'results' view

    8: Simple OpenSocial app specification file
    - Used to show specification file structure
    - Note: html, xml, and javascript are contained in same file, which make it hard to debug

    9: Simple app running in Orkut
    - Note: we are in sandbox environment
    - Social data has been fetched and displayed

    10: More complicated app
    - Now we're trying to get more than just the name
    - Note: use of js array to manage and encapsulate embedded html
    - Typo: The line pushing 'status' should be pushing '' + status + ''

    11: The more complicated code in Orkut
    - Note: status does not display
    - Note: multiple apps are allowed to have the same name, but this becomes confusing when debugging, so avoid it

    12: Error handling code
    - Following the advice in http://sites.google.com/site/io/opensocial-across-containers,
    we now check to see if the container implements the OpenSocial field we need,
    and check our request response for errors

    13: Error handling in Orkut
    - Note: if we can't get the status, we show an alternative message
    - Note: the bpc flag in the url. If we set it to 1, the spec file will not be cached. Included files may still be cached, so watch out
    - Note: apps now have unique names

    14: Cross-container intro slide
    - we're bridging differences between the containers

    15: Breaking up the files
    - Note: files are now split based on content type, eg html, js, xml
    - Note: build content files into spec prior to uploading, so we only have spec files on server
    - All these simple apps are hosted on geocities
    - YAP POSTs data to the host on each request, which causes an error on geocities, so we can't host YAP apps on geo, but we can host orkut and myspace apps on geo

    16: Looking at the split-up code
    - Now, we can take advantage of syntax highlighting to help us debug
    - Build process script is at bottom
    - All the code for these apps is included in a single, freely available text file. The URL to the file is at the end.

    17: What is your gender?
    - Note: we are now requesting gender instead of status
    - gender data seems to be more available across platforms

    18: Gender on MySpace
    - Note: we can access my gender data

    19: Gender on Orkut
    - Note: we can access my gender data
    - The data is incorrect, but least we have access to it

    20: JS & CSS tips & tricks
    - Some simple suggestions for getting started quickly on Hack Day
    - Most of these tips require a server that allows scripting, unlike geo
    - The warnings about JS libraries are intended for those who:
    - want to port an existing app from some opensocial container to one using Caja, eg YAP
    - want to write a portable app
    - The CSS tips are for those who want to work on with Caja

    21: YAP introductory slide

    22: YAP dashboard
    - this slide is primarily intended to help sort out the difference between the 4 different choices of app available in the dashboard
    - gen access apps are for people who need an app id, but will not need to authenticate, eg Y! maps API
    - BB Auth is similar to OAuth, but deprecated in favor of OAuth. It still is used for some applications
    - Open and OAuth apps are discussed on later slides

    23: OAuth apps
    - as a general rule, use an oauth app if you want to request and use data off yahoo, eg pull Y! data and display it on yourdomain.com

    24: Open apps
    - as a general rule, use an open app if you want to request and use data on yahoo, eg YAP

    25: YQL intro slide

    26: YQl overview
    - Is similar in soe ways to pipes, but allows for programmatic request generation
    - Is an alternative to the Social APIs for getting social data, which is good if your hosting your app on a server that doesn't allow scripting

    27: Resources
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Opensocial & Yap Opensocial & Yap Presentation Transcript

  • OpenSocial & YAP Erik Eldridge Brasil Open Hack Day 8-9, Nov. 2008 Yomi955: http://www.flickr.com/photos/yomi955/783099734/sizes/o/
  • Presentation outline
    • OpenSocial
    • Cross-container OpenSocial
    • YAP Dashboard
    • YQL
    • Resources
  • OpenSocial
  • Opensocial.org
  • Opensocial v 0.8
  • Whaddyathink? Orkut
  • Whaddyathink? MySpace
  • Get & print owner’s name
  • Orkut owner name screenshot
  • Owner data spec
  • Owner data scrnsht
  • Owner data cross-container spec
  • Owner data cross-container scrn
  • Cross-Container OpenSocial Xenia Antunes: http://www.flickr.com/photos/xenia_antunes/168053532/sizes/l/
  • Split file trees
  • New file structure
  • New canvas js
  • Owner gender myspace
  • Owner gender Orkut
  • JavaScript & CSS tips & tricks
    • JavaScript tips
      • Push as much as possible to backend
      • Avoid JS libraries, e.g. jQuery, YUI, etc.
      • Use server-side html generation
      • Server-side SDKs > client-side JS
      • Use JSLint & Caja Test Bed
    • CSS tips
      • Avoid star and underscore hacks
      • Avoid self-clearing floats using :after
  • YAP
    • Dweekly: http://www.flickr.com/photos/dweekly/2849075649/sizes/l/
  • YAP Dashboard
    • https://developer.yahoo.com/dashboard/
    • Note: 4 app. Types
      • Open (YAP)
      • OAuth
      • Gen. Access
      • BB Auth
  • OAuth apps
    • Use if you want to handle user data off Yahoo!
    • Requires root access on domain
  • YAP apps
    • Use if you want to handle user data on Yahoo!
  • YQL Image Editor: http://www.flickr.com/photos/11304375@N07/2844536237/sizes/l/in/photostream/
  • YQL
    • Comparable to Y! Pipes
    • Very flexible
    • Can access the same data as the Y! PHP SDK
  • Resources
    • YOS docs:
      • http://developer.yahoo.com
    • Google IO vido on cross-container OpenSocial:
      • http://sites.google.com/site/io/opensocial-across-containers
    • Code from talk on:
      • http://www.geocities. com/erikeldridge/owner_and_friends/all .txt
      • http://www.geocities.com/erikeldridge/owner_data/all.txt