During one month work on project, I had the opportunity to learn a simplified software development process, from the identification of user requirements to the concrete implementation of the application.
I went through simplified Larman's method of software development, which consists of 5 stages:
- Requirements definition stage
- Analysis stage
- Design stage
- Implementation stage
- Test stage
This project includes four of them.
In the first phase of development, I decided to develop a system that would simplify the management for schools of foreign languages. Two actors who interact with the system were identified, namely the student and the administrator.
For the purposes of modeling requirements, I used the UML Use Case diagram. I identified 10 Use Cases for those actors.
Each Use Case is described in detail and these descriptions are available in the documentation, which is currently available only in Serbian language 🤫
As a result of the analysis phase, a description of the dynamics of each Use Case and the structure of the software were obtained.
An UML System Sequence Diagram was used to describe the dynamics of every Use Case. The purpose of these diagrams is to show the interaction of actors with the system and the messages they exchange. Below is the example of System Sequence diagram for Login Use Case:
Conceptual model of the system is created using UML Class Diagram:
Here is the Relational Model:
User (id, username, password)
Administrator (user_id, employmentDate)
Student (user_id, firstName, lastName, birthDate, creationDate)
Course (id, name, startDate, endDate, groupCapacity,language_id)
Language (id, name, level)
Tutor (id, firstName, lastName)
LanguageTutor (tutor_id, language_id)
CourseGroup (id,course_id, name, numberOfStudents)
TutorsAssignment (tutor_id, id,course_group_id)
GroupEnrollment (student_id, id,course_group_id)
At the beginning of this phase, I designed user forms for each use case. Here are some examples of forms:
Courses form
Course groups form
After designing the GUI, I worked on designing the application logic. There is an controller of application logic that serves the requests that arrive on the server side of application, by using different services.
In addition to controller of application logic, it also contains different services which provide implementation of defined system operations in cooperation with DAOs (Data Access Objects) that are responsible for communication with database.
Here is one example of communication betweeen controller, service and DAO:
In the picture below we can see the design of Database Broker which consists of different DAOs:
And finally we can see the complete architecture of my software system:
Tech Stack:
-Java SE 17
-MySQL
-JDBC API
Tools:
-Apache Netbeans 15
-SQLyog Community Version
Short description:
The entire application was made using Core Java, both client and server side. Things I would like to point out:
- MVC pattern is used on client side
- I made Validation Library using Builder pattern which can be easily used in different situation. The idea for this library came from famous C# FluentValidation library
- Swing library is used for GUI
- The whole communication with database is implemented using JDBC (no frameworks like Hibernate)
The validation library is made using Builder pattern. Here we can see the structure of library and example of library usage:
Structure
Usage
Defining validator for model class:
public class StudentValidatorBuilder extends AbstractValidator {
public StudentValidatorBuilder(Student student) {
ruleFor(student.getUsername())
.notEmpty()
.withMessage("You have to insert username")
.minLength(5)
.withMessage("Username must have at least 5 characters")
.maxLength(15)
.withMessage("Username can't have more than 15 characters");
ruleFor(student.getPassword())
.notEmpty()
.withMessage("You have to insert password")
.minLength(8)
.withMessage("Password must have at least 8 characters")
.maxLength(20)
.withMessage("Password can't have more than 20 characters")
.matchesRegex("^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#&()–[{}]:;',?/*~$^+=<>])
.withMessage("Password must have at least 1 lowercase, 1 uppercase and 1 special character");
Validation data:
private void validateStudentData(Student student) throws ValidationException {
ResultInfo result = new StudentValidatorBuilder(student).validate();
if (!result.isValid()) {
throw new ValidationException(result.getErrors());
}
}
Clone the project
git clone https://github.com/Djolee00/school-management-system-DESKTOP
Execute DDL SQL script in some MySQL client and make sure thah the MySQL server is running.
Download and add missing JARs in Apache Netbeans IDE.