Week Three

Moday (11/02/2019)
Set-up project.

On Monday I started to set up my project. I created a bunch of tasks in one of the stories called ‘set-up tasks’. These included ensuring that a git repository was being used, and it was being hosted on Azure devops. I also made sure that any nuget packages and extensions were installed. Additionally I also set up the styling for my project. This ensured that the base of my layer of my project was created.

Continuous Integration.

I also looked into Continuous Integration, and I followed a guide to get set up with Continuous Integration. I realized that the previous tutorial I followed wasn’t compatible with Xamarin, so I decided to look for other tutorials. I found this useful tutorial. And whilst following it I realised that I should be using the visual designer, this would allow me to choose the Azure Repos Git, and a template. I would need to do this twice so that a pipeline was configured for both Xamarin.iOS and Xamarin.Android.

This tutorial helped me to successfully integrate CI with my project, so that when the master branch was changed I would get two emails as two pipelines were configured. One for Android and one for IOS.

Tuesday (12/02/2019).
AI Recommendation System.

On Tuesday, I started researching into one of the hardest parts of the project, and that was the AI recommendation system. This would be one of the hardest parts due to the fact that I had previously knowledge of AI.

I firstly started looking into the type of recommendations systems I could used. I read several pages such as:

I decided that I would create a content-based recommendation system, so that recommendations would be made based on genres, and information about the books. Rather than other users.

I then decided to follow some tutorials, to see how these recommendations systems would be implemented. Unfortunately, these tutorials were all written in Python. So I decided to follow a couple on Python and then when I got a better understanding of them to write them in C#. This would ensure that when I was translating the work into C# I would have a good understanding of how recommendation systems worked.

You can find the tutorials I followed here. It uses the movie lens database which is a dataset comprosing of 100,000 ratings, 3,6000 tag applications applied to 9,0000 movies by 600 users. Information about the dataset can be found here. Whilst I wasn’t going to use a dataset of movies, this gave me good practice of using a dataset which I would need in my project.

Wednesday (13/02/2019)
AI Recommendation System.

On Wednesday I decided to continue my work on the AI recommendation system. However this time I was planning to write it in MVC, which would mean that it would be easier to migrate to Xamarin, as it would be written in MVC. This also ensured that I would have a clear example. I choose to use MVC because I had experience using that ensuring that it was easier to get started.

I followed this tutorial which gave me some boilerplate code to get started. However, this was a simplistic example, and I would need to use a dataset of books when it came to developing my project. I decided to modify this example, so that it used a dataset. For this I would need to import the movies dataset, which would require reading a CSV. Whilst this was something I did in my IY, I used the following guides to get started (link 1, 2, 3).

I then created a page consisting of all the films in the database, and once you clicked on them it calculated the similarity score based on the genre. Most films had multiple genres, so the film that had the most genres in common with the selected film was shown. After this, I created a LINQ statement so that it was ordered in order of rating, so the hhighest rating films were rated first. However, one problem was that this wasn’t particularly efficient, but, I decided that it would be a good idea to develop it in an Xamarin app prior to working on the efficiency.

I also created a new sprint for the upcoming week and adding tasks for that week, my main goals were to work on the recommendations, testing and start thinking about the design.

Thursday (14/02/2019)

On Thursday I started working on unit tests for my project. I looked at several guides on how it should be implemented, I would need to add a separate unit test project, which would contain the unit tests. This tutorial explained how to create unit tests and the best way to write them, and I was able to create some sample unit tests. I then decided to add it to my project, so that when I started writing code, I wouldn’t be held up by getting the test environment set up. The Visual Studio documentation also outlines how the unit tests work and how you run them.

Unit tests would be used to ensure that the functionality and the underlying functions of my application worked. I wrote some example to test the calculator functions, for example addition and subtraction.

I also tried converting my example AI recommendation system into Xamarin. However, for some reason it was adding a ‘\’ at the start of the CSV file location. Meaning, that I couldn’t get it to read the CSV file. I decided to investigate it further later.

Friday (15/02/2019).

