Refactor code for a more readable codebase

Hi Nextcloud community!

I haven’t found any documentation or forum posts about Nextcould software architecture or intent to refactor it. If I missed the documentation on it feel free to forward it to me.

However, although I am still discovering the codebase, I seem to understand that it lacks readability and Unit tests, in some parts, seem to be much more used than feature or integration tests.

So my question is: is there any interest in refactoring the codebase to improve its maintainability? Are there some part of the team currently maintaining the codebase that could be interested by a Clean Architecture with a hybrid packaged by component and by feature approach? If the words “Clean Architecture”, “packaged by component and by feature” are not clear, would the team still be interested in refactoring the codebase to a different software architecture?

Thanks in advance!

Hey @Idan_Carta-Lag,

I assume, you are talking about the server code and not done specific app.

First, I am not affiliated with the core team. So, my information are only second hand. Just take them with care/as an opinion.

The core quality of the core was even worse in the past. In new features and interfaces, the core team enforces much more testing and documentation. The legacy parts however have not necessarily been touched. As a result, the code quality might be low or lower for these parts.
This gets even more critical as code maintenance “brings no money” directly and is thus often only seen as an optional operation (for old code) IMHO. I do not say that the company is not willing to do it. You just cannot refactor the code base without significant amounts of manpower.

Having said that, you might be willing to get in touch with the actual devs. They are typically not here in the forums but on GitHub. You can open an issue there and ask for opinion by the main devs.

Christian

Hi @Idan_Carta-Lag,

Please read the Code of Conduct. This document offers some guidance to ensure Nextcloud participants can cooperate effectively in a positive and inspiring atmosphere and to explain how together we can strengthen and support each other.

Please review the guidelines for contributing to the server repository.

More information on how to contribute: Contribute to Nextcloud server or apps

h.t.h.


ernolf

Hi @ernolf ,

Thank you for taking the time to forward me the documentation.

I wish you a great day,
Idan

Hi @christianlupus ,

Thank you for your thoughtful answer. Especially on a Saturday.

I have followed your advice and started an issue on GitHub.

I can easily imagine how people and organisations are often constrained by a budget. I am sure that a lot of people are actually sensible to software architecture and refactoring problematics and would see the idea of working on it favourably, while still being unable to do so.

I am still curious about how the idea will be received and if I could get it started somehow.

Thanks again and have a great weekend!

Idan