1
edit
Changes
→Milestone 1 - Release 0.1
=== Milestone 1 - Release 0.1 ===
To provide support for Twitter in the existing Coop API. More documentation can be found posted on my blog (Coop DPS909 Release 0.1 - Documentation). The source code can be found [http://matrix.senecac.on.ca/~tjduavis/dps909/coop-dps909-release0.1.zip here] and requires the [http://developer.mozilla.org/en/docs/Building_an_Extension#Test 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:
# List and view Twitter friends (followers only)
# View messages from friend
==== Deliverable ====
[[Image:Coop-twitter-message.png]]
<p><b>Figure 3</b> - A selected friend's pane and the message browser page loaded when the "more" button is clicked.</p>
==== Code Walkthrough ====
UI Layers
<pre>
- sidebar.js, sidebar.xul,
- authBrowser.js, authBrowser.xul
- addLink.js (have not walkthrough)
- addLink.xul (have not walkthrough)
- browser-overlay.js, browser-overlay.xul
</pre>
Logic Layers
<pre>
- facebook-client.js
- Microsummary.js (have not walkthrough)
- nsCoopFacebookService.js, nsCoopFacebookService.idl (with corresponding .xpt)
</pre>
Function Paths:
* Logging In
<pre>
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, twitter, etc.)
3. onCreateAuthToken open the login screen (authBrowser.xul)
</pre>
* Viewing friends code paths
<pre>
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 a service information 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.
</pre>
* Viewing Messages
<pre>
* 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.
</pre>
==== Bugs ====