Monday (22/04/2018).
For this week, and the week following, I opted not to create a sprint board, due to spending large amounts of time bug fixing and writing the report. Therefore, it would be hard to estimate tasks, when the bugs would be largely unknown.
Project Report.
On Monday, I read through the project report document, and I made notes in my notebook. I then made notes on my document. This ensured that when I got round to writing my report I would be able to refer to these notes.
Library Manager Unit Tests.
After this, I started working on the library manager unit tests. I had previously written some unit tests, however I decided that instead of unit testing particular pages, I would unit tests the different managers. This would make it easier to see what had been united tested and what hadn’t. I added some test libraries, and created a table and dropped the table in the TestInitialize and TestCleanup method. For the library manager I tested that all the libraries were returned, and I tested that when given an ID a particular library was returned.
GoodreadsId to BookId.
When unit testing my code I realised that there was two duplicate methods. These duplicate methods were: GetBookById() and GetBookByGoodreadsId() and they did the exact same thing but they took in different parameters. The reason both methods existed was for the loan page I needed GetBookById() as it didn’t have a GoodreadsId. I fixed this by changing the BookId to the GoodreadsId in the loan table. However this resulted in the notification page not showing the right book, due to it finding the book based on the BookId instead of the GoodreadsId. I fixed this by going through all the references and changing the BookId to GoodreadsId where applicable to ensure that the right book was returned.
Tuesday (23/04/2018)
Added success message on notifications page.
I then added the success message on the notification page, currently when a user was successfully renewing a page, no user message was shown. A message only appeared when it was unsuccessful. I decided to add a success message that would be shown when a renewal was successful. This would provide more feedback to the user.
I also fixed a bug on the notification page where it wasn’t automatically updating the page. For this I called setupPage() which would initialise the components again so that the books would be updated, e.g. if a user clicked ‘pickup from library’, the book would now show in the list of current loans, instead of in the books currently awaiting pickup.
Unit testing.
I then continued unit testing my code. Previously, I had added a SearchPageTests(), however, I decided to change this to a BookManager() tests. For the unit page tests, I created a separate model that didn’t have a primary key. I created unit tests for all the managers these included:
- Book Manager Manager tests.
- Book Quotes Manager tests.
- Library Manager tests.
- Book Tags Manager Tests.
- Loan Manager Tests.
- Tags Manager Tests.
- Review Manager Tests.
- User Manager Tests.
I tested all the methods in the managers, to ensure that the correct information was returned, and the correct number of rows were returned by using Assert.IsTrue() or Assert.IsFalse() if they were not equal. For the random quote tests, I decided to ensure that a quote wasn’t returned by using Assert.IsNotNull() as there was no way of testing randomness.
For the update methods I used an Assert.IsNotEqual() to ensure that one value had been changed in the update, and for the insert method I used an Assert.IsNotEqual() to ensure that the original number were not equal to the new number, as they should be different when a new user/ review/ loan was added. However, I was unable to test the ReviewManager() as when I tested it returned the count of reviews, but all the values were null.
Wednesday (25/04/2019).
View Model.
On Wednesday, I found a couple of videos on MVVM (model-view-view model) which is an architectural pattern similar to MVC (model-view-controller) which I had previously used. The view would display information, then the view model would show the view what to display and the model would contain the business logic data objects. I could then use data binding on my view model to show the correct information. I found that using a view model would help structure my code better and make it easiesr to read.
I watched the following videos:
I then used the basis of this videos to create a view model to my pages. I created a view model for the book information, edit account details, the home page and the splash screen. While there were other pages, the main aim was to show that I was making use of the MVVM architectural pattern, however I would ideally like to have a view model for the other pages.
Whilst, due to the time constraints, I was unable to use MVVM to the best of my ability, I was able to implement it in my pages and demonstrate a use and understanding of the technology.
Thursday (25/04/2018).
Carousel View.
One of the biggest outstanding challenges in terms of implementation of the project, was to work on the home page and to implement a carousel view. Currently, the home page was empty and only contained the top bar, bottom navigation bar and a randomly generated quote. The original designs showed that there would be a carousel showing the highest rated books that were available to request on loan.
I had previously investigated the carousel view in a previous sprint. However, at the time there were more important things that needed to be developed that took precedence. As part of this work I investigated other nuget packages that could provide a carousel package.
During my research I came across this nuget package [1] whilst this provided me with the functionality I wanted, I was unable to add other layouts (such as the bottom navigation bar) to my page, meaning that it wouldn’t inherit the default layout of the project. So, once again I had to search for another solution. I found, another nuget package [2], which once provided me with a carousel view and there were several examples of different implementations. However, since I was implementing a carousel view it seemed to make more sense, to use that implementation for the basis of my carousel view.
I also wrote a method to get the highest rating books that were currently displayed, and the top five of these would display in a carousel view. The current implementation only included the image of the book, whilst I would like to show more information, this seemed suitable due to time constraints.
Friday (26/04/2018).
Bug fixing.
On Friday, I spent a lot of time bug fixing. One of the bugs that I fixed was that when editing your account details, it would show ‘library card already registered’ if you changed the library card number and then changed it back to the original number. To fix this I would need to add a string of originalLibraryCardNumber and then add a check so that if originalLibraryCardNumber did match the entered text it wouldn’t show the message.
MMP Documents.
I then read the MMP documents for the bibliography, project report and technical information, the additional guidance for the project report and some raw information on BlackBoard. This would be relevant for when I was starting to write my report, I also downloaded the template from Blackboard so that I could start writing the report.
Reading Reports.
Additionally, in order to help me when writing my report, I read through some of the example reports and Blackboard and made some notes. I would then be able to refer to these notes when writing my final report.

