Issuu on Google+

Moocher

Technical Documentation 4/9/2009 Team 6 Lily Li, Amritha Prasad, Varun Srinivasan, Alex Tambellini, Rechen Wang


Contents 1. Executive Summary .......................................................................................................................... 3 2. Application Structure ....................................................................................................................... 4 2.1 Programming Standards ..................................................................................................................... 4 2.2 File Structure & Framework ................................................................................................................ 5 2.3 Platform Limitations............................................................................................................................ 6 2.4 Design Standards................................................................................................................................. 6 3. Technical Specifications ................................................................................................................... 7 3.1 Use Cases ............................................................................................................................................ 7 3.2 Test Cases .......................................................................................................................................... 18 4. Development & Extensibility .......................................................................................................... 27 4.1 Moocher Code Documentation ........................................................................................................ 27 4.2 Implementation & Deployment ........................................................................................................ 27 4.3 Extending Moocher ........................................................................................................................... 27


1. Executive Summary The Moocher Technical Documentation is meant to provide the developer with all the requisite information to maintain, troubleshoot and extend the functionality and design of the Moocher application. Sections 2 & 4 of the technical documentation contain all information pertaining to the development process. In here you will find coding practices, design standards, platform restrictions and other documentation necessary to familiarize the programmer with Moocher. Moocher's is outlined in the form of use cases and supporting test cases, which provide a broad view of the applications functionality. By consulting these guides, potential developers can plan their modifications to the system easily and develop testing plans rapidly. The current draft of the technical documentation is largely incomplete because we have proposed a few UI changes that may significantly impact the content of certain sections. Hence, we are waiting until the GUI changes are complete (12th Apr) to begin the final draft of the technical guide.

For a full list of applications and learning tools used to develop Moocher, consult the Resources page on the blog.


2. Application Structure 2.1 Programming Standards During the course of development, we found that adhering to certain methodologies helped greatly in collaboration and helped team members familiarize with the code rapidly. We used these common programming standards and conventions while developing Moocher: •

Brackets will be used for any method or logic exceeding one line.

Brackets will be on a separate line underneath the method or logic they are encapsulating.

Indentation will be used after any method or logic and continue until the end of that method or logic.

Variable names will be descriptive and start with a lowercase letter.

Class names will start with an uppercase letter and be descriptive.

Constants will be in all capital letters as well as be descriptive.

Spaces in variable names will be represented by underscores or the use of a capital letter at the beginning of the next word.


2.2 File Structure & Framework

Most of the Moocher team is familiar with the Model View Controller framework from past work with Ruby on Rails. We have decided to modify this framework for Moocher. The main change we are making is the combination of the controller and the view. We will also have a model for each view/controller which will contain all functions needed to interact with our database or outside interfaces/API's. However, we will also have "models" for external interfaces, API's, or even large pieces of functionality such as mapping, pagination, emailing, etc. Apart from the Model View Controller framework we're also splitting up the CSS and Javascript per view/controller so that each page has a definite location for all of it's functions, styling, and scripts. We're hoping this move will minimize the amount of people editing a single file at a time.


2.3 Platform Limitations Facebook imposes several restrictions on applications in order to ensure a secure and flexible development environment. As a result of this, coding practices and techniques for Facebook are significantly different. The following are the restrictions and limitations imposed by Facebook on developers which must be adhered to in order to develop a functional application. •

Facebook JavaScript (FBJS)

•

Facebook Mark Up Language (FBML)

•

iFrames

2.4 Design Standards We have attempted to standardize design elements, colors and fonts throughout the entire application to give the interface a consistent look and feel. A broad set of guidelines were used to determine best design practices for Moocher, and these are outlined below: Readability: The use of specific fonts and styles helps develop a visual hierarchy which helps familiarize the user with the application. The use of lower case text, strong/ bold styles and font sizes are strongly encouraged. Consistency: Maintaining consistency with the Facebook interface has been one of our top priorities, and we adopted similar color schemes, design elements and navigation layouts. For more details and specifications about Facebook color schemes, dimensions and usable components check out this guide from Devtacular. Usability: Since Moocher was nested within Facebook, we decided that one of our top priorities would be to allow users to be able to carry out most of their common tasks from the main (network) page. Reducing the number of pages/data that a user would have to view to perform common tasks also makes the application scale better.


