Example code for my blog post http://out-println.appspot.com/posts/offline_example.
- Firefox: all tests pass. However, I've sometimes observed erratic behavior when testing manually: the offline cache stops updating, I have to clear it and restart the browser;
- Chrome: all tests pass, but I get random errors in the Selenium tests (where DOM elements seem to be uninitialized) ;
- Safari: same as Chrome, but the errors happen much more often.
Install the Play! framework as explained here.
To run the application, type play run --%prod in the application's root directory.
To run the unit tests, type play test, navigate to http://localhost:9000/@test and click the 'Run all' link.
If you're new to Play!, this should get you started:
conf/routesmaps URIs to controller methods (controllers are inapp/controllers);- when a controller calls
render(), the corresponding template inapp/viewsis invoked.
For more information, refer to the Play! documentation.