Week 3: Tracking App
This week I built an app that could help someone track their kitchen waste. Each time someone took out the trash, plastic recycling, paper recycling, or compost they could add that event into the app log. The app would have three main view controllers a data view, a graph view and an action view (Figure 1). The data view would use a table view to list all the data entries with the type of waste that was put out and the time and day. The graph view would show the data in a different way. Each type of data would have a dedicated cell and the bar would grow based on how many total entries were logged for that waste type. Finally the action view is where the user would add a new data point. The user can toggle the waste types on or off depending on what type of data they wanted to log.
From there I designed a data model that made sense to me (Figure 2).
Once I began to build the app, I had some difficulties using the method laid out for us and my data model so I needed to simplify the model to the one shown in Figure 3.
I realize that this is not the best model to use, but I could not figure out how to send the data from the action view to the table views using the original model. I also had trouble figuring out how to send data from the action model to both of the table views so I ended up not fully coding the graph view section. Figure 4 shows my final result.
Because of the difficulties I had along the way, the app became a bit of a mess. I definitely think that now that I understand the process a little more, I would be able to use my original data model to create a cleaner app. The learning curve to understand how the data is transferred from the action view to the table view definitely got in the way of my process a bit and caused me to make changes based on what I understood. Also, the way that the examples were given to us, it seemed like all of the information in the data model needed to be passed through the action view. I am wondering how you could provide some information to the data model using the action view and set some through the table views. Once I better understand how the data is passed between views, I think that I could recreate this app in a more complete way.
To view the code, visit this link.