This is the frontend component of the UQ Library Frontend Work Test.
This sample application was developed in Angular2 (TypeScript) using vanilla Bootstrap styling.
The application was built using the angular.io quickstart sample application.
It has been developed purely as a demonstration to illustrate the ability to grasp new technology within a short timeframe. Prior to this exercise, I had never touched TypeScript or Angular2.
The last time I did anything in Angular1 was in November 2014, with Ionic framework and Apache Cordova for a Charles Sturt University "Mobile App Development Short Course".
You will need to install:
- Node.js
v4.x.x
- npm
3.x.x
Install the npm packages described in the package.json
and verify that it works:
npm install
To run the application:
npm start
This will compile the application and then simultaneously re-compiles and runs lite-server
to serve the application.
You should now be able to navigate to http://localhost:3000 to view the running application.
The default Angular2 Quickstart application has two test scripts setup.
npm test
- compiles, runs and watches the karma unit testsnpm run e2e
- run the Protractor e2e tests, written in JavaScript (*e2e-spec.js)
No consideration has been given to getting these tests to work, as frontend testing with this toolset is not in my regular repertoire, although I do have experience writing selenium webdriver tests driven by Behat and CodeCeption scripts.
- Estimated Time: 14 hours
- Actual Time: 12 hours
The application can be built using BambooCI or similar CI tool, where it can be transpiled from TypeScript to native Javascript/ECMAScript5, and bundled into a deployment artifact (zip), and deployed to an AWS S3 bucket. The bucket would be setup to serve a static website, and Route53 CNAMEs pointing to it. CloudFront distributions can be added to handle scalability.
As part of the CI build process, all static assets (*.css, *.js, *.html, etc.) can be gzipped prior to deployment, to improve performance.
- The Library Hours API endpoint appears to have been decommissioned. This was not an issue as I would have mocked the json response to begin with anyway.
- I initially had some difficulty getting the in-memory data service to work, but this has since been resolved.