openface sdforum sam sig preso

Upload: suresh

Post on 10-Apr-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/8/2019 OpenFace SDForum SAM SIG Preso

    1/28

    From Prototype to Success:Applications for Facebook and OpenSocial

    Containers

    Steve Chan, AppTsunamiDave Nielsen, Platform D

  • 8/8/2019 OpenFace SDForum SAM SIG Preso

    2/28

    Level Setting

    This session is NOT:

    How to market your application

    This session IS:

    How to build an application quickly that willgrow with you as you expand to other socialnetworks

  • 8/8/2019 OpenFace SDForum SAM SIG Preso

    3/28

    About Us

    Met at an event like this

    Create Bracket MadnessPorted it to Hi5

    Social Network Apps:

    BracketMadness

    TheFabulousLife (beta)

    Share-A-Ride (in progress) RealBucks (in progress)

  • 8/8/2019 OpenFace SDForum SAM SIG Preso

    4/28

    Emergence of Social Networks

    5 of the top 10 sites tracked by Alexa aresocial networs

    Reaching 275 million people (world-wide)

    Over 20,000 applications on Facebook

    > 20,000 OpenSocial developers

  • 8/8/2019 OpenFace SDForum SAM SIG Preso

    5/28

    OpenSocial Containers

  • 8/8/2019 OpenFace SDForum SAM SIG Preso

    6/28

    fb Promise/Reality

    Promise

    you can build apps quickly

    lots of users to try it

    Lesson Learned Building your first Facebook app is not

    trivial

  • 8/8/2019 OpenFace SDForum SAM SIG Preso

    7/28

    fb Lessons Learned

    FBJS is not JavaScript

    Facebook AJAX is Mock AJAX FQL is not SQL

    Predefined Layout Style

    Color, Layout, Buttons

    No documentation

  • 8/8/2019 OpenFace SDForum SAM SIG Preso

    8/28

    os Promise/Reality

    Promise

    can build apps quickly

    apps run on multiple social networks

    Lesson Learned

    Building your first OpenSocial app is nottrivial

    Each OS implementation is different

  • 8/8/2019 OpenFace SDForum SAM SIG Preso

    9/28

    os Lessons Learned

    JavaScript app model is difficult

    Different Versions (.6 .7 .8) Different Features (Invite friends)

    Different Policies (Invite 15 friends)

    Different Metadata (business friends)

  • 8/8/2019 OpenFace SDForum SAM SIG Preso

    10/28

    Cross Platform Apps

    Porting apps from Facebook toOpenSocial is no picnic

    Individual OpenSocial Containers are stillan issue

    Differences between two models

  • 8/8/2019 OpenFace SDForum SAM SIG Preso

    11/28

    Necessity: Mother of Innovation

    Abstracted reusable code into aframework

    Application developer calls methods in theframework which emits Facebook code

    Application developers can focus on theapplication logic

  • 8/8/2019 OpenFace SDForum SAM SIG Preso

    12/28

    x-platform Lessons Learned

    Start with Facebook

    Next, rewrite the backend of theframework to emit OpenSocial code

    Now the framework makes the application

    code single-source (almost)

  • 8/8/2019 OpenFace SDForum SAM SIG Preso

    13/28

    How

    Abstraction and Inheritance

    Abstract the common container features

    Create Reference Classes

    Inherit and extend for each container

  • 8/8/2019 OpenFace SDForum SAM SIG Preso

    14/28

    Facebook Model 1

    App Tsunami, Inc. 14

    Server

    Web browser

    UI logic

    (FBML, FBJS, mockAJAX)

    Business and Data logic

  • 8/8/2019 OpenFace SDForum SAM SIG Preso

    15/28

    Facebook Model 2

    App Tsunami, Inc. 15

    Web browser

    Server

    UI logic

    Business and Data logic

    IFrame

  • 8/8/2019 OpenFace SDForum SAM SIG Preso

    16/28

    OpenSocial Model 1

    App Tsunami, Inc. 16

    Web browser

    UI logic (JS)

    Server

    Business and Data logic

  • 8/8/2019 OpenFace SDForum SAM SIG Preso

    17/28

    OpenSocial Model 2

    App Tsunami, Inc. 17

    Web browser

    Server

    UI logic

    Business and Data logic

  • 8/8/2019 OpenFace SDForum SAM SIG Preso

    18/28

    Subsystems

    MVC

    User interface classesSocial network access

    APIDatabase classes

    Application Logic

    Facebook Open Social

  • 8/8/2019 OpenFace SDForum SAM SIG Preso

    19/28

    Openface Architecture

    Single entry point called by the platform

    http://your_host/your_app/openface/php/index.php

    Facebook: Type in to Edit Settings

    Open Social: defined inhttp://your_host/your_app/xml/application.xml

    Index.php calls an application

    configuration file (TfwApplication.php) torender the top-level UI frame object

  • 8/8/2019 OpenFace SDForum SAM SIG Preso

    20/28

    Views: UI classes

    TfwFrame TfwFrameSingleCanvas.php

    TfwFrameMultiCanvas.php

    TfwFrameMultiCanvas2.php

    TfwCanvas __construct()

    getLabel()

    getTag()

    getIcon()

    render()

    TfwPortlet __construct()

    loadData()

    render()

    TfwPanel __construct()

    loadData()

    render()

  • 8/8/2019 OpenFace SDForum SAM SIG Preso

    21/28

    More UI Classes

    actions

    TfwActions.php

    callbacks

    TfwCallbacks.php

    dialogs TfwDialogs.php

  • 8/8/2019 OpenFace SDForum SAM SIG Preso

    22/28

    models: Platform Classes

    TfwDataSource

    URL-generation

    TfwDialogs

    Invite dialogs

    helpers JavaScript generation helpers

    HTML generation helpers

  • 8/8/2019 OpenFace SDForum SAM SIG Preso

    23/28

    models: Database classes

    TfwDataTable

    Provides commonly used functions onMySQL to make writing portlets easy

    TfwDataConnect

    Database connection methods

  • 8/8/2019 OpenFace SDForum SAM SIG Preso

    24/28

    Value Add

    CRM

    A|B Testing

    Monetization

    Mashup

    Google API Game

    Virtual economy

  • 8/8/2019 OpenFace SDForum SAM SIG Preso

    25/28

    What

    MVC

    Single Point of Entry / Controller

    4 Levels of User Interface objects

    Frame

    Canvas Portlets & Panels

    Controls & Content

  • 8/8/2019 OpenFace SDForum SAM SIG Preso

    26/28

    Future: More Platforms

    Social Network

    Facebook Open Social

    Facebook Bebo My Space Hi 5 Orkut

  • 8/8/2019 OpenFace SDForum SAM SIG Preso

    27/28

    Future: Languages & Platforms

    Ruby

    Java

    .Net

    iPhone?

    Android?

  • 8/8/2019 OpenFace SDForum SAM SIG Preso

    28/28

    code.google.com/p/openface/

    Steve - [email protected]

    Dave [email protected]