The Server Side Project is a seven-day team project undertaken during the BNTA Bootcamp where we had to create a backend application with an MVP of allowing users to make GET and Post requests.
Our application utilises the tech stacks Java, Spring and PostgreSQL to enable users to store information using CRUD operations. We had dependencies such as Flyway for version control of our database and JDBC API to connect and access the database. We also utilised the Hikari data source as the connection pool mechanism because it is lightweight and better performing.
- Planning
- Challenges we faced
- Testing
- What we learnt
- Final Presentation
- Improvements for the future
- How to install
- How to setup
- How to use
- Credits to
Before diving into the coding, we spent the first day on planning.
We handled time-management by creating a Kanban Board using Trello which helped us create and assign tasks to each member. We assigned different tasks to allow for individual, in-pair and group work.
We created models for our relational database to help structure the information and data into a set of tables. We created links between each table to determine the different relationships such as one-to-one, one-to-many, etc. This helped us visualise our database before creating it.
We had a discussion about the possible classes that we would need including their fields, data type, and methods. Then modelled it using the website Miro.
Once this was all planned out and agreed upon, we created this repository to allow us to start programming.
During the project, we came across a few challenges. Some challenges were harder to solve than others but the most memorable ones were:
- Creating mock data and using Flyway to track our database.
- This was an issue we came across when we were trying to create mock data to test our code. As this was the first challenge we came across that took us more than an hour to fix, it was one of the most memorable since we worked as a team to solved this using both the documentation and StackOverflow.
- Connection point issues between the classes.
- This issue came about because we forgot to remove the abstract keyword from a class. This caused a few headaches as when we were trying to debug, we looked at our code multiple times to check if we added the necessary Java Bean annotations to the classes. After awhile, we were able to find the issue and solve it quickly. This is memorable to us because it was a small issue that had big repercussions.
We tested our code using the frameworks JUnit, AssertJ, and Mockito.
Since we tested our code as we were writing them, we were able to reduce the amount of potential errors that might have occured as our application became more complicated.
From this we were able to save a lot of time and attempt our challenge implementation.
Overall, this project was a fun and exciting experience. We were able to solidify the content taught in the Bootcamp by creating an API that users could interact with.
Through this project, we were able to learn how to use Git effectively to work collaboratively in a group and create CRUD operations from scratch. We also practiced writing tests to test our application using the frameworks JUnit, AssertJ and Mokito.
During the project, we became more adaptable by utilising each member's strengths and learnt how to write tests effectively to reduce errors from happening later on.
We presented our project on Thursday 18th November 2021 at 15:00pm to our colleagues at the bootcamp, the instructors and potential clients.
The presentation included a description of the application, the reasons behind our choice of topic, the planning stages, a demo of the application, code that we were proud of, and a short Q and A section where we answered questions from the audience.
Here are the slides from the presentation.
Rather than starting by building a database that we knew we could build and then wondering what the user experience would be like afterwards it might've been a smoother workflow to start with the user experience first, then work our way backwards to the backend.
This might've allowed us to avoid the pivot and ultimately save time in our design process.
Another improvement we would've liked to add was to collate citizens into families. So we could retrieve data on an entire family or find the house id of a specific family.
- To install the backend application, press the green
Code
button in this GitHub repository and select the option
Download Zip
. - Once downloaded, use an unzipper application to unzip the files.
Software you will need:
- IntelliJ IDE
- PostgreSQL
- Java SE17
- Open up Intellij and open the directory with the files that were downloaded in the install section using the
Open
button in Intellij. - Use the PostgreSQL application to initialise a server by pressing the
Initialize
button and start up the sever by pressing theStart
button. - Open up a new terminal and use the command
psql
to start up the sever connection then type the commandCREATE DATABASE serverside
to create a database called serverside. (Note: This database is needed to run the application) - Go back on Intellij and press the green build button (looks like a hammer) to build and run the application.
Please refer to the Wiki section of this repository to learn how to use the application.