running head: lab 2 - section 3.1 - functional ...cpi/old/411/greenf15/images/greenteamlab2... ·...
TRANSCRIPT
Running Head: Lab 2 - Section 3.1 - Functional Requirements 1
Lab 2
Section 3.1 Functional Requirements
CS 411W Janet Brunelle
Team Green Monarch Press
September 27, 2015
Version 2
Lab 2 - Section 3.1 - Functional Requirements 2
Table of Contents
3. SPECIFIC REQUIREMENTS
3.1. Functional Requirements
3.1.1. Publicfacing Interface
3.1.2. User Profile Interface (Reader)
3.1.3. Administration Dashboard Interface
3.1.4. Serverside Page Controllers and WordPress Plugin Integration
3.1.5. Database
List of Figures
Table 1. User Capabilities
Table 2. User Attributes
Table 3. User Role
Table 4. Role
Table 5. Role Privilege
Table 6. Privilege
Table 7. Notification
Table 8. Template
Table 9. Article
Table 10. Article Comment
Table 11. Blog Post
Table 12. Blog Post Comment
Table 13. Twitter Feed
Table 14. Twitter Feed Cache
Table 15. Whitelist User
Table 16. Keyword
Lab 2 - Section 3.1 - Functional Requirements 3
3. Specific Requirements
Specific requirements will be met in order to ensure proper function of MONARCH
PRESS. (Pop)
3.1. Functional Requirements
The functional requirements describe the capabilities of the MONARCH PRESS
prototype. These capabilities describe what the MONARCH PRESS prototype must do to meet
the goals of the project.(Pop)
EndUser Registered Reader
Social Media Moderator
Journalist Editor Admin
Read Article x x x x x x
Create Profile x x x x x
Tweet x x x x x
Contribute to File Dump
x x x
Create/Write Articles
x x x
Edit/Post Articles
x x
Remove Users from Whitelist
x
Table 1. Users capabilities
Lab 2 - Section 3.1 - Functional Requirements 4
3.1.1. Publicfacing Interface
3.1.1.1. Page layout and Rendering
A website must be displayed to the user that unifies elements from a
COTS WordPress installation with the modifications provided by
MonarchPress. The foundational changes that affect each page served
depend on the integration of MonarchPress modifications with the
standard layout and rendering process in WordPress. The MonarchPress
plugin must:(Wichern)
3.1.1.1.1. Must inject custom elements properly where they are
specified in templates and layouts. These include:
(Wichern)
3.1.1.1.1.1. Multimedia elements(Wichern)
3.1.1.1.1.1.1. Video(Wichern)
3.1.1.1.1.1.2. Animations(Wichern)
3.1.1.1.1.1.3. Sound Clips/Audio(Wichern)
3.1.1.1.1.2. Interactive data visualizations(Wichern)
3.1.1.1.1.2.1. Charts(Wichern)
3.1.1.1.1.2.2. Graphs(Wichern)
3.1.1.1.1.2.3. Maps(Wichern)
3.1.1.1.1.3. Social media feed(Wichern)
3.1.1.1.1.4. News aggregate feed(Wichern)
Lab 2 - Section 3.1 - Functional Requirements 5
3.1.1.1.1.5. Comment feed(Wichern)
3.1.1.1.1.6. Comment submission form(Wichern)
3.1.1.1.2. Must render userdefined (custom) layouts for specified
articles, replacing the standard layout(Wichern)
3.1.1.2. Comment feed(Wichern)
3.1.1.2.1. Must display comments (if any exist) associated with an
individual article(Wichern)
3.1.1.2.2. Must provide the ability to dynamically sort comments with
no page reload by:(Wichern)
3.1.1.2.2.1. Newest(Wichern)
3.1.1.2.2.2. Oldest(Wichern)
3.1.1.3. Comment submission form(Wichern)
3.1.1.3.1. Must provide ability for a user to submit a new comment if
current_user is loggedin(Wichern)
3.1.1.3.1.1. Must prevent multiple submissions by a user while
the new comment is being processed by the
server(Wichern)
3.1.1.3.2. Must provide, if user is not loggedin, the ability
to:(Wichern)
3.1.1.3.2.1. Login(Wichern)
3.1.1.3.2.2. Redirect to a page to register as a new
user(Wichern)
Lab 2 - Section 3.1 - Functional Requirements 6
3.1.1.4. Notification display(Wichern)
3.1.1.4.1. Must provide an icon indicating the current_user’s
notification status for the currently viewed article(Wichern)
3.1.1.4.2. Must provide the current_user (if loggedin) the ability to
“toggle” the icon, changing their notification preference for
the currently viewed article(Wichern)
3.1.1.4.2.1. Must render the new icon indicating the changed
status demonstrating the updated notification
preference with no page reload(Wichern)
3.1.2. User Profile Interface (Reader)
A web page interface shall be provided for each registered user to manage their
own user profile. All functionality requires that a registered user has properly
authenticated (“logged in”). The interface must provide the ability to:(Wiggins)
3.1.2.1. View profile information, consisting of these properties:(Wiggins)
3.1.2.1.1. Email address(Wiggins)
3.1.2.1.2. Displayed (public) username(Wiggins)
3.1.2.1.3. Password(Wiggins)
3.1.2.1.4. Secret question/answer pair(Wiggins)
3.1.2.1.5. Twitter username(Wiggins)
3.1.2.2. Edit each of the above listed properties(Wiggins)
3.1.2.2.1. Must provide basic form validation functionality on user
input(Wiggins)
Lab 2 - Section 3.1 - Functional Requirements 7
3.1.2.3. Save modified profile information(Wiggins)
3.1.2.4. View a list of notification subscriptions(Wiggins)
3.1.2.5. Remove an item from list of notification subscriptions(Wiggins)
3.1.2.6. Save modified list of notification subscriptions(Wiggins)
3.1.3. Administration dashboard interface
MonarchPress must integrate with the default WordPress administration panel in
order to provide rich editing functionality and administrative capabilities for other
features. Unless otherwise specified, user roles listed below also have access to all
admin panel interfaces and functionality that has been previously indicated for
other roles. All administration dashboard modifications must:(Wiggins)
3.1.3.1. Verify that the user has been authenticated with the
server(Wiggins)
3.1.3.2. Verify that the user has the proper privileges to access the
requested feature (Wiggins)
3.1.3.3. Layout and template editing interface (Pop)
The interface will provide the ability to create new articles that can be
published on the organization’s page. The page can view and edit already
stored templates by using the following:
3.1.3.3.1. Drag and Drop editor
User must be able to add to the article:(Pop)
3.1.3.3.1.1. HTML elements(Pop)
3.1.3.3.1.1.1. titles(Pop)
Lab 2 - Section 3.1 - Functional Requirements 8
3.1.3.3.1.1.2. paragraphs(Pop)
3.1.3.3.1.1.3. images(Pop)
3.1.3.3.1.1.4. anchor tags(Pop)
3.1.3.3.1.2. Multimedia Elements(Pop)
3.1.3.3.1.3. Interactive data visualizations(Pop)
3.1.3.3.1.4. Social media feed(Pop)
3.1.3.3.1.5. News aggregation feed(Pop)
3.1.3.3.2. Save modified layout or template(Pop)
3.1.3.3.3. Text editor(Pop)
3.1.3.3.4. View of article(Pop)
3.1.3.4. Journalist dashboard interface
Must provide the ability to:(Pop)
3.1.3.4.1. Modify the layout of a new article(Pop)
3.1.3.4.2. Modify the layout of an existing article(Pop)
3.1.3.4.3. Submit an article with modified layout to editors for
review(Pop)
3.1.3.5. Editor dashboard interface
Must provide the ability to:(O’Donnel)
3.1.3.5.1. Review submissions(O’Donnell)
3.1.3.5.1.1. List items waiting for review(O’Donnell)
3.1.3.5.1.2. Display a visual preview of a submission
simulation of appearance if published(O’Donnell)
Lab 2 - Section 3.1 - Functional Requirements 9
3.1.3.5.1.3. Email comments for changes to author(O’Donnell)
3.1.3.5.1.4. Edit submitted articles’ content directly(O’Donnell)
3.1.3.5.1.5. Edit layout for submitted articles(O’Donnell)
3.1.3.5.1.6. Publish an item(O’Donnell)
3.1.3.5.1.7. Remove an item from the list without
publishing(O’Donnell)
3.1.3.5.2. Manage feeds(O’Donnell)
3.1.3.5.2.1. List existing feeds(O’Donnell)
3.1.3.5.2.2. Add news feed by keyword(O’Donnell)
3.1.3.5.2.3. Add twitter feed by (O’Donnell)
3.1.3.5.2.3.1. Hashtag(O’Donnell)
3.1.3.5.2.3.2. Location(O’Donnell)
3.1.3.5.2.3.3. Username(O’Donnell)
3.1.3.5.2.4. Edit existing feed(Pop)
3.1.3.5.2.4.1. Display feed properties:(Pop)
3.1.3.5.2.4.1.1. Source News/twitter(Pop)
3.1.3.5.2.4.1.2. Search string(s) keyword, hashtag,
location, username, etc.(Pop)
3.1.3.5.2.4.1.3. Preview of feed output(Pop)
3.1.3.5.2.4.2. Edit feed properties(Pop)
3.1.3.5.2.4.3. Saved modified properties(Pop)
3.1.3.5.2.5. Remove feed(Pop)
Lab 2 - Section 3.1 - Functional Requirements 10
3.1.3.5.3. Manage media elements(O’Donnell)
3.1.3.5.3.1. List existing media elements(O’Donnell)
3.1.3.5.3.2. Sort media elements by(O’Donnell)
3.1.3.5.3.2.1. Date added(O’Donnell)
3.1.3.5.3.2.2. Title(O’Donnell)
3.1.3.5.3.2.3. Filename(O’Donnell)
3.1.3.5.3.3. Add media element by hyperlink(O’Donnell)
3.1.3.5.3.4. Add media element by upload(O’Donnell)
3.1.3.5.3.5. Remove media element(Perez)
3.1.3.5.4. Manage articles(Wiggins)
3.1.3.5.4.1. List existing articles(Wiggins)
3.1.3.5.4.2. Edit existing article(Wiggins)
3.1.3.5.4.3. Hide (“unpublish”) existing article(Wiggins)
3.1.3.5.4.4. Delete (permanently remove) existing
article(Wiggins)
3.1.3.5.5. Mobile alert publishing interface(Pop)
3.1.3.6. Administrator dashboard interface
Must provide the ability to:(Kennedy)
3.1.3.6.1. List existing users in a table(Kennedy)
3.1.3.6.1.1. Username(Kennedy)
3.1.3.6.1.2. Access level(Kennedy)
3.1.3.6.2. Sort list of users by:(Kennedy)
Lab 2 - Section 3.1 - Functional Requirements 11
3.1.3.6.2.1. Username(Kennedy)
3.1.3.6.2.2. Access level(Kennedy)
3.1.3.6.3. Add new user(Perez)
3.1.3.6.4. Edit an existing user(Perez)
3.1.3.6.4.1. Change access level(Perez)
3.1.3.6.4.2. Change username(Perez)
3.1.3.6.5. Save changes to user(Perez)
3.1.3.6.6. Delete existing user(Perez)
3.1.4. Serverside page controllers and WordPress plugin integration
3.1.4.1. Wordpress Plugin hooks (O’Donnell)
3.1.4.1.1. Twitter controller
3.1.4.1.2. News Aggregation controller
3.1.4.2. Save plugin data to database (O’Donnell)
3.1.4.3. Page Serving(Kennedy)
3.1.4.3.1. NEWS_FEED Models(Kennedy)
3.1.4.3.2. USER_LOGIN Models(Kennedy)
3.1.4.4. Comment model(Wiggins)
3.1.4.4.1. Creates new comment object(Wiggins)
3.1.4.5. Favorite/notification model handling(Wiggins)
3.1.4.6. User Controller(Wiggins)
3.1.4.6.1. Login (Perez)
3.1.4.6.1.1. Authentication (Perez)
Lab 2 - Section 3.1 - Functional Requirements 12
3.1.4.6.2. Registration page (Perez)
3.1.4.6.3. Profile display/edit (Perez)
3.1.4.6.3.1. Return profile data (Perez)
3.1.4.6.3.2. Validate/accept profile changes (Perez)
3.1.4.6.4. Profile permissions (Perez)
3.1.4.6.5. Favorites display/edit (Perez)
3.1.4.6.5.1. Return favorite data (Perez)
3.1.4.6.5.2. Validate/accept favorite/notification changes
(Perez)
3.1.4.7. User model(Wiggins)
3.1.4.7.1. Creates new user object(Wiggins)
3.1.4.8. Article Controller
3.1.4.8.1. New article (Perez)
3.1.4.8.2. Edit article content (Perez)
3.1.4.8.2.1. Article model validates content input (Perez)
3.1.4.8.3. Index/list of existing articles (Perez)
3.1.4.8.4. Editor review of existing article (Perez)
3.1.4.9. DnD Editor Controller
3.1.4.9.1. New layout/templates (Perez)
3.1.4.9.2. Accept layout input when user “saves” (Perez)
3.1.4.9.2.1. Send data for appropriate model to DB
(page/template/theme) (Perez)
Lab 2 - Section 3.1 - Functional Requirements 13
3.1.4.9.3. Edit existing “layout” (Perez)
3.1.4.9.3.1. Receive data for appropriate model from DB
(page/template/theme) (Perez)
3.1.4.9.3.2. Send data for appropriate model to DB
(page/template/theme) (Perez)
3.1.4.9.4. Display different editing options to different users (Perez)
3.1.4.10. Dashboards Controller
3.1.4.10.1. Display different options depending on user privileges
(Perez)
3.1.4.10.1.1. Journalist
3.1.4.10.1.2. Editor
3.1.4.10.1.3. Admin
3.1.4.10.2. Mobile alert publishing for editor privileges and higher
(Kennedy)
3.1.5. Database
3.1.5.1. The database must be MySQL 5.5 or greater(Kennedy)
Lab 2 - Section 3.1 - Functional Requirements 14
3.1.5.2. A table for USER must be created with the following attributes
:(Kennedy)
Column Name Data Types Description
ID Unique, primary key, INT(10), Not Null
The unique identifier for a user
USERNAME VARCHAR(25), Not Null
The username for the user account
PASSWORD VARCHAR(16), Not Null
The password for the user account
SECRET_QUESTION
VARCHAR(25), Not Null
The question used to verify a user if password is lost
SECRET_ANSWER VARCHAR(25), Not Null
The answer to the secret question
EMAIL VARCHAR(25), Not Null
The email address associated with the user account
TWITTER_HANDLE VARCHAR(25), Nullable
The Twitter handle, if one exists, associated with the user account
Table 2. User Attributes
Lab 2 - Section 3.1 - Functional Requirements 15
3.1.5.3. A table (Join Table) for USER_ROLE must be created with the
following attributes:(Kennedy)
Column Name Data Types Description
ID Unique, primary key, INT(10), Not Null
The unique identifier for a user role
USER_ID Foreign Key (USER), INT(10), Not Null
The user account
ROLE_ID Foreign Key (ROLE), INT(10), Not Null
The user role
Table 3. User Role
3.1.5.4. A table for ROLE must be created with the following
attributes:(Kennedy)
Column Name Data Types Description
ID Unique, primary key, INT(10), Not Null
The unique identifier for role
ROLE VARCHAR(25), Not Null
The description of the role
Table 4. Roles
Lab 2 - Section 3.1 - Functional Requirements 16
3.1.5.5. A table (Join Table) for ROLE_PRIVILEGE must be created with
the following attributes:(Kennedy)
Column Name Data Types Description
ID Unique, primary key, INT(10), Not Null
The unique identifier for role_privilege
ROLE_ID Foreign Key (ROLE), INT(10), Not Null
The user role
PRIVILEGE_ID Foreign Key (PRIVILEGE), INT(10), Not Null
The privilege
Table 5. Role Privilege
3.1.5.6. A table for PRIVILEGE must be created with the following
attributes:(Pop)
Column Name Data Type Description
ID Primary Key, INT(10), Not Null
The unique identifier for privilege
NAME VARCHAR(15), Not Null
The name of the privilege
DESC VARCHAR(100), Not Null
The description of the privilege
Table 6. Privilege
Lab 2 - Section 3.1 - Functional Requirements 17
3.1.5.7. A table for NOTIFICATION must be created with the following
attributes:(Kennedy)
Column Name Data Type Description
ID Primary Key, INT(10), Not Null
The unique identifier for notification
USER_ID Foreign Key(USER), INT(10), Not Null
The user account
ARTICLE_ID Foreign Key (ARTICLE), INT(10), Not Null
The article
HAS_BEEN_NOTIFIED
TINYINT(1), Not Null
Flag to tell whether a user has been notified about changes to an article
WANTS_NOTIFICATION
TINYINT(1), Not Null
Flag to tell whether a user wants a notification
Table 7. Notification
Lab 2 - Section 3.1 - Functional Requirements 18
3.1.5.8. A table for TEMPLATE must be created with the following attributes:(Pop)
Column Name Data Type Description
ID Primary Key, INT(10), Not Null
The unique identifier for template
FILE VARCHAR(150), Not Null
The file location of the template
Table 8. Template
3.1.5.9. A table for ARTICLE must be created with the following
attributes:(Kennedy)
Column Name Data Type Description
ID Primary Key, INT(10), Not Null
The unique identifer for article
PUBLISHED TIMESTAMP(YYYYMMDD HH:MM:SS), Not Null
The timestamp of when article was published
LAST_MODIFIED TIMESTAMP(YYYYMMDD HH:MM:SS), Not Null
The last time the article was modified
CONTENT TEXT, Not Null The content of the article
USER_ID Foreign Key (USER), INT(10), Not Null
The user account
Table 9. Article
Lab 2 - Section 3.1 - Functional Requirements 19
3.1.5.10. A table for ARTICLE_COMMENT must be created with the
following attributes:(Kennedy)
Column Name Data Type Description
ID Primary Key, INT(10), Not Null
The unique identifier for article comment
ARTICLE_ID Foreign Key(ARTICLE),INT(10), Not Null
The article
USER_ID Foreign Key(USER), INT(10), Not Null
The user account
CONTENT TEXT, Not Null The content of the article
PUBLISHED TIMESTAMP(YYYYMMDD HH:MM:SS), Not Null
The timestamp of when article was published
Table 10. Article Comment
Lab 2 - Section 3.1 - Functional Requirements 20
3.1.5.11. A table for BLOG_POST must be created with the following
attributes:(Kennedy)
Column Name Data Type Description
ID Primary Key, INT(10), Not Null
The unique identifier for blog post
PUBLISHED TIMESTAMP(YYYYMMDD HH:MM:SS), Not Null
The timestamp of when the blog was published
LAST_MODIFIED TIMESTAMP(YYYYMMDD HH:MM:SS), Not Null
The last time the blog post was modified
CONTENT TEXT, Not Null The content of the blog post
USER_ID Foreign Key(USER), INT(10), Not Null
The user account
Table 11. Blog Post
Lab 2 - Section 3.1 - Functional Requirements 21
3.1.5.12. A table for BLOG_POST_COMMENT must be created with the
following attributes:(Kennedy)
Column Name Data Type Description
ID Primary Key, INT(10), Not Null
The unique identifier for blog comment
CONTENT TEXT, Not Null The content of the blog post
PUBLISHED TIMESTAMP(YYYYMMDD HH:MM:SS), Not Null
When the comment was published
USER_ID Foreign Key(USER), Not Null
The user account
BLOG_POST_ID Foreign Key(BLOG_POST), Not Null
The blog post
Table 12. Blog Post Comment
Lab 2 - Section 3.1 - Functional Requirements 22
3.1.5.13. A table for TWITTER_FEED must be created with the following
attributes:(Kennedy)
Column Name Data Type Description
ID Primary Key, INT(10), Not Null
The unique identifier for twitter feed
NAME VARCHAR(50), Not Null
The name of the twitter feed
DESC VARCHAR(255), Not Null
The description of the twitter feed
WHITELIST_USER_ID
Foreign Key(WHITELIST_USER), INT(10), Not Null
The whitelist user
TWITTER_FEED_CACHE_ID
Foreign Key(TWITTER_FEED_CACHE), INT(10), Not Null
The tweet from cache
KEYWORD_ID Foreign Key(KEYWORD), INT(10), Not Null
The keyword
Table 13. Twitter Feed
Lab 2 - Section 3.1 - Functional Requirements 23
3.1.5.14. A table for TWITTER_FEED_CACHE must be created with the
following attributes:(Kennedy)
Column Name Data Type Description
ID Primary Key, INT(10), Not Null
The unique identifier for twitter feed cache
T_USERNAME VARCHAR(50), Not Null
The twitter user
TWEET VARCHAR(140), Not Null
The tweet from the twitter user
HASHTAG VARCHAR(50), Not Null
The hasgtag associated with the tweet
TIME_CREATED TIMESTAMP(YYYYMMDD HH:MM:SS), Not Null
When the tweet was created
Table 14. Twitter Feed Cache
Lab 2 - Section 3.1 - Functional Requirements 24
3.1.5.15. A table for WHITELIST_USER must be created with the
following attributes:(Kennedy)
Column Name Data Type Description
ID Primary key, INT(10), Not Null
The unique identifier for whitelist user
T_USERNAME VARCHAR(50), Not Null
The Twitter user
Table 15. Whitelist User
3.1.5.16. A table for KEYWORD must be created with the following
attributes:(Kennedy)
Column Name Data Type Description
ID Primary Key, INT(10), Not Null
The unique identifier for keyword
HASHTAG VARCHAR(50), Not Null
The hashtag associated with the tweet
Table 16. Keyword