This is a backend for the game of "hangman" (guess a word).
The goal is to show how to start with a typical Spring/JPA app and remove Spring and JPA, with the advantages of a much faster boot time, much faster tests, vastly reduced memory footprint, and an overall simpler application to learn and maintain.
If you know how to replace Spring/JPA features, then you're in a position to make an informed decision whether these frameworks are worth using for you or not. If you don't know how to replace Spring and JPA with plain servlets and JDBC, then you don't have a choice. My goal is to help you have a choice.
This annotated slide deck will provide a better introduction to the concepts.
There is an Italian-language video of me presenting this stuff at Italian Agile Days. An English-language video will hopefully be available when Codemotion puts it online.
See more information about the Frameworkless movement.
Prerequisites:
- Java 8
- gradle
- mysql or mariadb
Useful for testing:
- curl
- jq
Run unit tests with
./gradlew test
Run with
script/create-local-databases.sh
script/run-locally.sh
Test with curl:
curl -X POST localhost:8080/hangman/game | jq
curl localhost:8080/hangman/game/<game id> | jq
curl -d guess=x localhost:8080/hangman/game/<game id>/guesses | jq