Sportsmans Application: Difference between revisions

From CS486wiki
Jump to navigationJump to search
Content deleted Content added
Yigit (talk | contribs)
Yigit (talk | contribs)
 
(30 intermediate revisions by the same user not shown)
Line 4: Line 4:


===Team Members===
===Team Members===
*Ozan Olgu Adiguzel
*Ozan Olgu Adiguzel (Android)
*Deniz Demir
*Deniz Demir (Website, database)
*Umut Can Genlik
*Umut Can Genlik (iOS)
*Yigit Can Karatas
*Yigit Can Karatas (Website, database)


==Status of The Project When We Started==
==Status of The Project When We Started==
Line 16: Line 16:
===Website===
===Website===
Here is a list of most significant changes and refinements we made:
Here is a list of most significant changes and refinements we made:
* Creating the database: We did reverse engineering to obtain the tables, fields and relations of the database that was working along with the website before it was lost. We use the existing PHP codes to do so. That was the first thing we did since we wouldn't be able to do the rest without a database. The mistakes we made in definitions and relations in the table caused so much time loss. Although we had a working database after the first month of the project, we have been doing changes and corrections for the whole time.
* Creating the database: We did reverse engineering to obtain the tables, fields and relations of the database that was working along with the website before it was lost. We used the existing PHP codes to do so. That was the first thing we did since we wouldn't be able to do the rest without a database. The mistakes we made in definitions and relations of tables caused so much time loss. Although we had a working database after the first month of the project, we have been doing changes and corrections on it for the whole time.
* User information handling: We started to encrypt our users' passwords. We use [http://en.wikipedia.org/wiki/MD5 md5()] function to encrypt passwords. This function calculates the MD5 hash of a string, and returns that hash. After we did encryption part, we need to "forgot password" page to allow users changing their password. We added reminder question, and reminder answer attributes into our "user_info" table in the database. Question is a random string that will be created by user. The user will assign a question, and its answer for him/herself while s/he are registering. The answer is also stored as encrypted into database. Therefore, nobody, even the database administrator, have ever known the users' password, and answer.
* User information handling: We started to encrypt our users' passwords. We use [http://en.wikipedia.org/wiki/MD5 md5()] function to encrypt passwords. This function calculates the MD5 hash of a string, and returns that hash. After we did encryption part, we need to "forgot password" page to allow users changing their password. We added reminder question, and reminder answer attributes into our "user_info" table in the database. Question is a random string that will be created by user. The user will assign a question, and its answer for him/herself while s/he are registering. The answer is also stored as encrypted into database. Therefore, nobody, even the database administrator, have ever known the users' password, and answer.
* New forum: We have installed a new version of forum, since we couldn't figure out how it was supposed to work, we installed it again according to the demands of Mr. Frisbie. The external software we used can be found [http://www.phorum.org/ here].
* New forum: We have installed a new version of forum, since we couldn't figure out how it was supposed to work, we installed it again according to the demands of Mr. Frisbie. The external software we used can be found [http://www.phorum.org/ here].
* Search parts for buddies and communities: We had incomplete search pages for buddies and communities. We created those. Buddies was added into database by administrator. We created an interface in the search page, so that users can easily find and add their "buddies".
* Search parts for buddies and communities: We had incomplete search pages for buddies and communities. We created those. Buddies was added into database by administrator. We created an interface in the search page, so that users can easily find and add their "buddies".
* Delete options: We added delete option for hunts, trophies, communities, and buddies. So, unwanted hunts, trophies, communities, and buddies can be easily removed by users.
* Delete options: We added delete option for hunts, trophies, communities, and buddies. So, unwanted hunts, trophies, communities, and buddies can be easily removed by users.
* New locked and backpack pages: As Mr. Frisbie wanted so, we separated the locker and backpack pages.
* New scouting types: Droppings and animals were added to scouting section of the website.
* Fixed bugs: A brief list of corrected bugs would be:
** Being able to create a community without logging in.
**
**
* Cosmetic refinements: We have changed the logo, some icons, colors and styles to make the website more user friendly.
* Cosmetic refinements: We have changed the logo, some icons, colors and styles to make the website more user friendly.


===Android Application===
===Android Application===

The purpose of the android project:

*The main purpose is to use application during hunts to make it effective application for hunters.Android application of sportsman application is going to be used during hunts to record hunts properties with connection to internet to send data to server or without connection to record data in embedded database in android phone and send all hunts information when user get connection back. Application will have almost all functionality of website except , some functionality which are not going to be useful to use on phone application.