3. Technical Specifications 3.1 Use Cases

A-Level Use Cases View Moocher Event Use Case Name

View Moocher Event

ID:

1

Importance Level: A

Primary Actor

User

Stakeholders

Users

Brief Description

The user wants to view the details of a specific Moocher event

Trigger

User has visibility of the Moocher event (i.e within the network boundaries)

Normal Flow of Events: 1. The user clicks on a Moocher event link from one of the application's pages [A1] 2. The user is presented with an event details page Alternate/Exceptional Flows: A-1: The event is outside the user's networks 1.

The user is notified that he cannot view the event

Subscribe to Event Use Case Name

Subscribe to Event

Primary Actor

User

Stakeholders

Users

ID:

4

Importance Level: A


Brief Description

The user wants to track a certain event and be notified of updates

Relationships: Include: View Moocher Event

Normal Flow of Events: 1. The user clicks on 'Subscribe to Event' on the Moocher event page 2. The user is asked to confirm if he wants to subscribe to the particular event 3. The event is added to the user's favorites

View Events by Network Use Case Name

View Events by Network

ID:

6

Importance Level: A

Primary Actor

User

Stakeholders

Users

Brief Description

The user wishes to browse a list of all events within his networks

Trigger

The user belongs to one or more valid Moocher networks

Relationships: Include: Sort Events

Normal Flow of Events: 1. The user navigates to the Events List page 2. The user clicks on the appropriate network tab within the Events list page 3. The user is presented with a list of all upcoming events within that network Alternate/Exceptional Flows: A-1: No upcoming network events 1.

The user is notified that there are no upcoming events for that particular network


Import Event from Facebook Use Case Name

Import Event from Facebook

ID:

8

Importance Level: A

Primary Actor

User

Stakeholders

Users, Event Organizers

Brief Description

The user wishes to create a Moocher event from an existing Facebook event

Trigger

A valid Facebook event that is scheduled for a future date

Normal Flow of Events: 1. 2. 3. 4.

The user navigates to the Facebook event page The user clicks on 'Import to Moocher' [A-1] [A-2] The user is prompted for more details about the event The event is added to Moocher

Alternate/Exceptional Flows: A-1: Event already exists in Moocher 1.

The user is notified that the specific event has already been imported to Moocher previously

A-2: Event is set for a past date 1.

The user is notified that the event is scheduled for a past date and cannot be imported to Moocher

Search by Parameters Use Case Name

Search by Parameters

ID:

14

Importance Level: A

Primary Actor

User

Stakeholders

Users

Brief Description

The user wishes to search for a Moocher event by specific parameters


Relationships: Include: Sort Events

Normal Flow of Events: 1. The user navigates to the advanced search page 2. The user selects the relevant parameters and clicks 'Submit' 3. The user is presented with a list of Moocher events matching the parameters[A-1] Alternate/Exceptional Flows: A-1: No matching events 1.

The user is notified that there are no events matching the specified parameters

B-Level Use Cases

Invite Friends to Moocher Event Use Case Name

Invite Friends to Moocher Event

ID:

9

Importance Level: B

Primary Actor

User

Stakeholders

Users, Event Organizers

Brief Description

The user wishes to invite friends to subscribe/view a Moocher event

Relationships: Include: View Moocher Event

Normal Flow of Events: 1. 2. 3. 4.

The user navigates to the Moocher event page The user clicks on 'Invite Friends' The user is prompted to select friends from a list of Facebook friends The invites are sent out to selected friends


Rate Moocher Event Use Case Name

Rate Moocher Event

ID:

10

Primary Actor

User

Stakeholders

Users

Brief Description

The user wishes to rate a specific Moocher event

Importance Level: B

Relationships: Include: View Moocher Event

Normal Flow of Events: 1. The user navigates to the Moocher event page 2. The user selects the desired rating (1-5) from the rating panel [A-1] 3. The users rating is added to Moocher Alternate/Exceptional Flows: A-1: The user has already rated the event 1.

The user will not be allowed to choose a rating from the panel, and his past rating for the event will be displayed

Add a Comment Use Case Name

Add a Comment

Primary Actor

User

Stakeholders

Users, Event Organizers

ID:

11

Importance Level: B


Brief Description

The user wishes to add a comment to the Moocher event page

