Abstract:
This research aims to improve the maintainability and readability of a skin disease detection application through the implementation of clean code and design patterns. SkinPal, an image analysis application, faces several issues in its backend API, particularly in the maintenance and development process. The research began with a domain case analysis, followed by an assessment of existing maintainability and readability problems. Afterwards, clean code principles were mapped and used as the basis for the refactoring process using design patterns. Lastly, the evaluation phase is used to measure the improvements. Several issues were identified in the backend code, including the merging of business logic with data access, unclear variable names, and code duplication. A total of 10 classes and 18 functions had low maintainability scores, and most of the functions were difficult to read. The refactoring process successfully improved the maintainability to a high level, from an average score of 39.61 to 99.62, confirming a major enhancement in code quality compared to previous studies. In terms of readability, only one of six developers encountered difficulties in understanding the refactored code. Overall, the implementation of clean code and design patterns successfully improved maintainability and readability in SkinPal's backend.
Keywords:
Maintainability, Readability, Refactoring, Clean Code, Design Pattern