Components Reusability Optimization based on Re-Structure Monolithic Code
Zeyd Saeed1,* , Mustafa Ismael Khudair2, Ahmed Khader Ali Ibrahim3, Rahman Nahi Abid4
1Software Department, College of Information Technology, University of Babylon, Babylon 51001, Iraq
2College of Media, Al-Iraqia University, Baghdad, Iraq
3University Presidency, Department of Internal Affairs, University of Iraqia, Baghdad, Iraq
ā“College of Nursing, University of Babylon, Babylon 51001, Iraq
Emails: zeydsr.sw.phd@student.uobabylon.edu.iq; mustafa.i.khudhair@aliraqia.edu.iq , https://orcid.org/0009-0006-3984-1626; ahmed.kh.ali@aliraqia.edu.iq; rahmannahi@uobabylon.edu.iq; https://orcid.org/ 0000-0001-7491-4997
Abstract
In modern software engineering, monolithic code structures are increasingly incompatible with the flexibility demanded by today’s platforms. These tightly coupled systems pose challenges for scalability, integration, and secure deployment. This paper presents a method for restructuring monolithic Java classes into optimized, reusable software components. We analyze each class using 19 object-oriented metrics from the CKJM suite, evaluating cohesion and coupling properties. Using our proposed framework—Good Global Optimization Dynamic Weighted Metrics (GGODWM)—we cluster interrelated classes and transform them into high-level components suitable for microservice environments. These components are evaluated within a Component Base Redesign Structure (CBRS) environment to measure reusability. Our experimental results show a 52% improvement in cohesion and coupling balance, outperforming traditional Turbo_MQ-based metrics. By enhancing component modularity and reducing interdependencies, the proposed approach contributes to more secure and maintainable code, thus supporting cybersecurity goals such as reduced attack surface and easier vulnerability management.
Keyword: Software engineering; Metrics; Object-oriented programming (OOP)