Skip to main content
Dat 3. semester
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

06 Rest & Test

Monday

  • Reviewing portfolio projects. Today we would like to see your documentation of your API endpoints and far you have come with your implementation.

Tuesday

Prepare for class

Toolbox

Exercises in in class

Wednesday (CodeLab)

Thursday (class) - Websockets & Webhooks

Prepare for class

Watch these videos to get an introduction to Websockets and Webhooks:

Skim through the following documentation to get an overview of how to implement Websockets in Javalin:

Exercises in class

  • Have a look at these wonderful protocols
  • Dice Websocket demo
    • Clone the repo and run the Websocket server in IntelliJ.
    • Connect two browser windows to http://localhost:7070 and test the dice game by clicking the “Roll Dice” button. You should see the dice rolls in both windows.
    • Choose one server machine in the class rooom and let the rest of the class connect to that machine’s IP address and port.
    • Figure out why it works ;-)
    • Refactor the code to have a better separation of concerns. For example, you could create a separate class for handling the game logic and another class for handling the Websocket communication etc, separate the css to a separate file etc.
    • Begin adding functionality. Like who rolled the dice. Saving the game history to a database, adding a chat functionality etc.

Friday (exercise day)

  • This one is for you to work on your portfolio project. Begin by writing tests for your API endpoints and then implement the endpoints if you haven’t already.