Week Thirteen

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.

Week Twelve

Monday (15/04/2018).
Renewal Process.

On Monday, I finished working on the renewal process. Whilst this was mostly complete there was still a couple of outstanding tasks. One of these included ensuring that when ‘renews’ were requested it would check to see if anyone else had requested that book, and if they had it would either display an unable to renew message or it renew the book automatically. If the book was renewed automatically, the existing loan in the database would be updated to include the new dates.

I also added a returned book status to the status table in the database. This would be updated when a user clicked on the ‘return’ button on the notifications page. This would set the loan status to returned, and would then check to see if any other user had requested that book, and if so an email would be sent saying that book was available.

There was also a number of bugs associated with the renewing process. One of these included the renew button when the bug wasn’t out on loan by the user. This was because when I was checking to see if the book was out on loan, it wasn’t checking to see if the status was 2 (i.e. on loan by user), so it was showing books that had either been returned or requested by the user. And, another was that the unable to renew message was always showing, although this was simply solved by changing the location of a LINQ .exists statement.

Edit account details.

After this I started working on the edit account details. I had previously set up this page last week, however I decided to leave it until the renewal process was done. In this page you would be able to view your account details e.g. your email, library and library card number and change that information. The page looked similar to the ‘Create account page’. However, unlike that page, a database call was initiated to get information about the user from the database and display it in the inputs.

Similarly to the create account page, the fields on this page were editable and validation to ensure all the inputs were valid. However, one problem I had was that you couldn’t edit the library card number. This was because it was a primary key. However, I would need to edit this just in case a user lost their card and got a new one. To combat this problem I added a userId to the user table, which would act as a primary key instead of the library card number. This would allow me to change the library card number. As part of these changes, I changed the foreign keys in the loan and review table to UserId, and had to make various changes in the code, so that all references to library card number were updated. I then had to update my code to ensure that it was still working.

I then needed to make sure that once the details had been changed, it redirected to the previous page with a ‘Account details edited successfully’ message. I decided that the easiest way to do this would be to store the name of the previous page using: App.Current.Properties[“currentpage”] = “Notifications”; then on the edit account details page I could create an if statement which would work out what page it would need to redirect to. I also decided that for any pages with a back button (e.g. the favourites page and the view book information page), a user shouldn’t be able to see the overflow menu and should therefore not be able to go to the edit account details page.

Tuesday (16/04/2018)
Overflow menu/ edit navigation page.

On Tuesday, I finished work on the edit navigation page. One bug that I was having was that when a user clicked on the overflow icon at the top of the page, it was showing ‘edit account details’ twice, instead of once. For this bug I spent a lot of time reverse engineering the code, and trying to find out what line of code was causing the error. It later turned out that in the Notifications() method it was calling the InitializeMethod() method, which would add the overflow menu. However, this method was also calling the SetupPage() method which also called the InitializeMethod(), and thus showed the menu twice on the page. Once, this was removed from the SetupPage() menu this bug was fixed.

Week Eleven

Monday (08/04/2018)
Update Project.

On Monday, I decided to move the models and managers to a separate project. This was because when creating the emails, I realised that I would need to add a call from the email process to update the status once the email was sent. (However, I later decided to set the call to the email process to an asynchronous command and then upon completion update the status in the main project).

The models and managers currently lived in the library system project. However on the email process project, I wanted to call the methods from the managers project. However, one problem with this was that it introduced a circular dependency, as both the LibrarySystem project was referencing the email project and vice versa. Therefore, it seemed like a good idea to separate out the different elements of the project to avoid circular dependencies. This would also ensure that the unit tests could access the model and managers without accessing the main app.

Tuesday (09/04/2018)
Update Search Page.

On Tuesday, I started working on the search page, the ‘Renew/ Request’ buttons would need to be updated because at the minute they were hard coded. These buttons would need to show ‘Renew’ if the user had the book on loan and ‘Request’ if they hadn’t.  I firstly added a book action to the book model which would be either set to ‘Request/ Renew’. In order to get the book action, I would need to create a method, which calculated if the current user had a loan for the book. Then if a loan exists ‘Renew’ would show else ‘Request’ would show.

In addition to this, I needed to make sure that the same buttons appeared on the more information page, as you could request/ renew from the book information page as well.

Unit tests.

After this, I decided to re-add the unit tests. When moving the managers and models to a separate project, I temporarily removed the unit tests, until I had time to go back and fix them. I firstly needed to add a reference to the managers project in the unit tests, so I could access the methods that I was testing.

I re-added and fixed the unit tests for the search page, and added a few new tests. Unfortunately, one problem I found was that in my unit tests I was creating an instance of the Search page, however on the search page I was using:  Application.Current.Properties.ContainsKey(“id”) and on the unit test this just threw an error. This, meant I was had to remove the tests related to the page such as testing that the drop downs returned the right number of items. I decided that in my unit tests the focus would be to test the methods in the manager. This makes sense since the UI tests will be testing the views.

I also added new unit tests to test other instances of the search, e.g. test that it’s returning the right search result if there are no filters/ sorting specified, and to test that the current books were returned with the available filter.

Wednesday (10/04/2018)
Renewal Process.

On Wednesday, I started working on the renewal process. I had previously worked on the requested process, where an e-mail was sent when a user clicked on the request button. This email was sent to bookhublibraries@gmail.com and informed the librarians that a book had been requested. After this, the status of the book would be updated to ‘at requested library’, which would trigger the user and send an email to the user informing them that a book they’ve requested is in the library.

For the user e-mail I used a method to get the user details, which would find the email to be sent to, and the from address was bookhublibraries@gmail.com. This e-mail would show the information about the book that was requested e.g. the title and the authors, and it would include the information as to the current location which would be the user’s current library.

My original intention was to add a button to the email, so that when a librarian had processed that requested and that book was in the requested library they would click on a button that would update the status and send an e-mail to the user. However, after researching the problem, I couldn’t find a work-around, and so wrote the code to do it automatically, as there were other tasks that needed to be completed.

Whilst working on this I added a couple of new statuses that would be in the status lookup. These were: requested, and at requested library. Once a user requested a library, their loan would have the status of ‘requested’, which would trigger the email to the librarian. The status of ‘at requested library’ would be set upon receiving the librarian receiving the request email

Thursday (11/04/2018).
Notifications page.

