Skip to content

Architectural Refactoring: SOLID Principles Improvements #2

Description

@jors2007

Hello! While analyzing this library management repository for software architecture enhancements, our team identified some design patterns that could be refactored to increase robustness, maintainability, and scalability.

We have successfully redesigned and tested the source code to resolve the following architectural issues:

🛠️ Refactoring Summary:

  • Single Responsibility Principle (SRP): Refactored the core domain entities to separate the business model logic from data presentation and persistence. The classes are now decoupled from infrastructure responsibilities.
  • Open/Closed Principle (OCP): Identified tightly coupled control structures based on conditional statements. We've laid the groundwork to enable future system extension without altering existing tested classes.
  • Liskov Substitution Principle (LSP): Fixed inheritance hierarchies (such as the checking process in Staff and Loan calculation methods). Subclasses no longer inherit rigid constraints or improper methods from their base classes, restoring safe polymorphic substitution.
  • Interface Segregation Principle (ISP): Addressed the absence of client-specific abstractions. We broke down bloated dependencies so client modules only depend on the operations they actually consume.
  • Dependency Inversion Principle (DIP): Decoupled high-level business services from low-level data access implementations. We introduced a centralized abstraction layer using a Factory Pattern (DBFactory) and interfaces (IDBConnectivity), so changing data persistence technologies won't break the core application.

You can check out our complete proposed source code solution and structural changes in our repository fork link here:
👉 https://github.com/jors2007/Library-Management-System-Java.git

Best regards,
Jordy Andrade
Maria Alay
Omar Flores
Samuel Domenech

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions