TBIAL

This project is used as the starting point in this practical course. More information is on Uni2Work.

Running the application

  • If you've already cloned the project and started it once, before you start it again, please delete the contents of /database.

  • The project is a standard Maven project. To run it from the command line, type mvn, which downloads dependencies, builds the application, and starts it. If it is not opened automatically, open http://localhost:8080 in your browser.

You can also import the project in your IDE and start it from there (cf. the slides for more information).

Project structure

  • MainLayout.java in de.lmu.ifi.sosy.tbial.views contains the navigation setup (i.e., the side/top bar and the main menu). This setup uses App Layout.
  • views package in de.lmu.ifi.sosy.tbial contains the server-side Java views of your application.
  • themes folder in frontend/ contains the custom CSS styles.
  • Application in package de.lmu.ifi.sosy.tbial contains the main method

Useful Maven Commands

  • mvn: Build and run the project.
  • mvn compile: Compile the project without launching it.
  • mvn clean: Remove the compiled files by deleting the target/ directory. The next build will start from a clean state.
  • mvn verify: Run all tests.
  • mvn spotless:check: Check if the code conforms to Google Java Format (v1.15.0).
  • mvn spotless:apply: Reformat the code according to Google Java Format (v1.15.0). It is however recommended that you install the corresponding plugin in your IDE to reformat the code automatically.
  • mvn spotbugs:check: Look for bugs in the code. The project must be compiled beforehand.
  • mvn forbiddenapis:check: Check the code against a list of forbidden API signatures. The project must be compiled beforehand.

Useful links for Vaadin

App architecture

  • View: Implement pure view logic, i.e. GameBoardView, LobbyView etc.
  • ViewModel: Interaction between Views & ViewModels, i.e. Listener, UI updates, etc. Could also implement very simple game logic.
  • Services: Implement main game logic, i.e. RoleService, AbilityService, ActionService etc. They get their data from the Repository.
  • Repository: A data source. Error handling, responsible for CRUD of all core objects.

Licenses

The license of the skeleton is defined in LICENSE.txt.

Everything used in the project must be under an open-source license. You may not use Vaadin's proprietary offerings like Collaboration Engine.