On Thursday I started working on the notifications page, the first thing I needed to do was to setup the notification page. This page would be accessible from the bottom navigation bar by pressing the bell icon. This page would show a list of requests a user had, and when a book was picked up by the user from the library it would show a list of books a currently had on loan.

For this, I needed to perform several calls to the database, this included a method to get the loan requests for the user. This would look for all loans for a particular user that had a status of ‘requested’ and return the information. This information would vary slightly differently from the search page, and would show the name with a click here upon pickup button.

Additionally I needed to add another method that shows the books that are currently on loan for the user. This would show the number of books that had a status of on-loan, and it should the title of the book, and the number of days it was available on loan.

In addition, to this I needed to add a method so that if there were no books available, it would show a message saying either ‘no books available to pickup’ or ‘no books currently on loan’. This would ensure that if there no books, the user wasn’t greeted with an empty page.

Friday (12/04/2018).
Panopto Recordings.

On Friday, I watched the Panopto recording of the final lecture. While, I had attended the lectures, I always find it useful to watch them again and take notes in case I missed anything in the lecture. I watched the final lecture which gives details about the technical informtation and the project report, which I could refer back to when writing the report.

Fixing Bugs.

After this, I spent a bit of time bug fixing. One of the bugs I found was that the selected colour of the items on the search page were bright orange. I fixed this by adding SelectionMode=”None” to my list view. Another solution I came across was to add IsEnabled = “False” [2] however this removed all the interactivity in that list view. I also changed the colour of the checkboxes on the create account page to blue to reflect the colour scheme of the project.

Week Ten

Monday (01/04/2018)
Recommendations Page.

On Monday, I started looking at the recommendations page. This page would show three different types of review, and I decided to start off by looking at recommendation that will be shown if no genre or ratings exist. This would show all the books in a list view sorted by average rating, whilst this would be similar to the search page, this would contain information about the average rating and number of ratings. At the bottom of the page it would show the user’s favourite genres.

Fixing Bugs.

After this I started fixing bugs, on the search page there is a big space between the list view and the bottom navigation bar. This, was caused by padding on various elements on the page such as the list view which adds padding 20px. Whilst, I wanted padding I didn’t want to a huge gap between the elements.

I then fixed another bug on the search page with the activity spinner. The activity spinner shows when a user is searching for books, and when this appears it pushes the bottom navigation bar. This was temporarily fixed by changing the height request of the bottom navigation bar when the activity spinner is shown, and then change it again when it is hidden.

Tuesday (02/04/2019)- Wednesday (03/04/2019).
Recommendations based on genre.

On Tuesday, I continued to work on the recommendation page. As previously mentioned there would be three different types of recommendations that would be shown, I decided to start work on the code that would show the recommendations based on genre. For this I decided to create two radio buttons, which I was able to use as part of the input kit nuget package. These two radio buttons would populate a drop down, enabling a user to either search for recommendations based on genre or books they had previously rated. For this I would need to add an onclick event that would populate the drop down based on the radio button click. The drop down would then allow a user to select a genre from their favourite genres and it would show a books similar to that book in that genre.

I had previously written a stored procedure that would get a list of books that were similar to that chosen book. However stored procedures aren’t supported in SQLite. So, I ended up getting a list of all the book tags which would give me the GoodreadsBookId, TagId, and count. And, then get a list of all tags that contain the text of the selected item e.g. ‘mystery’.  Then, it would iterate through all the tags, and look for the book tag entry, after getting the book tag entry, we could get the book information. This then allowed us to add the BookTag to the book. Allowing us to see what tags the book was classified under. The count of all the tags for a certain book were then added up, and they were complied into a list with the book with most occurrences shown first.

I also, needed to create a BookTags and Tags model and manager, which allowed me to get the information from the database.

While this page had a similar layout to the search page, additional information was also shown. This additional information included the average rating and the number of ratings. This information would be specific to the books page. For the average count, I didn’t want to just display the number, but display the label alongside it. Looking at this I found that I could use string.format to display the text alongside the number, otherwise the number would be meaningless.

However, one problem I found was that when searching for books, the process was very slow, this was due to the book tags database having 599500 rows. A later task would be to go through this and the tags table and remove any meaningless tags. After my weekly meeting, I also decided rather than to configure the recommendations based on reviews, to focus on the renewal and request process which is the core of my project.

Thursday (11/04/2018).
Request and Renewal Process.

On Thursday, I started looking at the request and the renewal process. A user would be able to request book by clicking on the request button on either the search/ book information page. This would then trigger an e-mail to the library, notifying them that a book has been requested. There would then be a button on this e-mail, which when clicked on would update the book location, and a user would be notified for when a book they’ve requested comes into the library.

For this I would need to configure an e-mail notification for when a book was requested. I had previously looked into e-mails in Xamarin. However, upon reading this I found that on platforms you are prevented from sending e-mails directly and you would need to confirm the e-mail in Gmail. I didn’t want to this, I wanted e-mails to be trigged automatically when you clicked a button. I then decided that the easiest solution was to create a new project, .Net Standard, which would handle the sending of e-mails and it would ensure e-mails were sent automatically. I had also gained practice of sending e-mails using C# on my IY.

I looked at these two Stack Overflow posts [1], [2] to get set started. As part of this process I had to create a new e-mail for this application. I created an e-mail called bookhublibraries@gmail.com that would send and receive these e-mails.

Friday (05/04/2018).
Setting up e-mails.

On Friday, I continued setting up e-mails, to test the e-mail worked I needed to add a method that would be called on click of the request button on both the search/ book information page. This method would then call the method in the e-mail project which would send the e-mail to bookhublibraries@gmail.com notifying the librarians that a book had been requested.

I would also need to pass in several parameters for this method such as the book information, user information, and information about the user’s library, the origin library for the book and the current library for the book. For this, I would need to add new fields in the book database for the id of the origin and current library. This ensured that the e-mail contained all the relevent information for the library employee.

When I was writing the email it shows information to the libraian such as the book information, and the current library and the library it needed to go to as part of the request (i.e. the user’s library).

One bug, I found was that on the e-mails it wasn’t showing the accents. However upon looking at the Stack Overflow posts, I realised that it was because I wasn’t using the following code:

mail.BodyEncoding = Encoding.UTF8;
mail.SubjectEncoding = Encoding.UTF8;

