Difference between revisions of "Desktop Social Networking Integration"

From CDOT Wiki
Jump to: navigation, search
(Code Walkthrough)
Line 21: Line 21:
# twitter status  
# twitter status  
#* issue is twitter is dependent on facebook api, but api is lacking
#* issue is coop is dependent on facebook api, but api is lacking
# to use another facebook service to the coop  
# to use another facebook service to the coop  
# exchange service
# exchange service

Revision as of 22:14, 14 October 2007

Project Name

Desktop Social Networking Integration

Project Description

Alter The Coop experimental extension so it uses generic API instead of Facebook specifically; put the generic API in the "desktop data engine" also used by BigBoard (and hopefully other desktop apps in the future). Resources: RH online desktop team.

Project Leader(s)

Timothy Joseph Duavis

Project Contributor(s)

Project Details


Based on conversations (IRC and Email) with project stakeholders for determining the scope and requirment the following ideas for direction were suggested:

  1. twitter status
    • issue is coop is dependent on facebook api, but api is lacking
  2. to use another facebook service to the coop
  3. exchange service
  4. to treat "the desktop" as another service from coop's perspective
    • query desktop for coop merging from the desktop is the set of people displayied in BigBoard.
    • query desktop for coop merging (automatically?) from the desktop is account names ("eg. someone's Twitter account. I imagine Coop would want to keep this optional, only using the special desktop info when it's available." [Havoc's email])
  5. Adding support for more services to Coop
    • "is a much more direct and immediate win." [Havoc's email]
  6. Look to tie in with "journal" Firefox extension; developers Bryan and Colin

Other Notes:

  • Additional Thoughts from Havoc:
    • My suggestion is to think about the desktop as a single user experience and how it comes together. Our current prototype default config has bigboard on the left, the browser opens by default with the Journal, we have Pidgin running for chat, etc.


Name Title Role Contact
Dave Humphrey Professor of DPS909 Evaluate Progress To request publishing
Chris Tyler Professor of DPS909 Evaluate Progress To request publishing
Myk Melez Mozilla Developer Technical Expert To request publishing
Havoc Pennington Red Hat Stakeholder Technical Expert To request publishing

Milestone 1 - Release 0.1

To provide support for Twitter in the existing Coop API.The source code can be found here and requires the test method to install. Be advised that I turned debugging on.

Use Cases

For release 0.1, I will be focusing on getting twitter support and integrated into the coop. The following functionalities below will be included in the release:

  1. Log into Twitter account from Coop
  2. List and view Twitter friends
  3. View messages from friends



Figure 1 - Login page for Twitter. Started by clicking the pop-up menu item under the "friends" menu.


Figure 2 - Main page showing my friends in Twitter.


Figure 3 - A selected friend's pane and the message browser page loaded when the "more" button is clicked.

Code Walkthrough

The below points show the two layers used in this add-on application. The database/persistence layer is coupled within the logic layer (nsCoopFacebookService.js).

UI Layers

- sidebar.js, sidebar.xul, 
- authBrowser.js, authBrowser.xul
- addLink.js (have not walkthrough)
- addLink.xul (have not walkthrough)
- browser-overlay.js, browser-overlay.xul

Logic Layers

- facebook-client.js
- Microsummary.js (have not walkthrough)
- nsCoopFacebookService.js, nsCoopFacebookService.idl (with corresponding .xpt)

Function Paths:

The following shows the path of the code for the below use case functions. For this deliverable I used conditional statements to separate and distinguish calls for the two services.

  • Logging In
1. From sidebar.js the login command buttons calls startSession of the member service object (this._fbs)
2. In the function startSession of the service object class (nsCoopFacebookService.js) it calls on
   another service object member function called createAuthToken; this function calls on the client member object (facebook-client.js) 
   to post an AJAX request, so that the helper event function _onCreateAuthToken can be triggered to set the session information of 
   the social service being accessed (facebook or twitter)
3. onCreateAuthToken open the login screen (authBrowser.xul)
  • Viewing friends code paths
1. Upon successful session (this._fbs.sessionState of sidebar.js is active), sidebar.js calls a member function called buildpane
   which calls the function getFriends of the member service object. getFriends uses the member function currentUser to traverse 
   through the coop database. The coop database is sqllite.
2. If there is no friends then sidebar.js calls its member function updateFriends which calls this._fbs.updateFriends.
3. nsFaceBookService.updateFriends is similar to the createAuthToken where it uses this._client to make an AJAX request in order 
   to get data from the corresponding service session, such as the case of friends. Information retrieved by the social service 
   is retrieved as a json format to be parsed.
4. onUpdateFriends is the even function used to populate new friends.
  • Viewing Messages
1. Once friends are populated the sidebar.js builds a Friends Pane. When the a user selects a specific friend 
  from the list of friends the member function showFriend adds a button titled "more" to open a message box page.


  • twitter pane times out when login into twitter account initially
  • after first successful login during a session when you logout and switch to the facebook session a unsuccessful twitter login occurs.
  • logout for twitter

Milestone 2 - Release 0.2

Milestone 3 - Release 0.3


Task / Phase Status Start Date Due Date
1.0 Create Requirements In Progress Sep 22, 2007 Sep 28, 2007
1.1 Draft (Include scope, features and use cases)
1.2 Send for feedback
1.3 Update based on feedback
2.0 Research In Progress Sep 18, 2007 On-going
2.1 Research Facebook API
2.1.1 Create account
2.1.2 Build / Run sample Facebook Applications
2.2 Research Bigboard
2.2.1 RunBigboard
2.2.2 Build Bigboard
2.2.3 Walkthrough Analysis of Bigboard
2.3 Research Twitter API
2.3.1 Build / run twitter Build / run twitter on Web App Build / run twitter on Facebook applications Build / run twitter on Popular third party application Build / run twitter on Popular fan created application Build / run twitter on phone device
3.0 Milestone 0.1 Complete Oct 1, 2007 Oct 15, 2007
3.1 Plan Use Case Oct 1, 2007 Oct 4, 2007
3.2 Perform Implemention of Use Case Oct 5, 2007 Oct 15, 2007
3.2.1 Build Add-Ons of Coop
3.2.2 Build Add-Ons of Existing Application using Twitter API
3.2.3 Perform Walkthrough Analysis of Coop
3.2.4 Perform Walkthrough Analysis of Existing Application using Twitter API
3.3 Perform Unit / Function Testing Oct 5, 2007 Oct 15, 2007
3.3.1 Create Tests for logging into Twitter account
3.3.2 Create Tests for viewing Twitter friends
3.3.3 Create Tests for viewing Twitter friends' messages
4.0 Milestone 0.2 Waiting on previous dependencies Oct 15, 2007 Nov 12
5.0 Milestone 0.3 Waiting on previous dependencies Nov 12 Dec 3


Project News

  1. Claimed Sept 17, 2007.
  2. Updated Project Details - Sept 22, 2007
    • created project schedule
    • drafted scope based on stakeholder conversations during week of Sept 16, 2007
    • compiled list of stakeholders
  3. Updated Project Details - Sept 25, 2007
    • Defined Milestone 1; approved both by Dave and Myk
  4. Updated Project Details - Oct 1, 2007
    • Drafted Use Case
    • Updated work break schedule for milestone 1
  5. Updated Project Details - Oct 3, 2007
    • Further defined Use Case;
    • Updated work break schedule for milestone 1
    • Updated TODO for milestone 1;
  6. Updated Project Details - Oct 14, 2007
    • Completed milestone 1 - release 0.1
    • Updated bugs section for release 0.1
    • Posted screen shot of deliverable for milestone 1 - release 0.1