Build a tool with which you can make it easy to manage children in a school
Management personal data of children, parents or tutors and relative staff, be sure to save the name, surname and fiscal code.
Keep track of allergies and food intolerances of each child to manage the dishes of the menu of the day to ensure each child has at least one dish.
Manage trips and related accessions of children and distribution in means of transportation, so the appeal can be made to check absences, presences and errors.
Follow the steps:
- Download or Clone the source code with the button upside
- On the machine that will host the database install one of the programs listed below
- Docker (https://www.docker.com/products) then run
up.sh
or run the commanddocker-compose -p <container name> up -d
to start the database service - Postgres (https://www.postgresql.org/download/) then:
- Run the command
$sudo -u postgres psql
or just run the Postgres shell - Run the following commands:
CREATE DATABASE application; CREATE USER admin WITH ENCRYPTED PASSWORD 'admin'; GRANT ALL PRIVILEGES ON DATABASE application TO admin;
- Run the command
Obviously the name of database "application", the user "admin" and the password "admin" can be changed.
If you change them remember it, because Hibernate needs that information to work. - Docker (https://www.docker.com/products) then run
- Install Java SE (https://www.oracle.com/technetwork/java/javase/downloads) on the Client and Server machine
- On the Server run
Server.java
if any of the database default data has been changed, remember to edit them in the
hibernate.cfg.xml
file. - On the Clients run
Client.java
- Java
- HQL
- XML
- CSS
- Hibernate
- JUnit 5
- Docker
- Postgres
For the creation of the database was used Hibernate, a distributed framework that provides ORM services, that allow the management of data persistence on a relational database, Postgres in this case.
The database is in a docker container that is turned on using the up.sh
command and turns off using the down.sh
command.
< import the image >
To recover the database from a dump file is possible use restore_db.sh
command,
make sure the docker container is up.
EasySchool has been developed with a client-server architecture.
- RMI (port 3692)
- Socket (port 9374)
The exchange of information and data between client and server of both protocols is done via JSON format.
The entity classes are linked 1 to 1 with the database Entity via Hibernate,
the fields in the database table are the attributes of the class.
The entity objects will have the CRUD functions only on the associated table.
For the Entity classes is used a simple Abstract Pattern.
< import the image >
The Repository classes are linked with the Entity classes which require a list of data, not the single tuple. The Repository objects have only read privileges on the attached database tables, they can also apply filters to search for a specific list of data.
For the Repository classes is used a simple Abstract Pattern.
< import the image >