Once this was added, it showed the accents in the body of the e-mail. I also wanted to add a button so that when clicked on it would update the book status of the book. However upon reading several articles it looked like this wouldn’t be plausible. So, until I had time to further investigate this problem I would need to add a method to update the status after the email had been sent.

Week Nine

Monday (25/03/2018).
Create account.

On Monday I started off the week by looking at the create account page. Whilst, I was saving the account details page, I wasn’t currently saving the favourite genres to the database. The easiest way to save a list of favourite genres, would be to create a list in my page and whenever some clicked on the checkbox it would add or remove this to the list. For this, I decided to look at the information page for the nuget package I was using. As I hoped there was a CheckChanged() event which would be used on change of a checkbox. I was able to use this method to ensure that whenever a genre was checked it was added (or removed) from a list.  Then, in the save method this list would be converted into the a string which would be saved into the database.

AI Recommendations System.

I then started working on the AI recommendation system which would be located in the book tab. There would be three types of recommendations:

  • The first would show only if the user hadn’t specified a favourite genre or rated any books. This would be the default recommendation.
  • The second would show if the user had specified a favourite genres.
  • The third would show based on a rating of a book.

For this, I would need to write a method to get a list of genres based on a user’s library card ID. This returned the right results however I needed to limit this down to ten, and show them in a carousel view.

Carousel view.

I spent the rest of the day looking for tutorials of ways I could implement a carousel view into my project. I looked at several guides and tutorials including:

However, the link I found most helpful was this one. However upon installation of the nuget package it came up with a popup when you navigated to the page where it was used, and to use the nuget package I would need to get a license. I then decided that the easiest way to implement the recommendation page was to use a list view with filters that would allow you to show books similar to ones you’ve read, or books similar to your favourite genre.

However, I decided that it would be beneficial to create a view more information page which would allow you to rate and review a book, and a page which would allow you to view and edit your favourite genres prior to continuing with the AI recommendation system.

Tuesday (26/03/2018).
View more information

On Tuesday, I decided to work on some of the other the other pages of the app, so that I could test the AI recommendation system after it had been developed. For instance there would be recommendations when a user rates a book, therefore it made sense to develop the ‘more information’ page which would show when a user clicked on the ‘view more’ button on the search page.

The first thing I did was add buttons to the search page for ‘request’ & ‘renew’ (the text of this button would change depending if the book is already out on loan), and there will be another button to view more information. The view more information would also contain a book Id, which would take you to another page to view more information about the book.

I then created the view more information page. This page would show the image of the book, the title, author and it would contain a rating and review box. I created a method in the code to get the book information based on the id, and this would show the book information on the page.

After this, I added icons in my code to represent a filled star, and an un-filled star. These icons came from Material.io. On initial launch of the page it would show five un-filled star. However, when you click on the button it changes to a filled star. I also wrote the code so that when one-star rating was clicked all the other images were un-filled. and vice versa. I also added a text box entry using the <editor> input in Xamarin. However, one thing I wanted was it to appear as a text box, to do this I put the <editor> tag inside a frame tag and set the border colour to black (link).

After I finished working on this page, I changed the styling of the search page, so that the request and view more buttons displayed in-line. The request button was a primary button, and the view more was a secondary button.

Wednesday (27/03/2018).
More information page.

On Wednesday, I started working on the more information page. Whilst I was getting the book information, and I had set up the rating fields, I was currently unable to add a review. I added a save button that would save the rating as an integer and the review text to the database. The user would then get redirected to the search page with a ‘saved successfully’ message.

After I had tested this, I needed to add code to ensure that if a user had already written a review for that particular book, it showed the information and the review details that the user had previously given.

Adding a book quote.

After this, I started working on the ‘Home’ and the ‘Splash Screen’ page, on both of these pages there would be a randomly generated book quote that would appear on these pages. For this I would need a list of quotes, with information associated with those quotes such as the book and author. Whilst, I could just create a list in my project, I decided that it would be easiest to create a CSV file and then import this in the database. I would then need to create a BookQuoteManager which would allow me to get a list of book quotes, and then using the Random class in C# I could generate an integer which would correlate to the Id of one of the quotes.

When looking for books, I used several sites using Goodreads, upon finding the quotes, I ensured that they existed in the database of books, as an extra add-on would be to go to the book information page on click of the book. I originally added 40 quotes, however more will be added over time.

When I was adding the quotes to the home page, I realised that some of the quotes were too long, and to remedy this I changed the max size of to be 110 characters. This meant that I had to remove some existing quotes, and use shorter ones instead. By restricting the character count, it ensured that the quotes didn’t take up too much space on their respective pages and the quote didn’t detract from the main page.

Thursday (28/03/2018).
Favourite Genres page.

On Wednesday, I started looking at the favourite genres page. This page would allow you to view and edit your favourite genres, and it was the one page that wasn’t covered by the screen designs. This was due to the fact that in the original screen designs the functionality was part of the burger menu. However, feedback suggested that this wasn’t where people would expect to go, so I decided to rethink the design. I sketched out a few designs on paper, before thinking about the design using adobe XD.

I then had to think about where it would go on the app, I had originally intended for it to be one of the tabs in the bottom navigation, however I soon realised that the ‘heart’ icon, would mislead users into thinking that this page would show their favourite books. I decided to remove this option from the bottom navigation bar, and include a list of favourite genres and a link to the edit page in the books tab. This was also suggested in the feedback where some stated ‘Having the favourite genres in the sidebar seems a bit odd to me, I would personally expect it in My books’.

After figuring out where it would go, I started working on the implementation, I started off by including a list of favourite genres on the ‘My Books’ page. This would also contain an ‘Edit’ button which would take you to a favourite genres page. For this page, I got a list of all the genres and put them in boxes, that would align side-by-side on the pages. The intention for this page is that the styling would change when one of the boxes were clicked, and then on save it would save all the genres that had been selected.

Friday (29/03/2018)
Favourite Genres.

On Friday, I started development on the favourite genres page. Whilst, I had created a page for the purpose of changing favourite genres, this page was empty. I created a grid view that contained boxes that represented the genres. Each box was in a <FrameLayout> this allowed me to add a border for each box.