On Friday I started thinking about the design of my app. For this I looked at the CS31620 slides for developing an app. The first step is to decide on a name, and describe what the name should do in one line. I didn’t spend too long on this and I came up with the name ‘Book Hub’ and the tagline ‘request, renew, recommend’ which were the three main functions of the app. I also created a sample logo that would be used in my app.

After this I needed to breakdown the one-liner into possible features. This was partly done as part of the outline document. The one-liner illustrated that the main functions would be the ability to renew a book, request a book and recommend. I then thought about the 80/ 20 rule and what was most important. I evaluated all the functions that I wanted to achieve and I ranked them from high to low priority.

 

 

 

Week Two

Monday (04/02/2019)
Push notifications.

On Monday, I started to look at push notifications. I followed several tutorials but I didn’t have much luck. I then decided, to leave it and look at it again later on in the week with fresh eyes.

Continuous Integration.

After this I started looking to see if there was support for continuous integration in Azure DevOps. I found out that within Azure DevOps, you can configure a pipeline for a project. To do this you needed to provide a location in your code, my code was hosted in the Azure repos. After this you select a project and it generates a .yml file. By doing this it would ensure that whenever I checked my code in, it would run the latest build and then send an e-mail of whether it has been successful or not.

I also installed test manager which would provide an integrated test management system for manual, exploratory and user acceptance testing needs. Additionally I installed an analytics extension which would show a test failure report. Both the extensions are on a free trial and I would need to analyse these extensions to see if they were worth renewing later on in the week.

Tuesday (05/02/2018)
CSS and Stylesheets.

On Tuesday, I started looking at integrating CSS and less stylesheets into my projects. I had yet to follow any tutorials that had included styling, so I did some research into whether or not I could use CSS stylesheets. I found some useful Microsoft documentation that showed me how to include a CSS stylesheet into my project.

However, I didn’t just want one CSS stylesheet in my project, due to the scope of the project I would need lots. Therefore, I initially thought that the best way to do it was to create a CSS file which would include links to all the different .LESS files for various aspects of the project. Less would allow me to include variables, functions, mixins into my CSS (the documentation can be found here).

My original idea was to create a main CSS file which would use a @import include the other LESS files. However, one problem I found that when I used a @import to include the other files was that I was getting an error telling me to use <link> instead. I then found a guide on Stack overflow that suggested creating one main less file that would import the other less files. I then needed to download web compiler, this would allow me to compile my main less file, and generate a CSS file which I could link to in the app class.

Once I was able to use the separate less files, I created a config file to specify media queries for tablet (I used this forum for guidance), and to also specify common colours. This would then be included on the other less files where it needed to be used. When working on the styles I also found out that an error was getting thrown when using code such as: font-size: 20; However, when specifying px it would throw an error, as it was a generating a stylesheet used across two different operating systems.

Wednesday (06/02/2019).
Project Outline.

On Wednesday I continued working on the project outline to get a draft version ready for the hand-in date on Friday, I then spent the rest of the day looking a push notifications.

Push Notifications.

When trying to figure out how to use push notifications, I stumbled upon a tutorial that used Firebase. However, whilst I was able to use push notification, they were sent using Firebase. For my project I would need to implement some code using C# to automatically trigger these notifications. I also found this to be quite temperamental, with onTokenRefresh() not always being called. This meant that I wasn’t able to set up the message on Firebase as it required a token.

Thursday (07/02/2018).
Push notifications.

On Thursday I continued to look at push notifications, and I tried to see if I could implement a C# method so that they could be sent via the code. However, I was unsuccessful in my attempts, and I decided to look at alternative solutions. These were configuring an email or SMS messaging. This helped ensure that I had a solution which would notify the user.

Emails.

I followed this tutorial which made of a nuget package called Xamarin.Essentials to send an email. When testing this when the button was clicked it would open a Gmail folder, and then the user would have to click ‘send’. However, after reading this forum, users state that this is intented to prevent apps from generating spam.

I also followed this guide to do the same with SMS. However, I was unable to test it due the phone I was using not having a sim card. As well as this, this message would be called after library managers updated some fields, and it is likely that managers would use tablets, which don’t have sim cards.