*There is going to be two part to use application with internet connection and without internet connection.

*In main page of application, there is user log in part and button to use application without connection which is journal.

Android application with internet connection part:
*After log in, application has to get all information from server about user.
*There is going to be five main button to use functionality.One of them is to start new hunt and save all information needed.And send it to server when you tried to log out or with specific button.If connection is lost during hunt and user is still on hunt then application has to hold all information in embedded database of phone and send them to server when user get connection back.There is going to be add a sighting button to add sighting to hunt. Also user should be able to take picture with their phone about this hunt and send it to server during hunt.In start new hunt activity, user can add new stand area,hunting area, weapons,backpack etc.
*Other functionality after user log in is that user can see previous hunts on their android phone and make changes on them then application can update this hunts data on server by sending new information which are changed on phone.
*The other button is going to be on this page is start scout button. Start scout button is going to open another activity view which will have six different kind of scout types to start the specific kind of scout.User would have functionality to add scout and application would send new scout information to server.
*The other button is going to be on this page is continue previous hunts button to see last hunt information and continue this hunt.
*The other button is userinfo button which user can see their info.
*Log out button is used to log out from application and send all new information which are saved in embedded database to server and delete previous hunt data from android phone database except data which are used like hunting area, stand location,backpack,weapons,etc in connectionless part of application.Or application could has button to send all data to server.
Android application without connection part:
*This part is almost same with connection part but it doesn't have connection to get data and see previous hunts because application is not holding previous data which are gotten from server.It would only have last hunt data which is previous hunt to make sure that user will have it if connection is lost while user is continuing hunt.
*User can start a hunt and save data into database in android phone and send data to server when connection is gotten.
---- In the above part , i explain how general functionality will be in application to make it more effective.

==Progress==

Android Application , I started with journal part which is working without connection
*Senior1Activity.java is application main activity and layout file is main.xml file, it has log in part and journal part which is working without connection.
*Journal.java activity class has 4 button start new button is taking activity to startnewhunt.java activity which is working one.And it gets data from database which are in android.It could save data to phone but after changing in database,I change this part because of database design is change but it only need save part to insert data which are getting from view part and other database to put in hunt table in journal.db in sqlite database in phone.In start new hunt, there is add friend and add packback part,they use NewHuntParcable.java to transfer data between different activity AddFriend.java and AddBackPack.java to startnewhunt.java.
*There is startnewscout button is starting scouting.java activity and there is scout type names on view as button but they are not functional yet.
*There is databases package which has all databases classes and create hunter journal.db and all tables which journal has.And this classes deal with inserting data which are getting from server to embedded sqlite3 database in phone.Database and tables codes are in databases package classes.There are different class for each table in journal database.
*Connection part login button send request to server to give authentication to user and it send request to senior/android/script.php to get authentication. I wrote script.php to check login credentials.
*In same folder of server which is android, there are 25 php script pages for each table which I wrote to get all users data from server to add in android application.To get each table there is one php file on server side and one class in application package which is database class to parse data and insert into database.There is also jsonfunction.php file which is used to parse data which is getting from database in server to json string in server. It make easy to use parse data getting from server to android application.
*Our application get all the user data from server and put into database on phone. Data getting and send post request are made by HttpRequest.java class.But there is only userinfo button on main activity in connection part which is using data which are got from server.

==Future Parts==
All items in those lists must be discussed with Mr. Frisbie and Prof. Steflik before implementation.
===Android Application===
There is lots of lack of things on application view because of not enough time.Even if I get all data we need about user and wrote php script for this, I couldn't use data any where on application and it is going to be easy for next team members to just create this part in connection part.
*There is user info part, that I used data which are getting from server.They have to use databases classes in database package to use data which are getting and write insertion part to send new data to server.They have to send new data as I send post request and parse it on php script part and insert it to database in server.
*As I said application view is lack but it is more easy to show previous hunt list or add data to these hunt by using classes and progress which i took. They don't have to get backpack,locker,zip code,hunting area,standlocation or other things again.Just they have to put them in view to use.
*They have to figure out how to take photo and send to server and add it to start new hunt part for both connection and connectionless part.How to get location data for android application to put in start new hunt part which is working with internet connection.
*Use HttpRequest.java class to get data from server and all script send json encoded string so it is easy to parse in java.New team has to use json array and json data to parse data.

==Screen View==

*Login Screen

[[File:login1.png]]

[[File:asynctask.png]]

*Journal Screen
[[File:journal1.png]]

*Start New Hunt Screen
[[File:startnewhunt1.png]]

