Puzzle Pattern, a Systematic Approach to Multiple Behavioral Inheritance Implementation in Object-Oriented Programming

Author:

Fallucchi Francesca12ORCID,Gozzi Manuel1ORCID

Affiliation:

1. Department of Engineering Sciences, Guglielmo Marconi University, 00193 Roma, Italy

2. Leibniz Institute for Educational Media, Georg Eckert Institute, Freisestraße 1, 38118 Braunschweig, Germany

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.

Publisher

MDPI AG

Reference17 articles.

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.

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.

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3