All the recommendations we will add are global recommendations, that is, they will be the same for any user arriving on the website. Next we will add these views: Top Rated, Most Popular, and Monthly Trends.
This view will show only the first 100 products with the highest average ratings. Since we already have the average rating available in our dataset, we can make a simple database query. This is exactly what we will do. Check out the file named
webapp-recommender/app/util/ReactiveDB.scala, which contains the following code:
Corresponding to that, we have code in our Play framework's
controller code ...