Ever thought about joining us?
The Guardian website frontend.
Frontend is a set of Play Framework 2 Scala applications.
Frontend is built in two parts, using Grunt for the client side asset build and SBT for the Play Framework backend.
Core Development Principles (lines in the sand)
These principles apply to all requests on
api.nextgen.guardianapps.co.uk (our Ajax URL)
On the server
- Every request can be cached and has an appropriate Cache-Control header set.
- Each request may only perform one I/O operation on the backend. (you cannot make two calls to the content API or any other 3rd party)
- The average response time of any endpoint is less than 500ms.
- Requests that take longer than two seconds will be terminated.
Welcome! To get set up, please follow the installation guide.
Fixes for common problems can be found here.
There is a
make watch task available to build and watch for development
You can run the Jasmine unit test suite with
If you need to debug the tests in a browser, run the command
grunt test --no-single-run
and point your browser at http://localhost:9876.
Deployment uses the Riff Raff application.
Debugging Play application
You can debug your local Frontend application, by attaching a debugger.
- Start Simple Build Tool in debug mode by typing
- Build and run your application. See "Running" for steps.
- Use a debugger to attach to the remote Java process, on localhost:1044.
Any IDE debugger should be compatible. In IntelliJ, add a new Debug Configuration, based on the Remote default. Ensure the Transport is Socket, the Debugger mode is Attach, and the port is set to 1044. Start a new Debug session, and your breakpoints should be active.
If you're new, you'll want to see what libraries we use in frontend.
Further documentation notes and useful items can be found in docs.