[[File:standlocation1.png]]

*Add Backpack Screen
[[File:addbackpack1.png]]

*Scouting Screen

[[File:scouting1.png]]




===iOS Application===
===iOS Application===
Main purpose of the Iphone App is connect to Sportsmans Website fetch data from Sportmans'database and put fetched data into Iphone's local database so user can interact with database in woods while user does not have internet connection.User can keep information about hunts like website. When user have internet connection again Data that has been edited on Iphone Local database updates both itself and Sportman's Database.


*Login Screen: The user logs in using username and password he gave to the website. The users email password combination’s existence is checked in this page.
==Incomplete Parts==
Journal Button Allows user directly to go main screen of app so without internet connection user add hunt information.


[[File:HunterLogin.png]]
* Back Button problem : This problem one of the biggest problem that our website has.

* Blog
*Connection Established Screen: If connection is successful in login screen view is switched to this screen, all tables that is necessary for Iphone's local database is started fetch from Sportman's Database if fetching is complete Journal Button Appears in order to start to enter hunt information.
* Search Buddy --> Don't show "Add buddy" link if that user is already added as a buddy.

[[File:HunterFetchData.png]]

*Journal Screen: Includes Start Hunt - Start Scouting Session - View Previous Hunt - Continue Last Hunt buttons. Each button goes to different Screen when it touched up inside.
[[File:Journal.png]]

*Start Hunt: Time, Date and Coordinates is filled automatically. Stand location, Hunting Area,Weapon Used, Backpack, Phase of rut, Comments and End Time of Hunt is entered by user. User can add either sighting or save current hunt.

[[File:StartHunt.png ]]

[[File:StandLocation.png ]]


*Start Scouting Session: Scrape-Rub-Bed-Track-Animal-Droppings

[[File:ScoutingSession.png]]

*View Previous Hunts: A table view that list previous saved hunts of user.

*Continue Last Hunt: User can continue to edit last saved hunt.

'''*FUTURE WORK'''
Downloaded data needs to be parsed by JSON and saved to local database in order to view data in local database
Saved data need to be uploaded to server when internet connection is established.

==Incomplete Parts==
All items in those lists must be discussed with Mr. Frisbie and Prof. Steflik before implementation.
===Website===
* Back button problem : This problem one of the biggest problem that our website has. Each time an action is taken, you end up in the home page.
* Blog: We have received a new requirement 3 weeks before the due date. So we didn't have time to create a fully functional blog section to the website. Blog section will be controlled by the administrator. Admin will authorize users to write blogs. Those blogs will be accessible by everyone(users and non-users).
* Search Buddy: Don't show "Add buddy" link if that user is already added as a buddy.
* Trophy photos for a hunt. For now, all trophies are shown. Trophies belonging to that hunt should be shown.
* Trophy photos for a hunt. For now, all trophies are shown. Trophies belonging to that hunt should be shown.
* Message complication in forgot password part.
* Message complication in forgot password part.
* Bugs in setting up a backpack.
* Forum account: In its current form, a separate account is needed for the forum. Forum account should be created as a new user signs up yo Hunters Journal, all fields required by Phorum should be obtained from Hunter's Journals registration page. When a user wants to go to the forum section, Phorum should not do authentication again.

Latest revision as of 02:17, 18 May 2012

Introduction

General Explanation

