3 ms·
Martin Fowler’s website is a cornucopia of patterns that are conducive to gradually improving the architecture of large, sprawling codebases. Take the strangle
by BjoernKW 8y ago
Martin Fowler’s website is a cornucopia of patterns that are conducive to gradually improving the architecture of large, sprawling codebases. Take
the strangler pattern, for instance: https://www.martinfowler.com/bliki/StranglerApplication.html https://www.martinfowler.com/bliki/StranglerApplication.html
Any useful suggestions necessarily will have to remain at a pretty high altitude, though, simply because no two large applications are completely alike.
Other than that there are a few general principles and guidelines you might want to follow:
- the Boy Scout Rule: When you’re working on a particular piece of code and you see something weird or overly complex try to clean up the code. Start small while doing so. Don’t try to refactor everything at once.
- Before refactoring or otherwise introducing significant changes try to write unit tests that ensure the previous, expected behaviour still is present when you’re done with your refactoring.
- Having inherited a Java codebase (i.e. one written in a strongly rather than weakly typed language) probably will prove to be a boon further down the line. If you break something many errors will show up immediately during compilation and not just once the application is in production.
- This allows you to refactor relentlessly and make full use of the refactoring features of an advanced IDE such as IntelliJ IDEA.
Speaking of tools: You’ll want the best tools available to help you with this daunting task, i.e.
- state-of-the-art CI / CD
- IntelliJ IDEA Ultimate licences for every developer (or whichever IDE you prefer, just don’t try to be cheap at the expense of productivity)
- an automated code quality checking and code exploration tool such as SonarQube.