Relationships: Include: View Moocher Event

Normal Flow of Events: 1. The user navigates to the Moocher event page 2. The user enters a message in the comment box at the bottom of the page 3. The user clicks on submit and the comment is added to the page [A-1] Alternate/Exceptional Flows: A-1: User has entered a message too soon after the last one 1.

The user is notified he has to wait for a certain amount of time before being able to post another message

A-2: User has entered a blank comment 1.

The user is notified that the comment was blank and is asked to resubmit

Sort Events Use Case Name

Sort Events

Primary Actor

User

Stakeholders

Users

Brief Description

The user wishes to sort a list of events by some criteria

Trigger

A sort-able list view from one of the Moocher application pages

ID:

13

Importance Level: B

Normal Flow of Events: 1. The user navigates to one of the sort-able lists in the application


2. The user can click on any of the criteria to sort the list in ascending order 3. The user can click on the criteria again to sort the list in descending order


C-Level Use Cases

View Map of Events Use Case Name

View Map of Events

ID:

15

Importance Level: C

Primary Actor

User

Stakeholders

Users

Brief Description

The user wishes to view all network events on a map

Normal Flow of Events: 1. The user navigates to the particular network page[A-1] 2. The user is presented with a map box that displays all events overlaid on a Google Map / Custom Map Alternate/Exceptional Flows: A-1: No upcoming events 1.

The user is notified that there are no upcoming events in any network

Ban User from Moocher Use Case Name

Ban User from Moocher

ID:

17

Primary Actor

Administrator

Stakeholders

Administrators

Brief Description

The administrator wants to prevent a Facebook account from being able to user Moocher

Trigger

The user must have Moocher installed

Normal Flow of Events: 1. The administrator finds the user's profile via Facebook search

Importance Level: C


2. The admin clicks 'Ban from Moocher' and the user is removed from the Moocher database and blocked [A-1] Alternate/Exceptional Flows: A-1: User does not have Moocher installed 1. 2. 3.

The admin is notified that the user does not have Moocher installed The admin is prompted to confirm adding the user to a permanent ban list The user is blocked from the Moocher application

Email Event to Friend Use Case Name

Email Event to Friend

ID:

18

Importance Level: C

Primary Actor

User

Stakeholders

Users, Event Organizers

Brief Description

The user wants to send the details of a Moocher event to a specific email

Relationships: Include: View Moocher Event

Normal Flow of Events: 1. The user navigates to the specific Moocher Event Page 2. The user clicks on 'Email Event to Friend' and is prompted for an email address 3. The user enters the email address and an email notification is sent to the address with the event details [A-1] Alternate/Exceptional Flows: A-1: Invalid Email Address 1.

The user is notified that the email address was invalid and that the action could not be completed

Add to Google Calendar


Use Case Name

Add to Google Calendar

ID:

19

Importance Level: C

Primary Actor

User

Stakeholders

Users

Brief Description

The user wishes to add the event to his Google Calendar

Trigger

The user must be logged in to Google Calendar and Facebook

Relationships: Include: View Moocher Event

Normal Flow of Events: 1. The user clicks on Add to Google Calendar on the Moocher event page [A-1] 2. The Moocher event is added to Google calendar as an event with the name, date, time and location Alternate/Exceptional Flows: A-1: No Google Account information stored 1.

The user is prompted to fill out his Google account login information

Delete Moocher Event Use Case Name

Delete Moocher Event

Primary Actor

Administrator

Stakeholders

Administrators

Brief Description

The administrator wants to delete a Moocher event

Trigger

An event was flagged for deletion, or needs to be removed manually

Relationships: Include: View Moocher Event

ID:

5

Importance Level: C


Normal Flow of Events: 1. 2. 3. 4.

The administrator finds the required event through the Events List page The administrator clicks on the delete event link, and is asked to confirm deletion The Moocher event is removed from the public event view The creator of the event is notified of the deletion

Alternate/Exceptional Flows: A-1: The event was already removed / does not exist 1.

The administrator is notified that the action could not be performed because the event does not exist in the database


3.2 Test Cases

View Moocher Event Test Case Name

View Moocher Event

Test Case Description

The Moocher user clicks on a particular event from a link, list or notification and is then presented with an event page with details, message boards and other options.

Scripted By:

