3. App

Spring Boot // App #

Since all the things are inter-connected, we’ll have to do things up-front then comeback to them, as it’ll simplify the understanding without adding too much theory.

Main entity #

  • Define the main entity, e.g. User, Robot, Contact, Game, etc
  • You’ll use it for building the skeleton app around it

Controllers #

  • Introduce the Create, read, delete, update - CRUD principle
  • Create your first controller with CRUD functions and use spring web annotations to map them to java functions.
  • Map CRUD to URI.
    • Propose endpoints like /create/entity, /read/entity, /update/entity, /delete/entity
    • Is this a good way to define URIs ? Why ?
    • Let’s talk REST.
    • A nice list of REST best practices

Model - data and behaviour #

  • Use an endpoint that returns all entities
    • Create first service
    • Create the repository
  • Decide on how to organize the code: