A simple CRUD application implementing MVC design pattern and using Spring for dependency injection. The user can construct a class roster by adding, removing, and viewing current students.
This project requires:
- Maven
- Java 1.8+
- Unix shell
To install the program, first clone this repository into a directory of your choice
git clone https://github.com/Raz-Rotundu/ClassRoster
cd ClassRoster
mvn clean compile
The application can now be opened in the IDE of your choice
This project used the Spring framework for dependency injection. An IOC container is configured to assemble, instantiate and configure the beans used throughout the project. This project uses an XML-based setup, where the Beans are defined in the application context configuration file itself.
This project's packages are organized roughly according to the MVC paradigm, with the dao, ui, and controller packages corresponding to the model, view and controller functionality. A service class acts as an interface to the model of the project, and handles all of the input validation when creating students, as well as logging.
This project uses two files for persistence:
- roster.txt
- audit.txt
The former contains the serialized content of the roster, and is loaded into memory on program start. The latter logs all insertions and deletions performed by the user. Both are updated on every insert and delete from the roster.
Running the program will prompt the user with a menu describing the actions to take along with the corresponding key:
- List Students
- Create New Student
- View a Student
- Remove a Student
- Exit
When creating a student two restrictions apply:
- The new student must have a unique ID
- The new student cannot have any blank fields
If these are not followed, the program will not allow the student to be created.