Friday (08/02/2019).
Project Outline.

On Friday, I finished working on the project outline and refining certain areas, since there were certain aspects that needed to be changed. These included making sure the app was both tablet and phone friendly, and the possibility of using e-mail as a form of push notifications. I also updated the references with names and dates.

User stories.

I also created a project for my system, I used Git as a form of source control and pushed it to Azure DevOps. I setup the styling and installed some of the nuget packages that would be needed (e.g. sqLite and Xamarin.Essentials).

My main reason for doing this, was that I needed to create a board where I could add about user stories.  After this I started thinking about the user stories and put them onto a board, I then created one week long sprint to end next Wednesday. However, most of the stories live in the backlog, and they are primarily centered around the actions that the three user types can perform.

After this I added some stories such as the research the AI, and research into continuous integration and the initial set up tasks for the project.

Week One

This is my progress on week one (28/01/2019 – 04/01/2019) for the CS39440 major project.

Research:

One of the biggest challenges of my major project was getting used to a new development environment: Xamarin which is part of Visual Studio. However, I have used Visual Studio 2017 prior to starting this project, meaning the IDE wasn’t completely alien to me.

However due to Xamarin being unfamiliar I decided that a suitable place to start on my major project was to start looking at tutorials. These tutorials would then help me get to grips with Xamarin.

The first set of tutorials I watched was by Bert Bosch. However, when I got to episode 5 which contains information about REST APIs, it became apparent that the code was outdated. Therefore, I decided to look around for more recent tutorials.

I then started watching another set of tutorials by Thumb IKR- Programming Examples. These were slightly more recent only being seven months old. By following these tutorials I was able to create a simple database and perform CRUD (create retrieve update delete) operations using a Sqlite database. However, I modified the example code so that it was more inline with what I had seen on previous tutorials and forums.

Source Control.

Whilst creating these examples, I added the projects to source control, and I used Visual Studio Team Services (now Azure DevOps) to publish the Git repo. By doing this I would gain experience in using Git.

Other tasks.

I also read through the coding guidelines for Xamarin and adjusted my project accordingly to comply with the coding standards.

Additionally, I created a dummy project where I started prototyping the more difficult parts of the project such as searching.

Summary of Project

This is a blog detailing my progress on my major project for CS39440. The project that I will be developing is to create a Xamarin App. This app will be used by library members and library employees.

Why am I doing this?

The main incentive for this project is to allow users to be notified when books come into the library. From my experience, there have been several instances where I have not been notified when a book comes into the library. Therefore, I think it is important to create a straightforward process to allow users to be notified.

It is also important that the user interface is intuitive and easy to use, as most library employees aren’t technically proficient or are volunteers.

What will be in this app?

There will be three separate logins for this app. One will be for the library employees, another will be for system administrators and the other will be for the library members. Therefore, it is important to set up different permissions for each of the two user types. The system administrators will be responsible for activating accounts upon registration.

The main role for the library employees is that they will be able to add and remove books from the library. They will also be notified via e-mail and the app when a book has been requested. Additionally, they will also be responsible for monitoring reviews and approving them prior to them getting shown on the site.

Users will be able to create an account, they will then have to verify their account via e-mail. After this they would then have to log in, the app will retain login information the next time they open the app. After this, the user can review and change their account details. On first launch of the app there will be a initial quiz which uses AI to suggest some initial recommendations for the user.

The home page of the app will allow library members to search through a catalogue of books from a range of libraries. The page will show the top recommendations for the reader based on their prevous reading habits. It will then show books from top genres as choosen by the reader. For each book you can request it it, view more information and hide recommendations or agree with it. This will then help adjust the books that will get recommended to you.

Additionally, users can also renew books that they have currently have on loan (providing no-one else has requested the book). However, there will be a limit of three renewals. They will also be notified via push notification when when a book they have requested comes in to the library. After a book has been read, a user can leave an optional rating and review. This will then help feed into the algorithm that provides recommendations with user.