Enterprise software systems demand structured, maintainable, and scalable design approaches. Object-Oriented Programming (OOP) principles—encapsulation, inheritance, polymorphism, and abstraction—provide the foundational framework for achieving these qualities, while GoF (Gang of Four) design patterns offer reusable solutions to recurring architectural challenges. This paper presents the design and implementation of a School Library Management System (SLMS) built with Java and the Spring Boot framework, demonstrating the systematic application of all four OOP principles and five GoF design patterns: Singleton, Builder, Factory, Observer, and Decorator. The SLMS supports role-based user management (Administrator and Student), book inventory control, borrow/return lifecycle tracking, and live reporting through a RESTful API backed by MySQL persistence via Spring Data JPA. For each OOP principle and design pattern, the paper provides architectural justification, code-level demonstration, and a discussion of the specific quality attributes achieved. A layered four-tier architecture (Controller–Service–Repository–Entity) enforces clean separation of concerns and aligns directly with the SOLID principles. Evaluation against maintainability, scalability, and extensibility criteria demonstrates that the pattern-driven approach substantially reduces coupling, improves module cohesion, and enables extension without modification—directly realising the Open/Closed Principle. The paper contributes a concrete, replicable reference implementation for applying classical software engineering patterns within the modern Spring Boot ecosystem.
This paper has demonstrated the systematic application of four OOP principles and five GoF design patterns within a Spring Boot Library Management System. The layered architecture enforces clean separation of concerns, with each layer realising specific OOP principles: encapsulation at the entity level, abstraction at the service interface boundary, inheritance in the base class hierarchy, and polymorphism through service contracts. The GoF patterns—Singleton, Builder, Factory, Observer, and Decorator—collectively produce a system with high maintainability, extensibility, and testability scores, as evaluated against a non-pattern baseline.
A key contribution is the demonstration that Spring Boot’s annotation-driven programming model is itself pattern-aligned, making GoF implementation both natural and low-overhead in this ecosystem. Future work should address password security hardening, explicit factory class formalisation, and asynchronous Observer dispatch for production readiness.
References
[1]B. Dathan and S. Ramnath, Object-Oriented Analysis, Design and Implementation. Cham: Springer, 2015.
[2]M. Mouratidou et al., “An assessment of design patterns’ influence on a Java-based e-commerce application,” J. Theor. Appl. Electron. Commer. Res., vol. 5, no. 1, pp. 25–38, 2010.
[3]V. Serbanescu et al., “A design pattern for optimizations in data intensive applications using ABS and Java 8,” Concurr. Comput., vol. 28, no. 2, pp. 374–385, 2016.
[4]J. S. Mtebe and R. Raisamo, “Challenges and instructors’ intention to adopt open educational resources in higher education in Tanzania,” Int. Rev. Res. Open Distrib. Learn., vol. 15, no. 1, pp. 249–271, 2014.
[5]O. D. Bakare, “The use of social media technologies in the provision of library and information services in academic libraries of south-west Nigeria,” Doctoral dissertation, 2018.
[6]Y. D. Liang, Introduction to Java Programming. Boston: Pearson, 2015.
[7]N. Padhy, R. Panigrahi, and S. Baboo, “A systematic literature review of an object-oriented metric: reusability,” in Proc. Int. Conf. Comput. Intell. Netw., 2015, pp. 190–191.
[8]P. Kuchana, Software Architecture Design Patterns in Java, 1st ed. Boca Raton: Taylor & Francis, 2004.
[9]P. Spath et al., “Discovering inheritance, polymorphism, and interfaces,” in Learn Java for Android Development. Apress, 2020, pp. 157–202.
[10]R. F. Olanrewaju et al., “A frictionless and secure user authentication in web-based premium applications,” IEEE Access, vol. 9, pp. 129240– 129255, 2021.
[11]I. S. de Oliveira et al., “Quality of big data systems: A systematic review of practices, methods and tools,” in Proc. XXIII Brazilian Symp. Softw. Quality, 2024, pp. 22–31.
J. Langr, Pragmatic Unit Testing in Java with JUnit. Raleigh: Pragmatic Bookshelf, 2024.