/Facility-Management-Services

A system which supports the management of buildings, allowing users to view rooms inside a certain facility that are available for daily usage, inspection, or maintenance and effectively schedule the rooms to satisfy their needs

Primary LanguageJava

Overview

Facillity Management Services is a system which supports the management of buildings, allowing users to view rooms inside a certain facility that are available for daily usage, inspection, or maintenance and effectively schedule the rooms to satisfy their needs
The program uses:

  • Front End : RestFul //in Development
  • Back End : Java
  • Framework : SpringBoot
  • Database : PostgreSQL
  • Testing : Junit and Integration Test (Mockito) //in Development

MVC Diagram

Below here is the MVC Diagram of of the application. Click the picture to Zoom in.



Description

  • Seperation of Concerns impelemented by dividing the layers between Client, Model and DAO.
  • In the Model Package, it is further seperated to Facility, User, Inspection, Use and Maintanence.
  • In each model, there are Service facades which connects the model with the clients.
  • Domain driven development is applied here as the usertypes (Faculty, Inspector and Technician) will retrieve all information needed for the request and direct it to the degsinated request (Userequest, Inspectionrequest and Maintainencerequest)

There are 3 main patterns impelemented here:
1.Observer Pattern:
When a room in a facility at a given time is booked, it will ask the user whether he/she wants to get notified, in case one cancels (removes schedule). If yes, He/she will be notified. There is a viaSMS implementation using twillo API, but can be further improved using other means of notification (viaSMS is a child of Observer). Using composition, the Observarable interface is implemented in schedule class, while the Observer in user. Then the trigger will be within service classes, where the user gets notified once the schedule is removed/vacated. Note: Vacate uses current time to fasten the end date to the current date, while remove totally removes it from the schedu le, not considering the date

2.Visitor Pattern:
In this application, the User class visits the Facility class. In this case, the Facility accepts the User class. While visiting the Facility class, the User will get the Facility information and store it to the request classes. This aligns with the domain driven development as conceptually, a user will visit a facility to book the facility.

3.Facade Pattern:
For each packages in the model, there will be a service interface that will act as a facade to interact with the client.

To Run the Application

  1. Create an account at https://www.elephantsql.com
  2. Import the attached SQL code to the SQL Query Browser
  3. Change the connection in the DB_Helper class:
    connection = DriverManager.getConnection(#Change codes here);
  4. Run the desired client in Client class.