Varun, Wang

Executed By:

Varun, Wang

Step

Flow of Events

Execution Date:

Input Data

Planned

Actual

3/6/2009

3/6/2009

Anticipated Outcome

Comments

Status

1.

User clicks on event link

Event page loads

OK

2.

Event is displayed

Event is displayed

OK

Invite Friends to Event Test Case Name

Invite Friends to Event

Test Case Description

The Facebook user clicks on Create Event in Moocher and is prompted to fill out all requisite information such as date and time, location, name etc. The event is then posted on the Moocher server and the user is prompted to invite friends to the event.

Scripted By: Executed By:

Planned Execution Date:

Actual


Step

Flow of Events

Input Data

Anticipated Outcome

1.

User clicks on link

Invite friends page loads

2.

Invite friends page is displayed

Invite friends page is displayed

3.

User selects friends to invite

Selected friends is displayed

4.

User sends friend invites

Friend invites are sent

Comments

Status

Subscribe to Event Test Case Name

Subscribe to Event

Test Case Description

Once a user has located a Moocher event he then clicks on Attending in order to subscribe to the event. He is then added to the attendee list and will receive notifications and updates regarding the event.

Scripted By:

Alex, Varun

Executed By:

Alex, Varun

Step

Flow of Events

Execution Date:

Input Data

Planned

Actual

3/6/2009

3/6/2009

Anticipated Outcome

Comments

Status

1.

User clicks on link

Attend event button gives tactile feedback

OK

2.

Event page displays user is attending event

Event page displays user is attending event

OK


Delete Moocher Event Test Case Name

Delete Moocher Event

Test Case Description

The admin finds the desired event and is provided with a 'Delete Event' on the page. Once this is done, the admin is provided with a form where he specifies the reasons for deleting the event. This information is logged and the event is removed.

Scripted By:

Planned

Executed By:

Step

Actual

Execution Date:

Flow of Events

Input Data

Anticipated Outcome

1.

Admin clicks on delete link

Deletion confirmation dialog box is displayed

2.

Admin confirms deletion of event

Event is deleted

Comments

Status

Rate Moocher Event Test Case Name

Rate Moocher Event

Test Case Description

A user proceeds to the event page and can rate the event on a scale of 1-5 from the ratings panel.

Scripted By:

Varun, Lily

Executed By:

Varun, Lily

Step

Flow of Events

Execution Date:

Input Data

Planned

Actual

3/6/2009

3/6/2009

Anticipated Outcome

Comments

Status

1.

User clicks on event link

View event page loads

OK

2.

View event page is displayed

View event page is displayed

OK


3.

User selects a rating

View event page updates with new rating

OK

Add a Comment Test Case Name

Add a Comment

Test Case Description

A user proceeds to the event page and can add comments via the form at the bottom of the comments section.

Scripted By:

Planned

Executed By:

Step

Flow of Events

Actual

Execution Date:

Input Data

Anticipated Outcome

1.

User clicks on event link

View event page loads

2.

View event page is displayed

View event page is displayed

3.

User enters a comment

View event page displays with comment

4.

User submits comment

View event page updated with added comment

Comments

Status


Search by Parameters Test Case Name

Search by Parameters

Test Case Description

The Moocher user clicks on the search button in the Moocher app window and is then provided with a list of options to sort through all available free food events. The user is then presented with a list of all relevant events.

Scripted By:

Alex, Amritha

Executed By:

Alex, Amritha

Step

Flow of Events

Execution Date:

Input Data

Planned

Actual

3/6/2009

3/6/2009

Anticipated Outcome

Comments

Status

1.

User clicks on search button

Search page loads

OK

2.

Search page is displayed

Search page is displayed

OK

3.

User enters a search query

Search page displays with query

OK

4.

User submits search

Search page displays search results

OK

View Events by Network Test Case Name

View Events by Network

Test Case Description

The Moocher user clicks on a particular network tab and is presented with a list of events. The user clicks on the event link and is then presented with an event page with details, message boards and other options.

Scripted By:

Alex, Wang

Executed By:

Alex, Wang

Execution Date:

Planned

Actual

3/6/2009

3/6/2009


Step

Flow of Events

Input Data

Anticipated Outcome

Comments

Status

1.

User clicks on network tab

Network tab loads

