If you choose to use another language, please be prepared to show fluency in multiple languages (including at least one C-family language), and knowledge of multiple design principles (DRY, Open/Closed, etc) and patterns (Factory, DataMapper, etc).
* Our core application is written almost entirely in PHP and JS.
The API must follow REST specification:
Additional methods can be used for expanded functionality.
The API should include the following roles:
will have much more limited access than a
. The specifics of what each role should be able to do is listed below in User Stories.
All data structures use the following types:
|int||a integer number|
|float||a floating point number|
|id||a unique identifier|
|fk||a reference to another id|
|date||an RFC 2822 formatted date string|
role must be either
manager. At least one of
end_time are required. Unless defined, the
should always default to the manager that created the shift. Any shift without an
employee_id will be visible to all employees.
Please note that this not intended to be a CRUD application. Only the functionality described by the user stories should be exposed via the API.
*NOTE: These buttons make AJAX requests (link) to the API, they are not just rendering static JSON results.
Over all pretty simple and straight forward challenge, no tricks or anything like that. The only real issue I ran into was dumbing down the built in Yii2 ActiveController actions. By default the ActiveController offers all the basic CRUD options and the challenge states only the provided User Stories be exposed. I could have created my own class to handle the API curling but I just decided to use Guzzle instead.
It seemed logical, so I combined stories 1 and 4.
I like these types of "real world" challenges rather than "trick puzzles".