Sportsmans Application(Hunter's Journal) is a social network for hunters, fisherman and all the rest of "Sportsman". Project consists of a website and mobile applications. Project is sponsored by Mr. Rick Frisbie of Frizco Development. We took the project over on Fall 2011 to contribute last years progress. It is decided to be two semesters long. Our main tasks were fixing the database, implementing new requirements for the website, creating Android and iOS applications.

Team Members

  • Ozan Olgu Adiguzel (Android)
  • Deniz Demir (Website, database)
  • Umut Can Genlik (iOS)
  • Yigit Can Karatas (Website, database)

Status of The Project When We Started

After 2010-2011, first version of the website was up and running until the server it is running on was crashed. Database was gone. The only thing left was PHP codes of the website and objects used in style. Mobile application development was started from scratch. We did not receive any code or documentation(except for wiki) about the project. What made this project challenging was to understand what was done last year. We have received a very limited amout of documentation. In order to contribute, initially we had to understand how the website was working. Eventually we started with approximately 80 PHP files , an imported forum software, a sytle sheet and the wiki.

Progress We Made

Website

Here is a list of most significant changes and refinements we made:

  • Creating the database: We did reverse engineering to obtain the tables, fields and relations of the database that was working along with the website before it was lost. We used the existing PHP codes to do so. That was the first thing we did since we wouldn't be able to do the rest without a database. The mistakes we made in definitions and relations of tables caused so much time loss. Although we had a working database after the first month of the project, we have been doing changes and corrections on it for the whole time.
  • User information handling: We started to encrypt our users' passwords. We use md5() function to encrypt passwords. This function calculates the MD5 hash of a string, and returns that hash. After we did encryption part, we need to "forgot password" page to allow users changing their password. We added reminder question, and reminder answer attributes into our "user_info" table in the database. Question is a random string that will be created by user. The user will assign a question, and its answer for him/herself while s/he are registering. The answer is also stored as encrypted into database. Therefore, nobody, even the database administrator, have ever known the users' password, and answer.
  • New forum: We have installed a new version of forum, since we couldn't figure out how it was supposed to work, we installed it again according to the demands of Mr. Frisbie. The external software we used can be found here.
  • Search parts for buddies and communities: We had incomplete search pages for buddies and communities. We created those. Buddies was added into database by administrator. We created an interface in the search page, so that users can easily find and add their "buddies".
  • Delete options: We added delete option for hunts, trophies, communities, and buddies. So, unwanted hunts, trophies, communities, and buddies can be easily removed by users.
  • New locked and backpack pages: As Mr. Frisbie wanted so, we separated the locker and backpack pages.
  • New scouting types: Droppings and animals were added to scouting section of the website.
  • Fixed bugs: A brief list of corrected bugs would be:
    • Being able to create a community without logging in.
  • Cosmetic refinements: We have changed the logo, some icons, colors and styles to make the website more user friendly.

Android Application

The purpose of the android project:

  • The main purpose is to use application during hunts to make it effective application for hunters.Android application of sportsman application is going to be used during hunts to record hunts properties with connection to internet to send data to server or without connection to record data in embedded database in android phone and send all hunts information when user get connection back. Application will have almost all functionality of website except , some functionality which are not going to be useful to use on phone application.
  • There is going to be two part to use application with internet connection and without internet connection.
  • In main page of application, there is user log in part and button to use application without connection which is journal.

Android application with internet connection part:

  • After log in, application has to get all information from server about user.
  • There is going to be five main button to use functionality.One of them is to start new hunt and save all information needed.And send it to server when you tried to log out or with specific button.If connection is lost during hunt and user is still on hunt then application has to hold all information in embedded database of phone and send them to server when user get connection back.There is going to be add a sighting button to add sighting to hunt. Also user should be able to take picture with their phone about this hunt and send it to server during hunt.In start new hunt activity, user can add new stand area,hunting area, weapons,backpack etc.
  • Other functionality after user log in is that user can see previous hunts on their android phone and make changes on them then application can update this hunts data on server by sending new information which are changed on phone.
  • The other button is going to be on this page is start scout button. Start scout button is going to open another activity view which will have six different kind of scout types to start the specific kind of scout.User would have functionality to add scout and application would send new scout information to server.
  • The other button is going to be on this page is continue previous hunts button to see last hunt information and continue this hunt.
  • The other button is userinfo button which user can see their info.
  • Log out button is used to log out from application and send all new information which are saved in embedded database to server and delete previous hunt data from android phone database except data which are used like hunting area, stand location,backpack,weapons,etc in connectionless part of application.Or application could has button to send all data to server.

Android application without connection part:

  • This part is almost same with connection part but it doesn't have connection to get data and see previous hunts because application is not holding previous data which are gotten from server.It would only have last hunt data which is previous hunt to make sure that user will have it if connection is lost while user is continuing hunt.
  • User can start a hunt and save data into database in android phone and send data to server when connection is gotten.

In the above part , i explain how general functionality will be in application to make it more effective.

Progress

Android Application , I started with journal part which is working without connection

  • Senior1Activity.java is application main activity and layout file is main.xml file, it has log in part and journal part which is working without connection.
  • Journal.java activity class has 4 button start new button is taking activity to startnewhunt.java activity which is working one.And it gets data from database which are in android.It could save data to phone but after changing in database,I change this part because of database design is change but it only need save part to insert data which are getting from view part and other database to put in hunt table in journal.db in sqlite database in phone.In start new hunt, there is add friend and add packback part,they use NewHuntParcable.java to transfer data between different activity AddFriend.java and AddBackPack.java to startnewhunt.java.
  • There is startnewscout button is starting scouting.java activity and there is scout type names on view as button but they are not functional yet.
  • There is databases package which has all databases classes and create hunter journal.db and all tables which journal has.And this classes deal with inserting data which are getting from server to embedded sqlite3 database in phone.Database and tables codes are in databases package classes.There are different class for each table in journal database.
  • Connection part login button send request to server to give authentication to user and it send request to senior/android/script.php to get authentication. I wrote script.php to check login credentials.
  • In same folder of server which is android, there are 25 php script pages for each table which I wrote to get all users data from server to add in android application.To get each table there is one php file on server side and one class in application package which is database class to parse data and insert into database.There is also jsonfunction.php file which is used to parse data which is getting from database in server to json string in server. It make easy to use parse data getting from server to android application.
  • Our application get all the user data from server and put into database on phone. Data getting and send post request are made by HttpRequest.java class.But there is only userinfo button on main activity in connection part which is using data which are got from server.

Future Parts

All items in those lists must be discussed with Mr. Frisbie and Prof. Steflik before implementation.

Android Application

There is lots of lack of things on application view because of not enough time.Even if I get all data we need about user and wrote php script for this, I couldn't use data any where on application and it is going to be easy for next team members to just create this part in connection part.

  • There is user info part, that I used data which are getting from server.They have to use databases classes in database package to use data which are getting and write insertion part to send new data to server.They have to send new data as I send post request and parse it on php script part and insert it to database in server.
  • As I said application view is lack but it is more easy to show previous hunt list or add data to these hunt by using classes and progress which i took. They don't have to get backpack,locker,zip code,hunting area,standlocation or other things again.Just they have to put them in view to use.
  • They have to figure out how to take photo and send to server and add it to start new hunt part for both connection and connectionless part.How to get location data for android application to put in start new hunt part which is working with internet connection.
  • Use HttpRequest.java class to get data from server and all script send json encoded string so it is easy to parse in java.New team has to use json array and json data to parse data.

Screen View

  • Login Screen

  • Journal Screen

  • Start New Hunt Screen

  • Add Backpack Screen

  • Scouting Screen



iOS Application

Main purpose of the Iphone App is connect to Sportsmans Website fetch data from Sportmans'database and put fetched data into Iphone's local database so user can interact with database in woods while user does not have internet connection.User can keep information about hunts like website. When user have internet connection again Data that has been edited on Iphone Local database updates both itself and Sportman's Database.

  • Login Screen: The user logs in using username and password he gave to the website. The users email password combination’s existence is checked in this page.

Journal Button Allows user directly to go main screen of app so without internet connection user add hunt information.

  • Connection Established Screen: If connection is successful in login screen view is switched to this screen, all tables that is necessary for Iphone's local database is started fetch from Sportman's Database if fetching is complete Journal Button Appears in order to start to enter hunt information.

  • Journal Screen: Includes Start Hunt - Start Scouting Session - View Previous Hunt - Continue Last Hunt buttons. Each button goes to different Screen when it touched up inside.

  • Start Hunt: Time, Date and Coordinates is filled automatically. Stand location, Hunting Area,Weapon Used, Backpack, Phase of rut, Comments and End Time of Hunt is entered by user. User can add either sighting or save current hunt.


  • Start Scouting Session: Scrape-Rub-Bed-Track-Animal-Droppings

  • View Previous Hunts: A table view that list previous saved hunts of user.
  • Continue Last Hunt: User can continue to edit last saved hunt.

*FUTURE WORK Downloaded data needs to be parsed by JSON and saved to local database in order to view data in local database Saved data need to be uploaded to server when internet connection is established.

Incomplete Parts

All items in those lists must be discussed with Mr. Frisbie and Prof. Steflik before implementation.

Website

  • Back button problem : This problem one of the biggest problem that our website has. Each time an action is taken, you end up in the home page.
  • Blog: We have received a new requirement 3 weeks before the due date. So we didn't have time to create a fully functional blog section to the website. Blog section will be controlled by the administrator. Admin will authorize users to write blogs. Those blogs will be accessible by everyone(users and non-users).
  • Search Buddy: Don't show "Add buddy" link if that user is already added as a buddy.
  • Trophy photos for a hunt. For now, all trophies are shown. Trophies belonging to that hunt should be shown.
  • Message complication in forgot password part.
  • Bugs in setting up a backpack.
  • Forum account: In its current form, a separate account is needed for the forum. Forum account should be created as a new user signs up yo Hunters Journal, all fields required by Phorum should be obtained from Hunter's Journals registration page. When a user wants to go to the forum section, Phorum should not do authentication again.