Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor widget #3

Open
wants to merge 37 commits into
base: main
Choose a base branch
from

Conversation

salmanbukhari1
Copy link

This request contains changes and additions to enhance code maintainability of this widget, several things have been been done to cater to that. Following is the detailed list. Please note while changes have been made and tests have been introduced, they are not comprehensive and there is still room for improvement.

Improvements:

  1. Design Patterns have been introduced such as Repository Pattern to manage the way we search and query the school data while keeping the code clean and modular and Factory Pattern to delegate object generation responsibility for abstraction.
  2. Principles such as single Responsibility have been used by making small and manageable classes to make sure code is testable, readable and maintainable.
  3. Use of dependency injection and interfacing storage objects to manage data storage layer has enabled for ease of swap when it comes to what kind of data objects w use. For example currently we use json for data related storage and retrieval but this can easily be swapped out in favour of a traditional SQL based database or even something else, there are classes inside Storage folder such as JsonStorage.php and DatabaseStorage.php (this is just for demonstration purposes and can be added to later on).
  4. Data has been migrated to a more normalised form and can this can be done by running ManageSchoolData.php in the root once. Normalisation has been done to be able to more easily manage data and reflect and understand different entities that make up the system.

There are still areas that need improvement such as having a unified interface for handling commands being given by the user, but that has been left out at this time. Furthermore, test coverage needs to be improved upon.

Application has been dockerized so its easy to run on different platforms without too much configuration.

salman and others added 30 commits October 3, 2024 23:23
…ass and get enrolments in an object oriented way
…state so that its compatible with new object oriented design
…abstract retrieval, and modification operations leaving the door open for swapping out storage type on the fly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant