Group gr2121 repository
Documentation agile development iterations:
How to contribute and how to run application.
How to run
Server
From the root of the project, enter the wishList
directory
cd wishList
Then we need to clean any previous .class files here and install all dependencies:
mvn clean install
Enter the rest
sub-directory and update it aswell.
mvn clean install
Return to wishList
:
cd ..
Start the server:
mvn spring-boot:run
Now the spring boot server should run locally on port 8080
For more info about the REST api endpoints click here
Client
Open a second terminal, do not close the one running the server
Enter the wishList
directory:
cd wishList
Then run the following:
mvn clean install
mvn compile
mvn -pl fxui javafx:run
For more info about the client click here
If you are running in gitpod you will find the app in port
6080
.
Be aware that when running in gitpod the user interface will not be as good as when run locally
Overview of code structure
All the code can be found inside the wishList folder
Modules
The project is built with maven
and to be structured using a modular style. Where you can the parent pom.xml file at
the root of this repo.
Following sub-modules are:
-
core: Here lies the main core logic for the application.
-
fxui: Here lies javafx-code for GUI as well as controllers for different views
-
rest: Here lies the code for the rest server
Our repo supports the following
- Testing (maven-sunfire-plugin)
- JavaFX running (javafx-maven-plugin)
- Spring Boot (java restapi framework)
Core
The core module consists of all core logic this application uses. It is comprised of three core classes:
- User
- WishList
- Wish
These classes have their own ways of interacting with each other, and a set of methods and fields.
In here also lies all forms of json serialization and deserilaztion logic and how such core objects should be written to files and saved to acheive persistance.
For further detailed documentation about core structure and logic click here
FXUI
The FXUI package acts as the client in this application. In here lies all the different scenes the user can interact with and the underlying controllers that handle these user interactions. There is no major logic or computation happeneing in this package aside from it being able to send HTTP requests to the server. This is on purpose to make the client as small as possible and not make it depend on underlying logic not direclty used by the user itself. The application is shipped from this module.
For further documentation about structure click here
Server
Our server is a RESTful API created using Spring Boot. For a server to be called a RESTful API it needs to follow a set of rules. Our server organizes entities and methods on unique URIs often referred to as endpoints. Clients can get access to these resources using a HTTP request that follows a specific format that consists of which endpoint it is requesting, what type of HTTP request being used an its request body (if nessecerray).
REST standing for Representational State Transfer
URI standing for Uniformed Resource Identifier
For further documentation about structure click here