Saturday 21 May 2016

1.8 Forth Iteration

For the forth iteration, I had to:


  1. Successfully preform a swap
Even though for this iteration only had one task, there were many other elements and complex components that make this iteration challenging.

Risks: This iteration was heavily dependent on REST calls such as GET, POST and PUT. Therefore the main risks with this are HTTP errors.

As mentioned in the third iteration, the swap will have to be preformed in a way that maintains and follows the Irish data privacy act. Therefore, all shifts in the swap table that are displayed to the user must be anonymous. Therefore, when a swap is initiated, both users in the swap can only see data related to the shifts involved in the process. The user data associated with the shift is hidden from all the users in order to protect each user's personal data.

The general flow of the swap process involved multiple REST calls to my database. What I found the most challenging was that the REST PUT calls sometimes would not be work successfully initially for a multitude of reasons. In my android logger, I could see that the response from my request would be a HTTP error. The three HTTP errors I encountered were, 400, 405 and 500. After researching what the errors meant, I was eventually able to successfully update my database with the PUT request. 

One of the things I ascertained while completing this iteration was the reason why callback functions are created. Multiple times my app would crash with null reference exception due to the fact the my REST call had not yet retrieved the relevant data from the data base however, my code would continue to execute regardless leading to the errors and crashes that I experienced. Therefore, I have made it a priority to look into how callback functions operation in android and try to utilize them in my application if possible.

Overall, I was able to successfully complete a basic swap operation that I set out to accomplish for this iteration. However there is still quite a bit of logic that I wish to include in the swap process that I will complete in the next iteration. It must be noted that this iteration contained the main core functionality of my project. All other elements will fit around this core functionality. 


Sequence diagram of swap


References: http://www.irishstatutebook.ie/eli/1988/act/25/section/2/enacted/en/html#sec2 

No comments:

Post a Comment