Difference between revisions of "Swim Sheets"
Line 97: | Line 97: | ||
* Eight different classes | * Eight different classes | ||
− | '''AppDelegate.swift:''' auto generated class to make sure app screen | + | '''AppDelegate.swift:''' auto generated class to make sure app screen loads <br /> |
'''ViewController.swift:''' Page One of SwimSheets App, Input Lane Number. Button "go" segue to PageTwo.<br /> | '''ViewController.swift:''' Page One of SwimSheets App, Input Lane Number. Button "go" segue to PageTwo.<br /> | ||
− | '''PageTwo.swift:''' Second page of SwimSheets App with HomeModlel.swift as protocol. Displays the next input in the php file for the given lane, printing the event name, heat number, team name and the swimmers first and last name. Then asks for a confirmation for the swimmers name "Yes" Button segue to PageThree, "No" Button segue to PageFive. <br /> | + | '''PageTwo.swift:''' Second page of SwimSheets App with HomeModlel.swift as a protocol. Displays the next input in the php file for the given lane, printing the event name, heat number, team name and the swimmers first and last name. Then asks for a confirmation for the swimmers name "Yes" Button segue to PageThree, "No" Button segue to PageFive. <br /> |
'''PageThree.swift:''' Third page of SwimSheets input time (MM:SS.MsMs). UITextField only allows two digit inputs with the first input being no greater than six to insure valid time. Confirmation for the time "Yes" Button segue to PageFour, "No" Button clears time input by reloading the page.<br /> | '''PageThree.swift:''' Third page of SwimSheets input time (MM:SS.MsMs). UITextField only allows two digit inputs with the first input being no greater than six to insure valid time. Confirmation for the time "Yes" Button segue to PageFour, "No" Button clears time input by reloading the page.<br /> | ||
Line 107: | Line 107: | ||
'''PageFour.swift:''' When page is loaded sends time input to updateresult.php. Then Displays dater from PageTwo ( event name, heat number, team name and the swimmers first and last name) or if name of swimmer is changed PageFive ( swimmers first and last name) , and time from page three. Then pick "Next Race" Button segue back to PageTwo to read the next input for the lane number or "Exit" to quit and segue back to ViewController (page one).<br /> | '''PageFour.swift:''' When page is loaded sends time input to updateresult.php. Then Displays dater from PageTwo ( event name, heat number, team name and the swimmers first and last name) or if name of swimmer is changed PageFive ( swimmers first and last name) , and time from page three. Then pick "Next Race" Button segue back to PageTwo to read the next input for the lane number or "Exit" to quit and segue back to ViewController (page one).<br /> | ||
+ | '''PageFive.swift:''' With HomeModlel.swift as a protocol. Displays all posable swimmer names in table view use search bar to find and select new swimmers name. After name is picked "Go" Button segue to PageThree.<br /> | ||
+ | |||
+ | '''HomeModlel.swift:''' Connects app to getdata.php. reads file and sends each line of data to LocationModel as a jsonElement that can be read by classes with HomeModlel.swift as a protocol (PageTwo and PageFive). | ||
+ | |||
+ | ''LocationModel.swift:''' Stores all the dater sent from HomeModlel one line at a time as an NSObject that can be called and read. | ||
− | |||
'''Server and Database''' | '''Server and Database''' | ||
* We used Bluehost to set an SQL database and a web domain (swimsheets.com) | * We used Bluehost to set an SQL database and a web domain (swimsheets.com) | ||
Line 116: | Line 120: | ||
upload.php: this is where coaches can submit the entries for the meet, once the submit button is hit, the page is directed to swimsheets.com/import.php<br /> | upload.php: this is where coaches can submit the entries for the meet, once the submit button is hit, the page is directed to swimsheets.com/import.php<br /> | ||
− | import.php: uploads the meet entry files into the datatable | + | '''import.php:''' uploads the meet entry files into the datatable <br /> |
− | |||
− | |||
− | updateresult.php: takes in the time that is entered in the app and adds it to the entries datatable, if there is a blank time given for a Swimmer, "No Show" will be entered into the time field<br /> | + | '''getdata.php:''' establishes a connection with the SQL database, displays the entries datatable as an array that can be accessed using Xcode in swift <br /> |
+ | ''' | ||
+ | updateresult.php:''' takes in the time that is entered in the app and adds it to the entries datatable, if there is a blank time given for a Swimmer, "No Show" will be entered into the time field<br /> | ||
− | displaybyevent.php: displays the entries table, sorted by event number and lane number<br /> | + | '''displaybyevent.php:''' displays the entries table, sorted by event number and lane number<br /> |
− | displaybyname.php: displays the entries table, sorted alphabetically by last name<br /> | + | '''displaybyname.php:''' displays the entries table, sorted alphabetically by last name<br /> |
− | displaybyteam.php: displays the entries table, sorted by team<br /> | + | '''displaybyteam.php:''' displays the entries table, sorted by team<br /> |
− | emptydata.php: this php codes empties the entries datatable so that a new meet can be started with a clean database<br /> | + | '''emptydata.php:''' this php codes empties the entries datatable so that a new meet can be started with a clean database<br /> |
− | newmeet.php: creates a button that allows the user to empty the database before beginning a new meet | + | '''newmeet.php:''' creates a button that allows the user to empty the database before beginning a new meet |
==Results== | ==Results== |
Revision as of 07:49, 20 November 2017
Contents
Overview
A common problem at swim meets is the backup that occurs from timers having to record the times for each swim on paper. The times then have to be manually entered in case one of the touchpads in the water does not register the swimmers touch, resulting in a false time. The objective of our project is to create an IPhone app to assist with swim meets. We want timers at swim meets to be able to input the time they recorded for the swimmer, based on the event number, lane number, and heat number, into the app instead of writing it on paper. This will allow the times recorded to go directly into the database instead of having to be manually entered at the conclusion of each swim event.
Here is a link to the weekly log that will contain updates on our progress for the project: https://classes.engineering.wustl.edu/ese205/core/index.php?title=Swim_Sheets_Log
Team Members
Hailey Jenkins
Rebecca Bruce
Objectives
We want the IPhone app’s interface to prompt the user for the event number, heat number, and lane number. The app should then return the swimmer’s name based off the psych sheet for the overall meet. The user can then double check the accuracy of the name and override it if necessary. Once the swim is complete, a time will be entered and stored in an excel spreadsheet that could then be inputted into a swim database at a later time.
The main goals of this app are to:
1. Create a database that takes in the psych sheet and can report the swimmers name.
2. Prompt the user for event number, heat number, and lane number
3. Display data in an organized manner for overall meet results and analysis.
4. The database should take in an input of data, consisting of rosters, events, heat, and lane. These should be imported into the database from a .txt file that can be used by various teams to import into the database.
5. Results will be generated and be viewable from the database for the coaches use. These results can also be exported into a spreadsheet for viewing.
6. The data for each race will be received from inputs from the app, not an external source.
Challenges
Learn how to create a public IP address to update the times.
Learn how to create a database and PHP files.
Learn how to use Apple’s IDE to create the application.
Learn how to import the data from a document.
Learn how to use the iCloud server.
Learn how to override errors in the input process.
Learn how to code in swift.
Learn how to read and access information from the php file with swift .
Learn how to limit the user input accepted in the UITextField .
Learn how to send information from one page of the app to the next .
Learn how to send the time input to the database from swift .
Learn how to embed search in the tableview .
Gantt Chart
Budget
Blue Host: $3.95 per month for 3 months
Draft of App Layout
Design and Solutions
Design Components The Swimsheets app was designed to...
- Allow coaches to fill out a simple Excel XML file
- Have the file be uploaded, and the entries entered into a datatable automatically
- Have an app read the datatable and display the swimmer for each specific event and heat to the corresponding lane on an app
- Allow timers to input the time for each swim
- Have the time data uploaded back into the datable
- Display the results in an organized manner that can be found on the Swimsheets.com website
Interface
- We used Xcode to write the swift app
- Created five pages for the app and a loading screen
- Eight different classes
AppDelegate.swift: auto generated class to make sure app screen loads
ViewController.swift: Page One of SwimSheets App, Input Lane Number. Button "go" segue to PageTwo.
PageTwo.swift: Second page of SwimSheets App with HomeModlel.swift as a protocol. Displays the next input in the php file for the given lane, printing the event name, heat number, team name and the swimmers first and last name. Then asks for a confirmation for the swimmers name "Yes" Button segue to PageThree, "No" Button segue to PageFive.
PageThree.swift: Third page of SwimSheets input time (MM:SS.MsMs). UITextField only allows two digit inputs with the first input being no greater than six to insure valid time. Confirmation for the time "Yes" Button segue to PageFour, "No" Button clears time input by reloading the page.
PageFour.swift: When page is loaded sends time input to updateresult.php. Then Displays dater from PageTwo ( event name, heat number, team name and the swimmers first and last name) or if name of swimmer is changed PageFive ( swimmers first and last name) , and time from page three. Then pick "Next Race" Button segue back to PageTwo to read the next input for the lane number or "Exit" to quit and segue back to ViewController (page one).
PageFive.swift: With HomeModlel.swift as a protocol. Displays all posable swimmer names in table view use search bar to find and select new swimmers name. After name is picked "Go" Button segue to PageThree.
HomeModlel.swift: Connects app to getdata.php. reads file and sends each line of data to LocationModel as a jsonElement that can be read by classes with HomeModlel.swift as a protocol (PageTwo and PageFive).
LocationModel.swift:' Stores all the dater sent from HomeModlel one line at a time as an NSObject that can be called and read.
Server and Database
- We used Bluehost to set an SQL database and a web domain (swimsheets.com)
- Used myphpadmin to set up the data table that has columns consisting of: ID (an auto incremented number), Team, First Name, Last Name, Event Number, Event Name, Heat Number, Lane Number, Time (this value can be null)
- Data is inserted into this table when the coaches go online and download the excel XML file, fill it out, and upload it at swimsheets.com/upload.php based on the instructions listed on swimsheets.com
- Created various php files needed to execute our commands using sql queries:
upload.php: this is where coaches can submit the entries for the meet, once the submit button is hit, the page is directed to swimsheets.com/import.php
import.php: uploads the meet entry files into the datatable
getdata.php: establishes a connection with the SQL database, displays the entries datatable as an array that can be accessed using Xcode in swift
updateresult.php: takes in the time that is entered in the app and adds it to the entries datatable, if there is a blank time given for a Swimmer, "No Show" will be entered into the time field
displaybyevent.php: displays the entries table, sorted by event number and lane number
displaybyname.php: displays the entries table, sorted alphabetically by last name
displaybyteam.php: displays the entries table, sorted by team
emptydata.php: this php codes empties the entries datatable so that a new meet can be started with a clean database
newmeet.php: creates a button that allows the user to empty the database before beginning a new meet
Results
Final App Layout
Demo Poster
Comparison to Objectives
- Database
Objective: Create a database of swim entries that can be updated by the Swimsheets app
Our implementation: Successfully created a database that can take in a meet entries file and insert each entry into a new row of the entries datatable. Additionally, we created an auto incremented ID that is unique to each swim that each swimmer has in order to simplify keeping track of swims as the meet progresses and to streamline the process of finding where the time should be updated after each swim is swam.
- Connection between Database and App
Objective: Our implementation:
- Demo
Objective: Our implementation:
- User Interface
Objective: Our implementation:
- Results Display
Objective: Our Implementation:
Critical Decisions
One of the decisions we made was to simplify the structure of the database we created. Instead of doing multiple tables that are linked together as shown in the ERD, we created one data table called entries and used that to run all the php files and inputs/outputs from the app. The reason for this was that we lost a group member and needed to reassess how to finish the project in a timely manner. Given more time, the structure of the database would mimic that of the ERD, which would allow the app to be used in multiple swim meets more efficiently. The way we did it still allows for the app to be used, but the user must click a clear button on swimsheets.com to clear the data table before a new meet can be run.
Source Code