Desktop Social Networking Integration

From Open Source@Seneca

Jump to: navigation, search

Contents

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)

  • Vincent Lam
    • provided support with sqlite by providing a client and researching
    • available for future contribution opportunities
  • Rueen Fiez
    • provided support with sqlite by providing a client and researching
    • available for future contribution opportunities

Project Details

Scope

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.

Stakeholders

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.

The patch for release 0.1 is here.

Requirements and Specifications

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:

Use Cases:

  1. Log into Twitter account from Coop
  2. List and view Twitter friends
  3. View current status messages from friends on main friends pane; view all status messages for a specific friend when selected (friend pane).

Deliverable

Image:Coop-twitter-login.png

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

Image:Coop-twitter-viewMessage-Friends.png

Figure 2 - Main page showing my friends in Twitter with a status message

Image:Coop-twitter-viewMessage-Friend.png

Figure 3 - A selected friend's pane showing their corresponding 20 status messages.


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.

Bugs

  • 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
  • authentication window prompts twice for facebook
  • friends picture does not update on twitter and facebook
  • unsuccessful login of a twitter prompts an http authentication dialog
  • unsuccessful login via http authentication dialog loads users from sqlite
  • remove added null message and timestamp during getMessages

Milestone 2 - Release 0.2

For this release I will continue to build on release 0.1 by cleaning up the features and functionalities defined. Further more I will apply the changes specified by the comments and feedback made from my primary stakeholders and the community (but must be approved by my primary stakeholders).

Requirements and Specifications

The following are requirements and specifications that will be included in release 0.2:

  • Fix bugs informed by stakeholder during their attempt to test release 0.1
    • After the login dialog, login process fails and produces a blank sidebar
  • Clean up features and functionalities
    • Remove icons in The existing Coop
    • Use XUL description element for messages
    • Order list of friends alphabetically
    • Replace release 0.1 timestamp format with user-readable timestamp (ex: "2 Days ago")
    • Provide ability to merge users existing in different social services, with the same identity using drag and drop.
  • Fix bugs introduced in release 0.1

Deliverable

Source Code:

  • The source code for release 0.2 can be found here
  • The patch of release 0.2 can be found here

Instructions for installing:

Milestone 3 - Release 0.3

For this release I will focus on providing user interface / usability enhancements. I will also look to resolve any development bugs or unexpected results.

Requirements and Specifications

  <tjduavis>	i think i should resolve the login problem
  <dave>	agreed.
  <dave>	what else?
  <tjduavis>	should i bother in getting the text element into a description element?
  <dave>	yes, I think so
  <tjduavis>	ok
  <tjduavis>	the timestamp into local time?
  <dave>	what do you think?
  <dave>	I'm less concerned with that
  <tjduavis>	right and i think thats above my powers as its tight up with the twitter api. the api is converting the time into utc
  <tjduavis>	but i could be wrong.
  <tjduavis>	how about this facebook service being down
  <tjduavis>	i want it included but i honestly dont know where to start investigating
  <tjduavis>	or that might set me back
  <dave>	I think leave that
  <dave>	it could very well be their side killing apis
  <dave>	focus on the twitter stuff
  <dave>	I agree about the date stuff, leave it
  <tjduavis>	ok

Deliverable

Source Code:

  • The source code for release 0.3 can be found here
  • The svn patch for release 0.3 can be found here

Instructions for installing:

Resources

Schedule

Task / Phase Status Start Date Due Date
1.0 Create Requirements Completed 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
2.3.1.1 Build / run twitter on Web App
2.3.1.2 Build / run twitter on Facebook applications
2.3.1.3 Build / run twitter on Popular third party application
2.3.1.4 Build / run twitter on Popular fan created application
2.3.1.5 Build / run twitter on phone device
3.0 Milestone 0.1 Complete Oct 1, 2007 Oct 15, 2007
3.1 Plan Requirements and Specifications Oct 1, 2007 Oct 4, 2007
3.2 Perform Implemention of Requirements and Specifications 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 Complete Oct 15, 2007 Nov 12
4.1 Plan Milestone 0.2 Deliverable Oct 15, 2007 Nov 1, 2007
4.1.1 Gather requirements
4.1.2 Draft requirements and specifications
4.1.3 Send for feedback and verification
4.1.4 Update accordingly
4.2 Implement deliverable Nov 4, 2007 Nov 10, 2007
4.2.1 Perform clean up of user interface
4.2.2 Perform clean up of functionalities
4.3 Perform Tests Nov 4, 2007 Nov 10, 2007
4.3.1 Perform tests for user interface and release
4.3.2 Perform tests for release
4.4 Release for feedback Nov 4, 2007 Nov 11, 2007
5.0 Milestone 0.3 Complete Nov 12 Dec 14
5.1 Plan Milestone 0.3 Deliverable Dec 3, 2007 Dec 3, 2007
5.1.1 Gather requirements
5.2 Implement Deliverable Dec 3, 2007 Dec 12, 2007
5.2.1 Perform implementation and unit testing
5.3 Funtion Testing Dec 8, 2007 Dec 14, 2007
5.2.1 Perform function testing

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 Requirements and Specifications
    • Updated work break schedule for milestone 1
  5. Updated Project Details - Oct 3, 2007
    • Further defined Requirements and Specifications;
    • 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
  7. Updated Project Details - Oct 19, 2007
    • milestone 1 is incomplete; unexpected results for requirements: view messages from friend.
    • updated details for expected system use case 3: view messages from friend.
    • posted patch to current working release.
  8. Updated Project Details - Oct 28, 2007
    • updated Figure 2 of release 0.1 with system use case 2: view main page with status of message per friend.
    • updated Figure 3 of release 0.1 with system use case 3: view status messages
    • updated Bugs
    • posted patch and updated source zip file for release 0.1a (included updated requirements)
  9. Updated Project Details - Nov 4, 2007
    • updated project schedule
    • drafted proposed requirements and specifications for release 0.2
  10. Updated Project Details - Nov 22, 2007
    • Completed Milestone 2
    • Updated Milestone 2 with source code and patch.
  11. Updated Project Details - Dec 12, 2007
    • Updated Project Schedule
  12. Updated Project Details - Dec 15, 2007
    • Updated Project Schedule
    • Updated Project Details for Release 0.3
Personal tools
special sections