I then added some code so that when someone clicked on the box the styling changed. I implemented this by adding ‘.GestureRecognizers.Add(new TapGestureRecognizer()’. This styling would represent the selected  or unselected genre. I used the built in Xamarin color class to change the colour of the background. The selected background colour would be the accent colour as defined in the constants class, and the ‘unselected’ background colour is white. On click of one of the boxes it would also add or remove the genre to a list of favourite genres.

After this I started working on the save. When the save button is clicked it will update the favourite genre information for the current user. After the details have been saved it will redirect the user back to the ‘books’ page with an updated successfully message. I then modified the books page to show the genres on two rows if required, as one bug I found was that if there were a lot of genres then you couldn’t see the edit button. Additionally, if there are no genres it shows a ‘no genres found message.

 

 

 

Week Eight

Monday (18/03/2018).
Bottom Navigation.

On Monday, I finished off working on the bottom navigation. I had successfully implemented a bottom navigation bar which directed you to the specified pages. However, I had no way of telling which page you were currently on.  I decided that the easiest way to tell what page you were currently on was by adding the text of that page to the bottom. For this I created a method in all my pages called GetBottomNavigationText() this would use the BottomNavigation stacklayout and get it’s children and find the label by name. After this it would set isVisible = true on that label.

Mid project demo.

After I finished the bottom navigation I started looking at preparing the mid-project demo which was tomorrow. I read MMP S09 which relates to the mid-project demonstration, and took notes of the tips Hannah Dee mentioned. I then created a video demonstration of my work so far, just in case the app didn’t work on the day, since previously during my meetings the OAuth wasn’t working due to the device not being connected to the Internet. I also created a short presentation which contained all the topics I would talk about which included:

  • Aims of the project.
  • Technical information.
  • Screen designs, and feedback from those.
  • A short demonstration.
  • Technical difficulties.
  • Remaining work.

These slides would help keep me on track, and refresh my memory as to what I was supposed to be talking about.

Tuesday (19/03/2018).
Finishing up the code.

On Tuesday, prior to finishing my preparation to my mid-project demo. I added Title=”Favourite Genres” to all my content pages, this ensured that the page name would be displayed on each page. Making it clearer what page you were currently on. I also added NavigationPage.HasBackButton=”False” to the top-level pages e.g. the notifications, favourites and books page. This ensured that the back button is only shown during an activity, e.g. the create account process. After I completed this I re-created the video to reflect my recent changes.

Mid project demo.

After this, I continued my preparation for the mid-project demo. Continuing my work from Monday I finished off the PowerPoint slides, I then practised what I was going to say and came up with a sample script of things I was going to say. It was particularly import to practise the demo as I needed to make sure that what I said  correlated to what was on the screen.

My demo was at 1.30, and it went well, while I felt like I was running out of time towards the end, I managed to save enough time for questions at the end. One of the critisms that was mentioned was that the use of Twitter as a form of OAuth limited the amount of potential users of the app. Whilst, I mentioned that Google authentication was a desirable I decided to look into it more later that day.

Google Authentication.

After my mid-project demo I decided to start looking back into Google Authentication, I looked at this tutorial and this tutorial which I used when configuring authentication with Twitter. However, the tutorials I was following returned a 403 ‘that’s an error’ message due to a disallowed user agent. I also completed the ethics form and am now waiting approval from that.

Wednesday (20/03/2018).
Google Authentication..

On Wednesday, I continued looking into OAuth, and I continued working on the tutorial I found Yesterday. However, one problem I was getting was that I kept receiving a redirect_uri_mismatch error on the redirect URI. I then read this article which illustrated that Google had blocked the use of web views, which is what would be used to generate the authentication screen. Therefore, the app would need to redirect to the Google Chrome app to display the redirect screen. I would then need to change this line of code: bool: isUsingNativeUi = true to false. I also needed to change the redirect URI to: ‘com.companyname.LibrarySystem:/oauth2redirect’ which is the name of the package in my manifest file. This then successfully took the user to the Google authentication screen, and allowed them to log in. However it just took them to the Google home page.

I researched into this issue and several people in the comments had a similar issue, which was solved by ensuring that the package name in the manifest file was all lower case. However, when I tried to change this my solution wouldn’t build, and I was unable to find another solution for the problem for the time being. Although over the course of the week I continued to look for a solution.

Validation.

I then added further validation to ensure that a library card had not previously been associated with an account. In my database library card numbers are unique and a user would only be allowed one account associated with the library card. However, this meant that if a user was authenticated with Twitter, they could not create a new Google account with that same library card.

Thursday (21/03/2018).
Image Loading Bug.

On Thursday, I started looking into the warning messages in the hope of trying to fix the Google Authentication so that it redirected into my app. Whilst, doing this I noticed that the FFImageLoading nuget package which I was using to display my images (which was this) was targeting the Android version of 9.0 which was Pie. However, my current Android project was only targeting Android 8.1 (Oreo). I updated the solution to target 9.0, and once this was working I tested it to ensure that when you scrolled down on the page it loaded in the new images automatically which it wasn’t doing previously. As previously it was only loading the first images that appeared on the screen without scrolling.

However, I later found out that as part of the changes I made, I had changed my image code from <CachedImage> to <Image>. This meant that I was no longer using the nuget package to show the images, enabling me to just uninstall the nuget package.

Login- authentication.

I then had another look at authentication, one thing I would need to implement was to ensure that if a user had already authenticated and created account, then they would be redirected to the home page. I implemented this by adding a TwitterId to my user table, and getting the TwitterId when a user authenticated. Then, when the user created an account this would be added to the user table alongside the other user details. After this was implemented I added a check prior to the redirect to see if the user with that Twitter Id had an account and if so it would redirect to the home page so that the user didn’t have to create an account.

Looking at the ratings.csv file.

After this I started thinking about the AI recommendation system. I would need to implement three separate algorithms.

  • The first would show the top rated books regardless of genre. This would show if a user hadn’t selected a favourite genre.
  • The second would show the top rated books in that genre.
  • The third would show books similar to other books that have been rated by the user in terms of genre, this would then be ordered by rating.

For this I would need to use the ratings.csv file. However, this consisted of every rating in the dataset, I originally thought that I would have to count the number of ratings and calculate the mean. However, upon closer inspection of the books.csv file, I realised that it contained an average rating and number of ratings, meaning that I just had to re-import that file into the database.

I then realised that in the original books.csv file, there were two fields that would show the average rating and the number of ratings. I deleted my current books table, and re-imported it including these tables. This would later help me when working on the recommendation system.

Friday (22/03/2018).
Create an account page.

On Friday, I continued to work on the Current Account page in preparation for the recommendation system. The first thing I had to do was to add a provider type table to the database. This would contain two fields, one for Twitter and one for Google which are the authentication methods used for the app. I would then need to add a provider type ID and a provider ID to the username, this would ensure that if two people had the same provider ID they would have different provider type ID. I had previously been using a Twitter ID, this was renamed to provider ID, which could be used to refer to a Google ID or Twitter ID.

I also added a provider type constants class to my project, to avoid using hard-coded strings into my project. I then updated my code so that it checked that the provider ID already existed instead of the Twitter ID, prior to redirecting to either the create account or home screen.

I then changed the get all libraries method to get all those libraries and sort them alphabetically. And, I updated the database so that the id’s corresponded with those associated with the dropdowns. After this I tested that the right library was getting set upon save.

I then needed to ensure that the current user was accessible on all the different pages, I found that by using app.current.properties[“id”] I could save an ID which would be accessible on all the pages (link). I then added a line of code to ensure that the library card number of the current user was getting set to the id, which would mean I could get information specific to that user on other pages easily.

Week Seven

Monday (11/03/2019)
OAuth.

On Monday, I continued looking at authentication with Twitter. One problem I was having was that the redirect URL was going to the Twitter home page rather than going back to my app. I fixed this by looking at this StackOverflow post which detailed that the redirect URL had recently been updated, I updated it on the Twitter developer console, and then tested it. This would then call the .Completed OAuth method, and I could set up a redirect to another page.

I then updated the pages to take into account the OAuth. I deleted the forgotten password and login page, as neither of these would be required as the app wouldn’t be storing the passwords locally. After this, I updated the ‘Create Account’ page, to remove any unnecessary form fields such as the password, name and username, which will be accessed via Twitter. However, after successful authentication, the user will be redirected to the modified ‘create account’ page where they will need to enter library name and library card details.

Search.

After I had merged the OAuth branch into the master branch, I continued working on the search. One problem I was having was that when writing the query it was saying that the ‘search term’ was not a column. I researched the issue and found a Xamarin Forum that stated that when specifying a query such as ‘Where title = ‘ input, then you need to add ‘?’ in order to return the right results.

Once I was confident that search was working with the search box, I added sorting and filtering dropdowns. The filter options would allow users to filter by books that were available now and on loan, and the sort options would allow users to sort by author or title ascending or descending. Originally, when writing the search query I used ‘dbConnection.Query(‘Select * from Book’). However, whilst this worked fine with just the text box it broke with the filters.

Tuesday (12/03/2018)
Search.

On Tuesday I continued working on search, one problem I had was that the original query kept breaking when I used both sorting and a search term. To combat this I changed the dbConnection.Query() to dbConnection.Table<Book>().Where(
x => x.Title.ToLower().Contains(searchTerm.ToLower()) || isEmpty).ToList(); where search term is the eterm entered by the user and isEmpty is true when there is no search term. This would return all the books that contained the search term in the input, or if there is no search term then it would return all books. I then added further queries for both filtering and sorting, and tested that it was working.

I then looked into how I could display the results in Xamarin, by reading this blog I found that you could use a list view, and when you added a list of items as item source, you can show the items using the binding attributes in Xamarin forms. For each result I would display the image, title and authors. However, due to the sheer volume of results when no filters were applied, one problem I had was that some of the images weren’t showing when I had scrolled up or done. I found this nuget package which provided a CachedImage.

After I had implemented the search, and ensured that the results were getting returned, I added an additional error message that would show if no search results were found. This would provide valuable feedback to the user.

Wednesday (13/03/2019)
Validation.

On Wednesday, I continued writing the validation for the code. I had previously started writing the validation last week, so I got my old branch. However, when I merged this with master, there were a lot of merge conflicts. So, I decided that it would be easier to save a copy of the files I needed and create a new branch.

After I did this I thought about the type of validation that would be needed:

  • Ensure library name is entered.
  • Ensure library card number is entered.
  • Ensure email address is entered.
  • Ensure library card number is valid.
  • Ensure email address is valid.

I created an ‘ErrorMessageConstants’ class where I created strings for each of these errors. This would ensure that there weren’t any magic strings in my validation code.

Whilst I started off by using the code from last week, I made some changes to make the code seem more readable and understandable, I created an EmailValidationBehaviour, LibraryCardValidationBehaviour, LibraryPickerValidationBehaviour, for each of the elements that were being validated. All of these contained an IsValid() method which contained methods to remove and add existing errors. These existed in the validation behaviour class to minimize duplication of the code.

When it came doing the library card is valid and email address is valid I needed to use Regex. For the library card I used this to get a regex expression consisting of numbers. However, I would need to ensure that the library card had eight characters, so I consulted this post. For the email I found this example of email regex. However, whilst doing this I realised that when people added their library card number they could use the format ’12 34567 8′ or ‘12345678’, so it was important that spaces were removed, this is accomplished using x.Replace(” “, string.empty). Additionally I used .trim() on the e-mail address to remove spaces at the end or start of the string.

Thursday (14/03/2018).
Unit Testing.

After this I started working on unit testing, and implementing unit tests for the search page. However, in order to test the search function I would need to create a database connection, with some dummy data to test that the function was returning the right results. I used Xamarin.Forms.Mock which is used to initialize forms on each platform [1]. This will then allow me test the functionality in the code behind for my pages. I also created a separate models folder in the unit tests, so that those models were used instead of the ones in the application

I created several tests, to ensure that the correct drop down items and search results were returned. However, I later removed these tests and opted to instead test the manager since the managers contained the core functionality in my app. The nuget package for Xamarin.Forms.Mock can be found here. [2]

Loading spinner.

I also decided to add a loading spinner to my search page to give users some indication of whether work was happening in the back end or not. Xamarin has an activity indicator class which allows users to add a loading spinner.

The loading spinner would appear below the search filters, and would show when the user clicked search and would be hidden when the search filters were displayed. I used the activity spinner to show the results, which is talked about in this forum. However, one problem I had was that the spinner was only showing after the results had been displayed.

I then decided to make the call to the search method asynchronous by using the await operators, this would ensure that the activity indicator is visible until all the results had been displayed. I used the .IsVisible false and true to hide or show wthe loading spinner.

Friday (15/03/2018)
Bottom Navigation Draw.

On Friday, I started looking at the bottom navigation draw. When researching how to implement one I came across a nuget package. However, I decided to implement my own as one of the release notes said that they had updated the packages to support v24 and this breaks Xamarin forms. In conclusion, it seemed easier to implement my own bottom navigation draw.

When implementing the bottom navigation draw I created a content view which would contain the code for the bottom navigation. This would then be included on the other pages. I also added a tap gesture recogniser for each of the items in the tab bar that would redirect the user to the other page. The code behind also defines the tab bar images, the links of which are defined in a constants folder. I used images from material.io so that all images had the same look and feel.

Week Six

Monday (04/03/2018)
Create an account page

On Monday, I started working on the create an account page. On Friday I had initially created the page but there was no content. I followed the screen designs and included all the form fields an inputs. Creating the page was helped by the tutorials I found in the first week. However, one problem I found was that there was no check box native to Xamarin, to overcome this problem I would need to use a nuget package that would allow the use of checkboxes. This Github repo showed me how to use the checkboxes from the nuget package.

I also used the query I created the previous week to create a drop down consisting of all the libraries. When populating the library table, I used libraries from Powys, as this would provide me with realistic data.

Additionally, when creating this page, one problem I found was that I would need to enable scrolling. For this, I looked at the Microsoft documentation and added the <scrollview> attribute to my content page. I would also write a UI test to give me confidence that it worked.

Forgotten password page.

I also created the forgotten password page, this would be very similar to the login page, so I used the styling from that page to create this page. This is a very simple page with only one input field and a button. After I created this page I also ensured that the back button was added by looking at this forum and specifying that the Splash Screen was a navigation page. This meant that every page after the splash screen resulted in a back button that would take you to that page.

Tuesday (05/03/2018)
Authentication.

On Tuesday, I started looking at authentication, whilst there were a number of different tutorials, a lot of them focused on OAuth. Out of the remaining tutorials I looked at implementing authentication and a login system using Firebase. This is a link to one of the tutorials I followed, however, many of the tutorials seemed out dated or Android specific. Whilst, my app would be primarily tested in Android I wanted to make use of the shared project in Xamarin forms.

Towards the end of the day I started looking more into using OAuth, in particular Google. This would also eliminate the problem of storing passwords locally, making my application more secure.

Validation.

After this I started looking at validation. The ‘create account’ page required validation on several of the input fields especially  on the email and password fields. I watched this video and followed this tutorial to configure the validation on a sample project. While, these posts acted as a good starting point, I would need to provide validation specific to my application. I then decided to leave this until I had configured either an authentication system or OAuth into my project, in case the pages the validation was on needed to be changed.

Wednesday (06/03/2018)
OAuth with Google.

On Wendesday, I started looking into OAuth with Google. I created an account with the Google developer console and added my app. Upon creation of the project, in the credentials tab you would need to add an OAuth client ID. From this menu you would need to enter the application type, the name, package name, and signing-certificate fingerprint which I found using this video tutorial. However, whilst I was looking at tutorials such as this one. It was unclear whether I needed to create a web application, Android. Another problem I had was that many of the tutorials are platform specific. I then decided to develop an OAuth system with Twitter, as the main goal was to get one developed fairly quickly. Although, I would like to develop a Google OAuth system in the future.

OAuth with Twitter.

I then developed OAuth with Twitter. I looked at some Git hub repos such as this one, and I followed this tutorial. I also read this part of the Xamarin docs that talked about authentication with OAuth in Xamarin forms. In order to use OAuth using Twitter I had to create an app on the Twitter developer console.

While creating the app I had to specify the app name, application description, the website URL, enable this application to be used to sign in with twitter, callback URL and how description on how this app will be used. For the website URL I specified my book blog which would appear on the authenticcation screen. In order to get user’s e-mail I would need to link back to a terms of service URL and privacy policy URL which I didn’t have.

After this I started writing the code in my project, unlike the Google Authentication, Twitter used OAuth1 which required differed parameters, such as the consumer key, consumer secret, request token url, authorize url, access token url and callback url. These could all be accessed via the Twitter developer console. Due to most of the tutorials being platform specific I first implemented it in the MainActivity.cs (which was in the Android project). Once this was finished, I added a task to the sprint board to move this to the shared project.

Thursdsay (07/03/2018)
OAuth with Twitter.

On Thursday I continued developing OAuth with Twitter. On Wednesday, I had successfully implemented authentication on MainActivity.cs. However, upon successful authentication it redirected to the Twitter home page. I mainly focused on moving the code from MainActivity.cs to the Splash screen page. In the Splash screen there would be a button saying ‘Log in with Twitter’ and this would fire the authentication method. A possible desirable would be to have authentication with Google or Facebook, however these would be implemented differently as they use OAuth2 as opposed to Twitter which only supports OAuth1.

Friday (08/03/2018)
Looking into the GoodBooks dataset.

On Friday, I started looking into the GoodBooks dataset. This datset consists of six million ratings for ten thousand popular books. The dataset also contains metaadata about the books, and tags/ shelves/ genres.  Whilst I wouldn’t be using the ratings.csv, I would need to use the books.csv, book_tags.csv and tags.csv, which I could use to get the genres.

I then inserted this tables into my database, I could do this by going into DB browser then file -> import -> table from csv file. This would generate a new table based on the CSV file. By using this dataset it would give me some realistic data to work with. However, I would later have to add a OriginLibraryId and a CurrentLibraryId to all the books for the purposes of my project. When importing the csv files I modified the contents to include foreign keys, for instance the BookTags table contains a TagId that references the TagId in the Tags table.

Search.

After finishing importing the new tables, I started looking into search. The first thing I had to do was to edit the existing book model to map to the new columns that were added as part of the CSV import. I then created a search page, and added a search term entry box and a button.

I then created a new query, that would get all the books in the database. To begin with, I wasn’t going to bother with filters, however this would be added later on. This search would be performed on page load. Once this was working I started modifying the query to take into account search terms that the user might enter. I tested my queries in DB browser first and then moved the code into the BookManager class.

Week Five

Monday (25/02/2018)
Designing the screens using Adobe XD.

On Monday I started designing the screens using Adobe XD, I had already used Adobe XD for my Mobile Development with Android assignment, so I was familar with how it worked. I decided to create two separate files one for the library and employees and one for the users, this would allow me to get feedback for each of these separately.

When designing, the screens, I also used the colour palette I had created on Thursday so that I could get a feel for the different colours and how it would look. I also included the logo on the top of the main navigation bar. Although, I was unsure whether this should  be the title of the page, since for apps like of Goodreads it was just the title.

I was able to design most pages, but some pages would have sub-pages of the same content, in this instance it seemed redundant to create all the pages. And, I thought that too many pages would be overwhelming for the user evaluation. Therefore, for pages where there is the same content I only included the one screen design.

I later remembered that for the library employees I would need to ensure that it was tablet friendly, so I started creating the screen designs for tablet. Most the pages would look the same, and the main goal was that it would still be usable in tablet mode.

Tuesday (26/02/2018)
User Evaluation.

On Tuesday I performed some user evaluation on the user screens. My first task was to think of some evaluation questions that could be asked. I created a Google Forms document which contained three sections:

  • The first section would ask the user how they would expect to perform those actions. For this questions the user wouldn’t see the screen designs. These answers would be useful to see what people’s expections are when using the app.
  • The second section would show the screen designs to the user and would ask the users to perform certain actions. This would ensure that it was clear how to navigate through the app.
  • The final section would ask design questions to the user. E.g. do you like the colour scheme? Do you think the icons are suitable for the actions?

I messaged some of my friends, some of which study computer science and some who aren’t and asked for feedback. I wasn’t able to get feedback instantly, however, I decided that I would work on the functionality of the app first and then focus more on the design. Although, when I start  getting feedback, the feedback was generally consistent, and the biggest change that would be implemented was to have a ‘favourites’ tab in the bottom navigation. This page would show you your favourite genres, and would allow you to change them. As, many people commented that you wouldn’t expect to do it in the burger menu.

I also did this for the library screens. However, instead of asking my friends, I asked people who are the same age as library employees and aren’t technically proficient.

Wednesday (27/02/2018)

On Wednesday, whilst I was waiting for feedback I started working on database diagrams, I used draw.io to create a diagram, which illustrated the different tables, and the type of relationships. These were the tables I would implement when first designing the system, however, these may be subject to change later on.

  • Books: this would store information about books such as BookId, title, author, string, description. There would also be two foreign keys one for the current library and one for the origin library.
  • User: this would store information about user, such as UserId, first name, last name, email address, password, and library card number. This would also define libraryID as a foreign key.
  • Library: this would store information about the library, such as the ID and the name.
  • Loans: This would store information about the loans, e.g. Loan Id, start date, and end date. This would also contain foreign keys for BookId and UserId.
  • Review: This would store information about the review, e.g. ReviewId, rating, review, status and reason for rejection. I would also have foreign keys for BookId and UserId.

I also defined the relationships between the classes.

  • User- Review: One-to-many relationship (one user can have many reviews).
  • User- Loans: One-to-many relationship (one user can have many reviews).
  • Library- User: One-to-many relationship (one library can have many users).
  • Library- Book: Many-to-many (many libraries can have many books).
  • Book- Loans: Many-to-many (many books can have many loans).
  • Book- Review: One-to-many (one book can have many reviews).

I also started working on designing the database using DB Browser, DB Browser is a SQLite browser and I found a tutorial on how to implement a SQLite into a Xamarin project so I decided that this would be the simplistic way to include the database. I also created some sample data for the libraries, so, I could test that it was getting data correctly.

One problem I had when using DB browser was that there was no date data type. However you can use text for ISO8601 strings, REAL for Julian day numbers and Integer for Unix time [1].

Thursday (28/02/2018)
Creating the database and using it.

On Thursday, I continued following this tutorial which outlined creating a Xamarin application with existing SQLite database. I had already created the tables using DB browser. For this I would need several nuget packages such as sql-net-pcl. Whilst following the tutorial, I installed two other packages: sqlite.net.core and sqllite.net.platform.xamarinandroid. However, sqlite.net.core didn’t work in the shared project so I decided to modify my code to work without that nuget package.

Whilst working on this, I also encounted several instances where it would say ‘file is not a database’. This, would generally occur when I updated my database. Unfortunately there seemed little help on the Internet. I found that I was able to fix it by deleting the app and rebuilding the project. However, this fix didn’t work later on when I realised that it was because one of my views was broken.

I was able to get this tutorial working, and when my application ran I was able to perform a list of queries e.g. get a list of libraries and return data. I then looked and the code and thought about other ways in which it could work, and changed the code to better suit it’s purpose.

Managers.

I then also created managers for the different tables. The tutorial I followed was quite simplistic and created a class in which you’d call the stored procedures. However, I didn’t want this to be all in one class, so I created separate manager classes for each table. One, problem of this was that it generated duplicated code, so I decided that I would try to optimize the code later down the line.

Models.

Whilst following the tutorial I created a model for the library. However, I also created models for the rest of my tables. It was also important to ensure that the attributes in the model matched what was in the database.

Additionally, I also separated the views of my project into a views folder. However, it turned out that this was what was causing the ‘file is not a database error’, so I changed it back for the time-being until I could think of a work-around to that problem.

Friday (01/03/2018)
Login Page.

On Friday I started looking on the screen designs. The first page I created was the splash screen, however this page would link to the login page which would be the first page I would develop. Whilst creating this page I used Xamarin’s NavigationPage which would allow a back button to appear on the second/ third page. This back button would allow the user’s to go back one page, which was something I wanted to implement when creating my app to make it easy to navigate through the app.

I used the tutorials I found in the first week, to create the navigation. When creating the page I followed the screen designs and was able to implement a page similar to the designs. I also, created the ‘create an account’ page and the ‘forgotten password page’. However, for the time-being these pages were empty.

 

Week Four

Monday (18/02/2019).
Goodreads app investigation.

On Monday, I started to investigate the Goodreads app. This was mentioned in the ‘developing an app idea’ lectures as part of CS31620. When analysing the app I thought about several things such as:

  • What features do they emphasise?
  • What kind of structure does the app have?
  • Is there a better structure that concentrates on the content?
  • What do I like about the competitor?
  • What could be better in the competitor?

I also analysed the pages that would be most relevent to my project. Goodreads gives you the ability to manage shelves, add or remove books, review books and provide recommendations. The UI is nice and easy to use, however, it is one of the few apps where there is a notable difference on an IOS device. One thing I noticed was that the Goodreads app used a burger menu and tab bars instead of a bottom navigation draw which is what it uses on an IOS device.

UI Testing.

On Monday I started working on UI testing, this would be automated and would perform certain tasks to ensure that the UI was working without requiring user interaction. Thankfully, Xamarin provides support for UI testing, in the form of a project called Xamarin.UiTest Cross-platform test. This would allow me to add UI tests to my project.

After reading this guide, and looking at this tutorial, I realised that the UI tests would require labels etc,. to have an automation ID, this would be used to refer to the elements in the UI test which would be in a separate project. I would also need to install the following nuget packages:

  • NUnit.
  • NUnitTestAdapter.
  • Xamarin.UITests.

However, one problem I had was that the tests weren’t running. Whilst investigating the problem I came across this forum, and this forum. After reading these forums, I amended my project and added the device ID to the UI project. I managed to successfully get the UI tests working.

Tuesday (19/02/2018).
UI Testing.

On Tuesday, I finished working on the UI, I continued working through this tutorial. This tutorial helped me to create a sample project that would contain my UI Tests. After doing this, I decided to implement UI tests on my own project. This would ensure that I wouldn’t forget about them when working on the implementation of my project. I used the buttons that I had previously created, and wrote a method so that when you clicked on them it should a message. I then wrote a UI test to ensured that this happened.

I also renamed the unit test project in my project from UnitTestProject, to LibrarySystem.UnitTest. Similarly, the UI test was called LibrarySystem.UITest this ensured that the projects were easy to find in the root of my project.

Investigating other apps.

After this, I started investigating other apps similar to Goodreads. However, unlike Goodreads I was unfamilar with all of these apps. Once again I went through all the questions mentioned in the lectuares, and then analysed the pages relevent to my project. The apps I decided to analyse were as follows:

The Library Thing app: app empathises browsing a catalogue of books, adding books to shelves. This is the only app I analysed that has a bottom navigation draw. There is an option to scan books, and you can also add books to shelves. This helps to organise the books.

My Books- Library: this app empathises browsing through a catalogue of books, adding a book by scanning it. You can view your shelves. There is just a burger menu that contains all the links, no bottom navigation or tab bar. There are back buttons when you go deeper into the app. You also have the ability to scan books, but it’s only a barcode scanner. You can sort and search through books, you can add books to shelves, FAB button makes it obvious how you add a book. However, there isn’t a save button when you’ve finished adding a book, no feedback for the users.

Me Books app: empathises browsing a catalogue of books, and downloading and reading books using the app. Once again, only has a burger menu, but there is a back button for when you go deeper into the app. Cleanly shows a list of books, large click areas. However, the error messages aren’t clearly error messages, they are just toast messages. Additionally, there isn’t any filtering or searching for books on the page, searching is only accessibly via the burger menu. However, there is a bright and colourful UI. Similarly to the other pages, there is just a burger menu for navigation making it slightly messy.

Books I’ve Read: this app empathises reading books, adding books to shelves, viewing books you’ve read, different shelves etc. In this app there is no bottom navigation or tabs, so it’s hard to navigate, everything belongs in the burger menu. There is a floating action button that makes it obvious how you add a book, I also like the book quote on the first page of the sccreen. However, I found this app to be not intuitive and it doesn’t require camera access, you have to add a book manual. Additionally, you can’t sort the books.

In conclusion, I have decided that similarly to The LibraryThing app I will create a bottom navigation draw. However I will create a burger menu like the other apps, but I don’t want this to be crowded and chaotic. I will also ensure that there is a back button to make sure you go deeper into app. I will also add a book quote similarly to the ‘Books I’ve Read’ app. I will also ensure that proper error messages are displayed and not just toast messages.

Wednesday (20/02/2019)
Looking at accessibility.

On Wednesday, I starting looking into accessibility, and how to make mobile apps accessible, and what opportunities Xamarin provided in terms of accessibility. I looked at the Xamarin accessibility guidelines and then I looked at the platform specific APIs that were included as part of the documentation.

I also continued working through the slides for developing an app idea. I started thinking about the following scenarios:

  • What should the user see when they start the app in normal use?
  • What does the user see when they start up the screen for the first time?
  • How do we move between the screens (buttons, tabs, tables)?

While answering these questions I started prototyping some of the screens, and I also looked at the Android Style Guidelines to ensure that my designs complied with the style guidelines.

Thursday (21/02/2019).
Estimating tasks and times.

I then created a new sprint for the upcoming week and started estimating tasks. After my meeting on Wednesday I had a good idea of what I wanted to achieve this week:

  • Design screens by hand. This included designing both user screens and screens for the library employes.
  • Design screens using Adobe XD. Again, I split this into subtasks for both the user and employees. I also would need to find icons, modify the logo, and think of a colour scheme.
  • Perform some evaluation. I would get some people to perform evaluation for the user, and others to perform evaluation on the screens for the employee. I would also need to think of some criteria.
  • Modify the screens based on the feedback.
  • Create diagrams. This included creating UML class diagrams, entity relationship diagrams and sequence diagrams.

Unlike last week I was more realistic with my estimates. However, the times of the tasks, were more than the capacity, despite this I included all the tasks, since my goal is to ensure that I begin coding by next week.

Thinking of a colour palette.

After this, I started thinking about the colour palette. I used this tool which is mentioned in the Material Design guidelines. I then started looking at some articles on the significance of colour.

I looked at this infographic, which states that green is the easiest colour for the eye to process, and blue represents trust, peace and calmness. Additionally, this article states why blue is the most popular colour in web design. Blue also represents efficiency, clarity and simplicity. This, was one of the factors in me choosing this colour, however, I decided to use cyan (which is a mix of blue and green) as the accent colour.

Redesign Logo.

After this I decided to redesign the logo. On Wednesday, I sketched out some new versions of the logo, and I recreated the logo using Inkscape. For the logo I also used this image of a bookshelf.

This is the primary logo for the app:

logo1

This is the secondary logo:

logo

Friday (22/02/2019).
Designing screens on paper for user.

On Thursday, I started working on the screen designs on paper. I firstly, started working on the screens for the user and designing what they would look like. Fortunately, as part of my research I had already got an idea of what the splash screen and the home page would look like.

During the designs, I covered all aspects of the app, making sure that the most important stuff was easiest to get to. There is a bottom navigation draw that illustrates the most important activities, and for things such as ‘renewing’ and ‘requesting’ you can get to these actions on a variety of different pages. There is also a burger menu that displays your favourite genres, which can be edited there. You can also change account settings and logout via this menu.