OK

2.

Network tab is displayed

Network tab is displayed

OK

3.

User clicks on event link

View event page loads

OK

4.

View event page is displayed

View event page is displayed

OK

Import Event from Facebook Test Case Name

Import Event from Facebook

Test Case Description

The Moocher user clicks on an import event tab and is presented with a list of existing events. The user clicks on the event link and is then presented with a page for entering mooch, restrictions, etc and importing to Moocher.

Scripted By:

Alex, Lily

Executed By:

Alex, Lily

Step

Flow of Events

Execution Date:

Input Data

Planned

Actual

3/6/2009

3/6/2009

Anticipated Outcome

Comments

Status

1.

User clicks on import tab

Import tab loads

OK

2.

Import tab is displayed

Import tab is displayed

OK

3.

User clicks on event link

Edit event page loads

OK

4.

User enters mooch, restrictions, etc.

Edit event page shows mooch, restrictions, etc.

OK

5.

User selects import

View event page

OK


6.

event button

loads

View event page is displayed

View event page is displayed

OK

Sort Events Test Case Name

Sort Events

Test Case Description

The Moocher user clicks on the column heading of a table of existing events. The table then sorts by the column values either decreasing or increasing.

Scripted By:

Planned

Executed By:

Step

Actual

Execution Date:

Flow of Events

Input Data

Anticipated Outcome

1.

User clicks column header

Events resort by column data

2.

Events are sorted by column data

Events are sorted by column data

Comments

Status

View Map of Events Test Case Name

View Map of Events

Test Case Description

The Moocher user clicks on the map link to view all of the events within a network on a map.

Scripted By: Executed By:

Planned Execution Date:

Actual


Step

Flow of Events

Input Data

Anticipated Outcome

1.

User clicks map link

Map page loads

2.

Map page is displayed

Map page is displayed

Comments

Status

Ban User from Moocher Test Case Name

Ban User from Moocher

Test Case Description

The admin will click on the delete button from within a user profile to prevent a Facebook account from being able to user Moocher

Scripted By:

Planned

Executed By:

Step

Actual

Execution Date:

Flow of Events

Input Data

Anticipated Outcome

1.

Admin clicks on user profile link

User profile page loads

2.

User profile page is displayed

User profile page is displayed

3.

Admin clicks on the ban user from moocher button

User is banned from moocher

Comments

Status

Add to Google Calendar Test Case Name

Add to Google Calendar

Test Case Description

The user will click on the add to Google calendar link on the event page to add the event to their Google calendar.


Scripted By:

Planned

Executed By:

Step 1.

Actual

Execution Date:

Flow of Events

Input Data

User clicks on the add to Google calendar link

Anticipated Outcome

Comments

Status

The event is added to the users Google calendar with appropriate time, date, name, location, etc

Email Event to Friend Test Case Name

Email Event to Friend

Test Case Description

The user will click on email to friend on the event page

Scripted By:

Planned

Executed By:

Step 1.

Flow of Events User clicks on the email link

Actual

Execution Date:

Input Data Email Address

Anticipated Outcome

Comments

The event details are emailed to the specific ID

Check for valid email, spam prevention

Status


4. Development & Extensibility 4.1 Moocher Code Documentation All files will start with a comment header containing a description of the purpose of the file and any other relevant information. All methods will have a comment header with postconditions, preconditions, and return types defined. Any important sections of code or potentially confusing implementations will have comments above the section of interest with helpful information. All database tables, fields, and data types will be documented in an ERD. All file change log will be exported from Dropbox’s revision history and placed within each files comment header.

4.2 Implementation & Deployment Moocher is being developed live on a server, which Facebook accesses via the application page. Developing live allows us to send our application to testers easily, and also makes the final deployment relatively simple. However, after the official launch we strongly recommend against developing live, as end users will be constantly accessing the application. A solid plan of action would be to develop another Facebook beta application which would serve as the live testing environment for the app. Once changes are finalized and tested they can be pushed to the live server with little or no downtime

4.3 Extending Moocher We are working on making Moocher more open and accessible, by adhering to certain conventions and standards. The implementation of Google Maps, Calendar and other web applications is merely the first step. We hope to have a more structured extensibility framework by Phase 5, as we have not finalized certain parameters and applications yet.


Moocher Tech Doc