Dear Fineract community, I've been thinking a lot about incoming PRs lately and how a lot of functionality is implemented around Loan management.
One of the hardest things about Fineract's maintainability is the amount of code it includes. I previously proposed Lombok to reduce the boilerplate code therefore reducing the size of baggage we're carrying around; but that's just one step. Another thing we have to be really careful with is how to increase (or at least keep) the maintainability of the system while still adding new functionality to it. As I said in the beginning, Loan management. It's vital to Fineract and a lot of code is there to support all the use-cases. Just to give you some rough idea around LOC for some classes: - Loan class, ~7000 lines - LoanWritePlatformServiceJpaRepositoryImpl, ~3500 lines - LoanApplicationWritePlatformServiceJpaRepositoryImpl, ~1800 lines And this was just the tip of the iceberg. There's a lot more functionality to come. I feel like if those go into these classes, especially into the Loan class, what's already difficult to maintain will be impossible to maintain. I propose to restrict ourselves from adding more functionality to the Loan class (and to other classes which are just too big) and extracting those new functionalities into new, small classes which will be easy to deal with. And in the meantime, we can start breaking down these huge classes as well into smaller pieces without the fear that it'll grow faster than we could handle. Slowly but surely we can achieve an easily maintained, (mostly) bug free and most importantly extensible system that will bring joy not only into the life of financial institutions, but to the developers. ;-) Let me know your thoughts. Best, Arnold
