Skip to content
Code test for a job
Hack PHP
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea
.DS_Store
ELSIO-Graph-Example.txt
LICENSE
README.md
favicon.ico
index.php
worker.php

README.md

elsevier-exam

This repo is the solution for Will's code test and will be removed from public view afterwards.

Data was used unchanged, and contains a U+FFFD � unicode replacement character used to replace an unknown, unrecognized or unrepresentable character. This shows up in the results of a product search.

index.php is the landing page, which re-uses Elsevier's main websites look and feel, providing stripped down content.

worker.php is the OOP PHP Class which handles the requests passed in from the user search.

worker.php is designed to allow simple extension and redesign of the functionality.
Re-using common functions such as the printing to screen, allows UI updates easily for all results. e.g. Expandable product results, which allow more information or adding to a shopping basket cookie.

Other notable features - All data about the object is preserved after the filtering. It would have been easy to take the titles, and build a new array of just titles - sort that array and print that sorted array. Instead, all of the meta data is kept and the array is sorted by a user-defined comparison of the titles as a sub element of the array. Retention of the full data allows a more user-friendly commercial experience, this is demonstrated in the application by showing the format of the product in the results.

Search functionality is case-insensitive.

You can’t perform that action at this time.