Puzzle Pattern, a Systematic Approach to Multiple Behavioral Inheritance Implementation in Object-Oriented Programming
Source abstract
Abstract
Object-oriented programming (OOP) has long been a dominant paradigm in software development, but it is not without its challenges. One major issue is the problem of tight coupling between objects, which can hinder flexibility and make it difficult to modify or extend code. Additionally, the complexity of managing inheritance hierarchies can lead to rigid and fragile designs, making it hard to maintain and evolve the software over time. This paper introduces a software development pattern that seeks to offer a renewed approach to writing code in object-oriented (OO) environments. Addressing some of the limitations of the traditional approach, the Puzzle Pattern focuses on extreme modularity, favoring writing code exclusively in building blocks that do not possess a state (e.g., Java interfaces that support concrete methods definitions in interfaces starting from version 8). Concrete classes are subsequently assembled through the implementation of those interfaces, reducing coupling and introducing a new level of flexibility and adaptability in software construction. The highlighted pattern offers significant benefits in software development, promoting extreme modularity through interface-based coding, enhancing adaptability via multiple inheritance, and upholding the SOLID principles, though it may pose challenges such as complexity and a learning curve for teams.
Source: crossref · Quality: baseline
Research context
OpenAlex topics: Software Engineering Research · Advanced Software Engineering Methodologies · Software Engineering Techniques and Practices
SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.
Affiliations
Department of Engineering Sciences, Guglielmo Marconi University, 00193 Roma, Italy
Leibniz Institute for Educational Media, Georg Eckert Institute, Freisestraße 1, 38118 Braunschweig, Germany
References (17)
Show source-provided references
1. (2024, May 21). omg.org. OMG Meta Object Facility (MOF) Core Specification. Available online: https://www.omg.org/spec/MOF/2.4.1/PDF.
2. Gamma, E., Helm, R., Johnson, R., and Vlissides, J. (1995). Design Patterns: Elements of Reusable Object-Oriented Software, Addison-Wesley.
3. (2024, May 21). MartinFowler.com. Inversion of Control Containers and the Dependency Injection Pattern. Available online: https://martinfowler.com/articles/injection.html.
4. Kerievsky, J. (2005). Refactoring to Patterns, Addison-Wesley Professional.10.1007/978-3-540-27777-4_54 ↗
5. (2024, May 12). testing.googlegblog.com. How to Think about the “New” Operator with Respect to Unit Testing. Available online: https://testing.googleblog.com/2008/07/how-to-think-about-new-operator-with.html.
6. Martin, R.C. (2003). Agile Software Development: Principles, Patterns, and Practices, Prentice Hall.
7. Suryanarayana, G., Samarthyam, G., and Sharma, T. (2014). Refactoring for Software Design Smells: Managing Technical Debt, Morgan Kaufmann.10.1016/B978-0-12-801397-7.00001-1 ↗
8. The protection of information in computer systems10.1109/PROC.1975.9939 ↗
9. Mixin-based inheritance10.1145/97946.97982 ↗
10. Traits: Composable Units of Behaviour
11. Traits: A mechanism for fine-grained reuse10.1145/1119479.1119483 ↗
12. Richardson, C. (2018). Microservices Patterns: With Examples in Java, Manning Publications.
13. Vernon, V. (2013). Implementing Domain-Driven Design, Addison-Wesley Professional.
14. Newman, S. (2015). Building Microservices: Designing Fine-Grained Systems, O’Reilly Media.
15. Flores, A.P., and Moore, R. (2000). GoF Structural Patterns: A Formal Specification, The United Nations University.
16. Meyer, B. (1988). Object-Oriented Software Construction, Prentice Hall.
17. Liskov, B.H. (1987). Keynote address—Data abstraction and hierarchy. ACM SIGPLAN Not.10.1145/62138.62141 ↗