-
Notifications
You must be signed in to change notification settings - Fork 0
Coding Preparation Document
Final date: 16th Nov to Friday 20th Nov 10am
Your project will be marked in class in the last week of the term Value: 40%
Please install all files on kate (make sure your database tables are populated with the required data). Also copy your project into the dropbox on M:\Assessments Swallow Box\IN612Web2\Assignment 4.
Your site must provide (at a minimum) the following functionality:
- User registration
- User login (multiple user site)
- Main welcome screen
- Data entry screen
- Tabular view of all data entered for the logged in user
- Life time summary statistics table for the logged in user
- Calendar view coloured by activity
- Graphs: current user’s last 7 days, current user’s last month or current month
- Pie graph for the current user
- Targets
- Other motivating graphs or data- leader boards – automated comments
- All users- last 7 days comparison
- Other motivating graphs or statistics showing the logged in user vs. the other people
##Other Requirements For testing and setup purposes you are required to have the following two files:
- createTables this is where you create all the tables.
- showTables this is for testing purposes you must show all fields and all records in all tables.
Hard code a user: login name dale password test This gives me access to your site to check your progress.
##Version control: You must set up a version control system. I recommend GitHub, request a student account and you will receive 5 free private repositories. https://github.com/blog/1900-the-best-developer-tools-now-free-for-students For the version control mark you must make a minimum of 2 submits per week starting on 19th October.
Due date: 12/13th Nov Value: 10% of project mark
Please fill in all parts of this document ideally before you begin coding:
1.List any functionality you intend to provide additional to that listed above
2.List or sketch (just little boxes will do – just give each one a name so you can refer to it below) the individual screens you will provide in your site. Make sure that you have the necessary screens for all of the functionality required. dataEntry firstPage home myData myDataAll myDataCalendar myDataGoals myDataGraphs myGoal signup targets
3.In the table below, list all the screens you are building, as named above. For each screen, give the name of the file which will produce the html for that screen. In the third column state whether the file is self-processing (i.e. it contains a form whose action is itself; it processes its own POST data), stand-alone processing (i.e. it is the ‘action’ of some other file; it processes POST data from a form generated in another file) or non-processing (i.e. it only generates html; it does not process POST data). For those files that process data, state the name of the file(s) for whose form(s) it serves as the action. Before trying to fill out this table, it may help to make a simple sketch of the relationships between files.
| Screen | File name | File type (self-ref, stand-alone processing or non-processing) | Processes form data from which file(s) |
|---|---|---|---|
| Screen | File name | Self processing | Other file |
4.List any additional utility files (i.e. files that don’t actually produce any screens, but just perform work). Examples are your dbConnect include file and any function libraries. For each listed file, briefly describe its purpose.
| File Name | File Purpose |
|---|---|
| connectvars.php | Contains data required for connecting to database |
| createTables.php | Creates the tables required for application and populates sample data |
| showTables.php | Shows data that is currently in all tables in a rather raw format for testing |
| login.php | Logs in a user |
| logout.php | Logs out a user |
5.In the table below, list each functional element you are going to provide that requires user input (e.g. elements 1, 2, 4, and 5 on the first page of the assignment handout). For each function listed, name the screen(s) the user will see when providing that input. For each screen, list all the input controls on the screen (don’t forget the submit buttons) with their type, name and value properties as they will appear in the generated <input...> tag.
| Function | Screen | Input Control Type | Input Control Name | Input Control Value |
|---|
6.In the table below, list each functional element you are going to provide that requires user input. For each function listed, write out the mySQLi query or queries that you will perform to support the functionality. Refer to the database tables described in your design document. Check that the controls you listed in Table 5 will enable you to perform all the queries listed here (pay special attention to how you will be able to tell which items are being added to the cart).
| Function | Queries |
|---|
7.List any additional queries you will perform on your database that are not directly tied to the processing of user input. For each query, briefly describe its purpose.
| Queries | Purpose |
|---|---|
| SELECT tbl_category.description AS 'Expense', SUM(tbl_item.amount) AS 'Total' FROM tbl_item JOIN (tbl_category) USING (category_id) WHERE tbl_item.user_id='$user_id' GROUP BY tbl_category.description ORDER BY tbl_category.description ASC; |
Provides lifetime totals for given user_id |
| SELECT tbl_category.description AS 'Expense', SUM(tbl_item.amount) AS 'Total' FROM tbl_item JOIN (tbl_category) USING (category_id) WHERE tbl_item.user_id='$user_id' AND tbl_item.date >= '$startDate' AND tbl_item.date <= '$endDate' GROUP BY tbl_category.description ORDER BY tbl_category.description ASC; |
Provides totals for given user within specified dates |
| SELECT description, coalesce(total.amount,0) FROM tbl_category LEFT JOIN (SELECT category_id, sum(amount) AS 'amount' FROM tbl_item WHERE user_id='$user_id' GROUP BY category_id) total USING (category_id); |
Totals up all expenses for a given user, including unused categories(this is needed for comparisons!) |
8.For each file you described in parts 3 and 4 above, list the data variables that will be stored in and/or retrieved from the $_SESSION array.
| File name | Variables | Stored in $_SESSION? | Retrieved from $_SESSION? |
|---|
9.For each file you described in parts 3 and 4 above, list all the data validation that you will perform. For each data element, give its local variable name, the name of the file which produces the html for the associated input control, the name of the data element in $_POST (i.e. its associative index in the $_POST array) and the type of validation to be performed. Simply give the php statement you will use to validate, if you wish.
| File | Variable name | Data from what file? | Data from what element of $_POST | Validation to be performed |
|---|
10.Sketch your database model
