Exercise (group of 2 to 3 people): Creating a Backend for an App
100 points
(Due. see outline ===GROUPs allowed, 100 points!!!)
UNDER CONSTRUCTION -- MAY CHANGE DO NOT WORK ON UNTIL ASSIGNED IN CLASS
NOTE: read the information on how to use AWS Lambda AND PAY attention to the sample code I gave you there ---which is a START to doing this exercise.
Create a backend systems using AWS Lamda for a mobile Bike Route Android Applicaiton your group will develop. The interface is simple but, should look approximately like the ones below and must function in the ways mentioned. You will use AWS Lambda and DynamoDB in addition to local storage (local only for userID).
NOTE: see course materials for tips and some information on how to code backend ---in addition you will need to read current AWS documentation AND create a AWS account. (IMPORTANT: if you are required to use a credit card to create an account --you MUST purchase a $5 visa gift card and use this for the account -- DO NOT USE a REAL credit card. Mostly what you do should be free but, as you are new users you may accidentally or on purpose play with services that are not free -- THIS IS YOUR RESPONSIBILITY TO MONITOR THIS -- with the prepaid visa card you will be only risking the ammount on the card.)
BACKEND DATABASE
You will need to store in 2 database tables the following.
- Biker Table: userID, firstName, lastName, Date, Login, Password
- Routes Table: routeID, userID, routeName, startLatitude, startLongitude, endLatitude, endLongitude, Date, Used
BACKEND CODE
Your group will need to create the following code -- I have showed ALSO how the applicaiton interface should look and how the backend code is triggered.
- CreateUser: When App starts up the first time the user is prompted to give a Login and Password (where Login is suggested as their email address). This program creates a new entry in the Bikers Table generating a unite userID that is returned to the mobile Bike Route Application which stores the userID locally.
Special Note: For ease of programming we will not be concerned with any changes to the user name and password once set.
NOTE: this interface it gotten to by hitting the Account tab on the App's interface
Last Name
- StoreRoute: The App gives an interface to the user which allows them to enter in a new route to be saved on the backend. The user must type in routeName, startLatitude, StartLongitude, endLatitude, endLongitude and the app sends this along with the current Date and the userID it looks up from its local storage. The backend application recieves this information and creates a new entry in the Routes Table
Special Note: the App's interface for creating a new route is ONLY enabled if the user has previously created a user account and stored the userID locally.
Start Longitude
NOTE: the ABOVE interface is brought up by the user going to the App's Routes tab and hitting New Route button
- GetRoutes: This is called by the App to retrieve from the Backend the 10 most often used (highest Used value) Routes from the Routes Table. These routes are displayed in table where there is one route per row and the row begins with a button called "Go". Every time the Go button is hit it calls the UseRoute backend code passing the corresponding routeID as well as the userID.
NOTE: to trigger this the user selects the ROUTES Tab at the top
Route Name start Latitude start
Longitudeend
Latitudeend
LongitudeUsed
School 1233.33 23.333 1233.9 23.49 110 Long Ride 1233.33 23.333 1233.9 23.49 30 Training Circuit 1233.33 23.333 1233.9 23.5 28 Training Circuit 2 1233.33 23.333 1233.9 23.55 28 Starbucks 1233.33 23.333 1233.9 23.55 19 Safeway 1233.33 23.333 1233.9 23.55 17 Bank 1233.33 23.333 1233.9 23.55 10 Jills house 1233.33 23.333 1233.9 23.55 8 Gym 1233.33 23.333 1233.9 23.55 7
- UseRoute: This is called by the App when the user hits the Go button next to a Route being displayed. The userID and the corresponding routeID is passed. This backend code updates the Routes Table by increasing the Used value for the Route with the passed userID and routeID in the Routes database table.
the App should simply display the following (say if route Safeway is chosen)
The following Route will begin and this will be the 18th time you are traveling this route Safeway Start:
1233.33, 23.333End:
1233.9, 23.55
>>>> this is how it will appear in app (approximately--- you can use Toast or any temporary display you wish but, make it long enough to read it)
Deliverables
Demonstrate in class by PRESENTING to class what your group did and show the app working. ALSO, create a simple YouTube video demonstrating the app and going over the code and showing the database table after the mobile App user has created new Routes as well as a Biker entry. Upload a zip of the code for BOTH app and backend code to Blackboard->Exercises->Exercise Backup
Evaluation Rubric