Social Network Website to Monitor Behavior Change Design Document Client: Yolanda Coil Advisor: Simanta Mitra Team #11: Gavin Monroe Nicholas Schramm Davendra Jayasingam
Table of Contents PROJECT TEAM INFORMATION... 4 CLIENT... 4 FACULTY ADVISOR... 4 STUDENT TEAM... 4 COPYRIGHT INFORMATION... 6 TECHNOLOGY AND TOOLS... 7 TECHNOLOGY... 7 VERSION CONTROL... 7 TOOLS... 7 CODEIGNITER... 7 PHP... 8 SELENIUM... 8 EXECUTIVE SUMMARY... 9 PROBLEM STATEMENT... 10 INTENDED USERS AND USES... 10 RESEARCHER PARTICIPATION... 10 USER PARTICIPATION... 10 EXPECTED END PRODUCT & OTHER DELIVERABLES... 10 OVERALL APPROACH... 11 DESIGN OBJECTIVES... 11 FUNCTIONAL REQUIREMENTS... 11 NON- FUNCTIONAL REQUIREMENTS... 13 CONSTRAINTS... 13 TESTING & EVALUATION PLAN... 14 UNIT TESTING... 14 SYSTEM TESTING... 14 PERFORMANCE TESTING... 14 VOLUME TESTING... 14 LOAD/STRESS TESTING... 14 USABILITY TESTING... 14 OVERALL DESIGN... 15
OVERALL ARCHITECTURE... 15 LAYERED DIAGRAM... 15 CLASSES MODULES... 15 SERVICES MODULES... 15 DETAILED DESIGN... 16 SEQUENCE DIAGRAMS... 16 LOGIN... 16 SURVEY... 17 SURVEY RESPONSE... 18 DESIGN ARCHITECTURE... 19 SCREEN FLOW DIAGRAM... 20 PAGE ACTIONS... 20 LOGIN PAGE:... 20 PROFILE PAGE:... 20 MEMBER S HOME PAGE:... 21 ADMIN S HOME PAGE:... 22 DESIGNER S HOME PAGE:... 22 DATABASE DIAGRAM... 23 LOG DESCRIPTION... 24 POST DESCRIPTION... 24 DESIGN RATIONALE... 25 DESIGN ISSUES... 25 SERVER SPECIFICATIONS... 25 UNIFIED NEWS FEED... 25 LOG FORMAT... 26 CLOSING SUMMARY... 27
Project Team Information Client Yolanda Coil Graduate Assistant-Teaching/Research Department of Kinesiology Office: 235 Forker Bldg Ames, IA 50011-1160 Telephone: 515-294-8009 Email: yolandac@iastate.edu Faculty advisor Simanta Mitra Senior Lecturer Department of Computer Science Office: B21 Atanasoff Ames, IA 50011-1041 Telephone: 515-294-3463 Email: smitra@iastate.edu Student Team Davendra Jayasingam Computer Engineering Address: 245 N Hyland Ave Telephone: (515) 520-1390 Email: davendra@iastate.edu Gavin Monroe Software Engineering Address: 2215 Frederiksen Ct Ames, IA 50010 Telephone: (757) 439-4283 Email: gemonroe@iastate.edu
Nicholas Schramm Computer Engineering Address: 4820 Mortensen Rd Ames Ia, 50014 Telephone: (612) 518-5827 Email: nschramm@iastate.edu
Copyright Information The client, Yolanda Coil, holds the copyright to the web site and all its contents. Any member of the team or the team s advisor cannot claim copyright of code in the web site, or any part of the website as their own once the project is completed. Copyright 2011 Yolanda Coil
Technology and Tools Technology Version Control The team will use Subversion to perform version control. Subversion can downloaded and installed from http://subversion.apache.org/. All editable data will be versioned, such as the project's source code, web pages, and documentation. Data that does not change, such as memos, will be archived instead of versioned. Generated files will not be archived or versioned. Tools CodeIgniter What is CodeIgniter? CodeIgniter is a powerful PHP framework with a very small footprint, built for PHP coders who need a simple and elegant toolkit to create full-featured web applications. Why CodeIgniter? The team chose CodeIgniter to use as a web framework because it follows a strict Model View Controller paradigm. The model view controller paradigm helps with code maintainability by separating the presentation and data layers. CodeIgniter also comes with built in features that help for two reasons. First it saves time for the group. There is no need to built features that are standered between web apps and allows the team to building the website. The second reason is that it prevents bugs in the system. If the team has to code all the tools, the chance
that there are bugs in the system is much higher. There still could be bugs in CodeIgniter itself, but if one is found it will be patched quickly with no work done by the team. PHP Selenium
Executive Summary This report details the design plan for the Social Network Website to Monitor Behavior Change project. This team consists of Software Engineer Gavin Monroe and Computer Engineers Nicholas Schramm and Davendra Jayasingam. Since no previous system was implemented, this project s goal is to create a new system according to specifications provided by our client. Heavy usage of web programming languages like PHP and Javascript, along with a database (MySQL) while maintaining the security of our website as our highest priority. Our project s main aim is to design and build a social network website for our client, Yolanda Coil. Our website will be of great assistance to her in her research, which is centered on human behavior change and human computer interaction. Our client has considered the use of Facebook and other sites for this project, but has deemed that they do not provide sufficient privacy, analytics reports, or control over users participation. She needs a site very much like Facebook that will give her data collected automatically through the interaction of users using her website. The aim of our client s research is to determine if participation in guided community discussion, via the Internet, is capable of successfully producing behavioral change, and to what degree could change be achieved. She plans to do this through our website because it her research would be much simpler and easier to monitor. She will collect behavioral data using features on our website such as calendars and feeds, and surveys that she will create and submit. This report will be an in-depth look into the design plan that we have laid out for our project. We will acknowledge those that have given us assistance, allowing the design process to run smoothly. Next we have our problem statement where we describe the general problem posed by our project and then we have our well defined proposed approach to solving the problem. We then move into our operating system for the project and explain some of the constraints it poses for the project. We will then have an enumeration of user categories that would deal with the system - complete with their use cases. Towards the end of the introduction material is the Assumptions and Limitations that was constructed for our project. Finally, we will detail the expected product and our deliverable for this project. The next section of the report will delve into the components that define our overall approach. We shall highlight the functional requirements, constraints, and technological considerations while accounting for the technological considerations. This report will then describe our testing requirements as we can best see fit from this point (two very important issues will also be addressed in the section regarding safety and security concerns, including but not limited to, concerns about our intellectual property and making sure that we have the rights to any tools or libraries that we may use). Possible risks shall also be briefed upon in the following sections along with the development of proposed milestones and the usage of tracking procedures. We estimated our resources and scheduling for project tasks. As for resources we have looked into languages and libraries that would be most beneficial and compatible.
Problem Statement As of now, no available social network will allow a user to create it s own sub social network based of the parent, and use that to monitor the activity levels of users of the sub social network. Available social network do not provide its users with the availability is a lack of analytics availability and an excess of features. For our product to fulfill the privacy requirements for research purposes all personal data kept strictly confidential, yet to be useful for research purposes it must collect and store personal data and give the administrator complete access to this information. This is what the currently available social do not provide networks provide. Intended Users and Uses Researcher Participation Research Administrator Research Assistant The application is intended for use by researchers regarding information on behavior change. As such, there are two distinct types of users. Research administrators who are using the application for research and Research Assistant who are using the application to keep the group running. User Participation Support Group The application will be used as a social network for a group seeking behavior change. These users will share a common unifying factor and will be selected by the research administor for participation on this application. An example one such group will be Female Police Officer. Expected End Product & Other Deliverables The expected end product is a system comprised of the database, server configuration, and web pages. We expect all components of the product to work in conjunction and be correctly configured when delivered to the client. The client shall be able to use the product to their specifications which may include creating users, tests, administering tests, reviewing scores, or generating reports based on the scores from tests.
Overall approach Design Objectives The application will be divided into two main systems. The web-based social network part and the data collecting research part. The first is the web based social network. Like most current social networks, it will have a news feed, a private messaging system, a posting system, and a calendar system. Additionally we will have an Ask the Expert feature that will allow users to submit questions to the administrator. The administrator will then be able to contact and expert and provide a response. The response will then get added to the news feed which is viewable for all. The second part is a data collection part. For data collection, we will use a log system. For every action, a log will be generated in the system. This log will contain the type of action, and time stamp and a blob of data specific to each entry. The admin will also have a interface for generating a report of the data. The admin will select a section of the data and the report which will be generated will contain the data records from the website. Functional requirements 1. User accounts a. The product shall allow users to specify their password. b. The product shall allow users to specify their user name. i.the product shall restrict users from having the same user name. c. The product shall allow users to specify their avatar. d. The product shall allow users to log in with their user name and password. e. The product shall allow users to interact with users in their group. f. The product shall restrict users from interacting with users in other groups. 2. Privileged Users a. The product shall allow privileged users to A/E/D users. b. The product shall allow privileged users to A/E/D user groups. c. The product shall allow privileged users to associate users with user groups. d. The product shall allow privileged users to associate roles with user groups. e. The product shall allow privileged users to view a separate command interface which is similar to the normal user view, but contains more actions. 3. Private messaging a. The product shall allow a user to send a plain text message to other users. b. The product shall allow a user to respond to messages from other users. 4. Calendar a. The product shall allow each user to have a calendar. b. The product shall allow a user to A/E/D events.
c. The product shall allows users to specify events to be private and those events cannot be seen by normal users. 5. Surveys a. The product shall allow a privileged user to A/E/D surveys. b. The product shall allow a privileged user to A/E/D survey questions. c. The product shall allow a privileged user to associate survey questions with surveys. d. The product shall allow a privileged user to schedule surveys to be displayed to other users e. The product shall notify a user when there is a new survey available. f. The product shall allow a user to take a survey only once. 6. Ask the experts a. The product shall allow a user to send a question to the privileged to be answered. b. The product shall allow a privileged user to create an answer for the question c. The product shall allow a privileged user to add an answered question to the news feed. 7. News Feed a. The news feed shall show an aggregate of items consisting of posts, events, and Ask the expert questions. b. The news feed shall show the latest post in a chain of posts c. The news feed shall show its items in reverse chronological order. d. The news feed shall show only show items that have been marked as public. e. The news feed shall show a specified number of items per page. f. The product shall allow a user to change the number of items per page. 8. Posts a. The product shall allow users to create a post. b. The product shall allow users to create a response to a post which will create a chain of posts. c. The product shall name a chain of posts by the original post. d. The product shall show the the most recent post first in a chain of posts. 9. Data Collection a. The product shall track user activity in the form of counting posts, logging on/off, questions asked, messages posted, word count contained in messages posted, and recipient of messages posted. b. The product shall all the privileged user to export the data in formats for processing such as comma separated values and into formats readable by SPSS, SAS, and R.
Non-Functional Requirements 1. Backup a. The product shall create a complete database backup every 1 day. 2. Privacy and security a. The product shall store passwords in the database using a one-way hashing algorithm. b. The product shall display content to authenticated users only. c. The product shall display private content to the authoring user and administrators only except in the case of private messages where 3. Reliability a. For every 1000 requests, the product shall fail at most one time. 4. Accessibility a. The product shall allow the user to perform every action regardless of wether JavaScript is enabled or not. b. The product shall follow Web Accessibility Initiative (WAI) guidelines. Constraints The application must be viewable in Internet Explorer, Safari, Firefox and Chrome. These browsers are the most commonly used browsers and should cover the majority of our users. For technology we looked at using Perl, JSP.net, and Adobe ColdFusion. In the end we went with PHP which was want the team was most familiar with. In addition PHP is a very well known language. If the project was going to be continued after this team is finished, PHP would make it easier to find other developers. The team chose CodeIgniter to use as a web framework because it follows a strict Model View Controller paradigm. The model view controller paradigm helps with code maintainability by separating the presentation and data layers. CodeIgniter also comes with built in features that help for two reasons. First it saves time for the group. There is no need to built features that are standered between web apps and allows the team to building the website. The second reason is that it prevents bugs in the system. If the team has to code all the tools, the chance that there are bugs in the system is much higher. There still could be bugs in CodeIgniter itself, but if one is found it will be patched quickly with no work done by the team.
Testing & Evaluation Plan Unit Testing The Team will test the individual components of the application with Selenium, a suite of tools specifically for testing web applications (http://seleniumhq.org/about/). The Team will create unit tests for each manipulation of data in the application, e.g., adding a user or editing a event. Periodically, the team will rerun each test to identify regressions. The team chose Selenium as our testing suite because it has a suite of tools to automate web app testing across many platforms. Selenium runs in many browsers and operating systems and can be controlled by many programming languages and testing frameworks. System Testing The team will manually test each page and function of the web site by using multiple browsers. This approach ensures the system's compliance with its specified requirements. The team will also not look at code and assume no knowledge of the inner design of the code or logic to test the web site as a whole. Performance Testing Volume Testing The Team will test the performance of the application against different data sets. The Team will use data sets of different sizes to test how well the application performs with different amounts of data. To do this, the Team will programmatically generate data sets of different sizes and then rerun each unit test while profiling the application s performance. Load/Stress Testing The Team will test the performance of the application against different usage levels. The Team will use software to simulate different usage levels and profile the application to determine how quickly it responds. Usability Testing The Team will release a version of the application to beta testers. The Team will provide a script that the beta testers will use to test the application. The Team will monitor the beta testers as they use the application noting any difficulties the beta testers have using or understanding the application interface.
Overall Design The application will be built based on a typical web-based application. As such the design can be broken down into several parts. Overall Architecture Insert layered diagram and explain it. Layered Diagram Classes Modules Services Modules Scheduler Statstics
Detailed Design Sequence Diagrams Login
Survey
Survey Response
Design Architecture
Screen Flow Diagram This is the layout for the pages of the application. The login page is the first page the user sees upon entering our site and the only real function will be logging in. Upon successfully logging in, the user will be take to the respective Home site depending on which type of user logged in. Each user will have the same set of shared views, but the admin will be able to access the admin page and the designer will be able to access the basic design page. Page Actions Login Page: These are the contents that make up the login page. Profile Page:
These are the contents that make up the profile page. Member s Home Page: These are the contents that make up the member s home page. The member home page layout is slightly different from the Admin s and Designer s home page layout because it has no administrative or design features.
Admin s Home Page: These are the contents that make up the admin s home page. The admin home page layout is slightly different from the member s and designer s home page layout because it has administrative features (Admin Page). Designer s Home Page: These are the contents that make up the designer s home page. The designer home page layout is slightly different from the member s and admin s home page layout because it has design features (Layout Page).
Database Diagram Database Diagram
Log Description For recording information, the team will be using a log table in the database. After every recordable action by the normal users, a log message will be inserted. Each log record will contain the id for the user that initiated the message, a string message which will represent the type of log entry, a string of details which will serve as a log-type independent space for extra information about he action, a reference id that will point to any specific post if it is needed and a timestamp. The team decided on using a string for the type of action that was logged. This would make our database denormalized, but it would give us a greater flexibility in terms of different types of logs are concerned. The team was also made the decision for having a details string that would represent any additional information. This also adds a bit of redundancy, but since almost all of the log actions would require additional information this seemed quite acceptable. The reference id would represent a key for any reference that would be needed. The team primarily envisioned using this as a reference to posts for when a user would post. Working in conjunction with the log table would be an affected users table. This would simply have a reference to a log action and contain the affected user. Overall our log system in the database has a few redundant parts. The team found this acceptable, given the small space requirements of a relational database. Post Description We designed our post system around displaying information in the newsfeed. As designated by the client, we have 5 different actions that should be shown in the newsfeed. They are the basic post, the update, the event, the question, and the answer. In this system posts represent the basic conversation for the thread, it contains some basic information, but the most important is that each posts has a reference to its parent post. This allows for a thread like conversation in the product. The other types of actions are extensions of the post. Each of these actions would contain the reference to a post which would be able to be referenced by other posts, allowing for conversation following anything that could be rendered on the news feed. These other actions would consist of how to view themselves and any other information they require.
Design Rationale Design Issues Server specifications Description The server that we choose to host our site must have optimal configuration and specifications to maintain satisfactory user experience when browsing our site. Factors affecting issue The server specifications, such as RAM, HDD size, CPU speed, and bandwidth will affect the speed of which data is manipulated on the hard disk drive. If we have a server with optimal requirements (including bandwidth), the user should be able to browser the site in satisfaction. To get the optimal configuration, cost is an issue. Better server builds require a higher cost. Choices Use Iowa State University Servers. Pro Free Con Lower server specifications Limited customer support Self managed servers Use a third party web host. Pro Convenient customer support Managed servers Choice of server specifications (custom build) Con Expensive Resolution We will be using a third party host for our website, and we need to chose a right hosting package that meets our requirements as a suitable build for hosting our website. The bandwidth provided by the web host should be more than enough to accommodate around 50 users who constantly use the site. We must make sure that we do not spend over budget to get better configurations on our server. Unified News Feed Description We must find a way to display different types of data in unified news feed.
Factors affecting issue The extensions and reference of our posts are a bit of an issue because posts must have a reference to parent posts to create a thread like conversation. Post extensions must be formatted a certain way so that it could be rendered on the news feed. Resolution The client requested that we have 5 different actions that should be shown in the newsfeed. These actions are the basic post, the update, the event, the question, and the answer. We will create a post class and have different kids of posts extend from it. Each post would be a parent and a child of the other, and this would create a representation of a thread like conversation. Log Format Description There should be a format when generating logs from the web site. Factors affecting issue We would be faced with data redundancy and a wasteful amount of information without a proper log format. Resolution We decided to use a log table in the database. After every recordable action by users, a log message will be inserted. This message will be formatted to contain 5 recordable actions. This message contains information that the client deemed most useful. This approach does not remove redundancy, but reduces it significantly to a satisfactory level. We also decided to keep the log as an independent entity from the database. This way, data change in the database does not affect the information in the log file.
Closing Summary The final deliverable for this project will be the social network website. An external hosting service will be used for the physical storage of the website and data. The end product of the project, however, will be the usage and behavioral data, which will be collected over a time period longer than the length of the course.