This assignment is set up to help us gain insight into how you function as a web-developer.
The assignment is this:
Build a sample application (using PHP and/or Javascript) which presents a list of restaurants. It should be possible for a user to sort the list, search through the list and favorite items from the list (so they can more easily be found during later sort/search actions).
The assignment is judge on the following criteria:
Although a pretty UI is nice to look at, don’t feel discouraged if you are less gifted in making nice-looking web-interfaces. This assignment is mostly geared towards assessing technical prowess.
The sample application should work well across desktop and mobile devices.
When multiple restaurants have been favourited, they are also sorted based on their current openings state and current selected sort option(s).
The code should be accompanied by test cases. Obviously, the tests should all pass.
The list of restaurant shoulkd be sorted based on it’s current openings state. Restaurants can be favourited and a sort option can be selected to further sort the list.
The priority of the sorting is as follows (from the highest to the lowest priority):
It should be possible for a user to filter restaurants by searching for a restaurant’s name.
A user should be able to mark restaurants as “favorite”. Restaurants that have been favorited should appear at the top of the list.
All necessary data to complete this assignment is included in sample.json
.
The data looks like this:
{
"restaurants": [
{
"name": "Restaurant Name",
"status": "open | order ahead | closed",
"sortingValues": {
"averageProductPrice": 1234,
"bestMatch": 0.0,
"deliveryCosts": 200,
"distance": 1234,
"minCost": 1000
"newest": 96.0,
"popularity": 17.0,
"ratingAverage": 4.5,
}
]
}
Customers are more willing to order at restaurants near them.
As a bussines, we would like to promote restaurants with high scores.
In order to combine these two facts, a new sort method needs to be calculated.
This will be called “Top restaurants”.
The following formula should be used to calculate top restaurants:
top restaurants = ((distance * popularity) + rating average).
For extra points, implement top restaurants as an another sorting option.