Comparative analysis of the effectiveness of pattern application
DOI:
https://doi.org/10.34185/1562-9945-5-162-2026-15Keywords:
pattern, Factory Method, Abstract Factory, Builder, Prototype, Singleton, comparative analysis, implementation, programming languagesAbstract
The paper presents a comprehensive theoretical and practical study of creational de-sign patterns. The main attention was focused on the analysis of the mechanisms of object creation, reducing the coupling between system components and increasing the level of ab-straction of architectural solutions. Five key patterns were analyzed in detail: Factory Meth-od, Abstract Factory, Builder, Prototype and Singleton. The implementation of the patterns was performed in the programming languages C#, C++, Python and Java. To ensure the cor-rectness and objectivity of the analysis, all patterns were implemented with the same logical structure, which allowed for direct comparison of the obtained solutions. The implementa-tions accounted for the specific characteristics of each programming language, including typ-ing models, syntactic constructs, memory management mechanisms and standard libraries.
For comparative analysis, the implementations were evaluated according to the follow-ing criteria:
• number of lines of code (LOC);
• complexity of writing and amount of template code;
• typing and its impact on architectural rigor;
• ease of implementation and readability of the code;
• potential performance and features of compilation or launch.
According to the results of the analysis, Python provides the smallest amount of code and the lowest threshold of entry for implementing generative patterns, which makes it con-venient for prototyping and rapid development. At the same time, dynamic typing reduces the level of formal control and can complicate the support of large systems.
C# demonstrated the optimal balance between architectural rigor and ease of imple-mentation. The language allows implementing generative patterns with lower overhead com-pared to Java, while maintaining the advantages of static typing and modern language con-structs.
Java provides the most formalized and canonical approach to implementing generative patterns, making it suitable for large enterprise systems where maintainability, scalability, and strict adherence to architectural standards are of particular importance. However, this comes with a larger amount of code and a significant number of template constructs.
C++, in turn, provides the highest level of control over resources and potentially the best performance, however, the implementation of generative patterns in this language is the most complex in terms of syntax, memory management, and overall cognitive load on the de-veloper.
The conclusions and practical results obtained in the work can be used in object-oriented programming, as well as in the practical activities of software developers when choosing architectural solutions for real software projects.
References
Gamma E., Helm R., Johnson R., Vlissides J. Design Patterns: Elements of Reusable Ob-ject-Oriented Software. - Boston: Addison-Wesley, 1994.
Martin R. C. Clean Architecture: A Craftsman’s Guide to Software Structure and Design. - Boston: Pearson Education, 2017.
Oracle Corporation. The Java Tutorials: Object-Oriented Design Concepts. - Official doc-umentation Java.
Microsoft Corporation. Design Patterns in .NET. - Official documentation Microsoft Learn.
Gamma E. Design Patterns 25 Years Later: An Interview and Retrospective. - ACM Queue, 2019.
Microsoft Learn. Implementing Design Patterns in C#. - Microsoft Learn Documentation. URL: https://learn.microsoft.com/en-us/dotnet/architecture/modern-web-apps-azure/common-web-application-architectures
Refactoring.Guru. Creational Design Patterns. - Online Software Design Patterns Guide. URL: https://refactoring.guru/design-patterns/creational-patterns
Downloads
Published
Issue
Section
License
Copyright (c) 2026 System technologies

This work is licensed under a Creative Commons Attribution 4.0 International License.









