ArchitectureConference50min
How package encapsulation with Spring Modulith simplified our code
This talk explores the challenges of understanding large codebases and proposes refactoring from horizontal to vertical package structures. It demonstrates how Spring Modulith can enforce package boundaries and aid gradual adoption, offering practical refactoring tips to reduce dependencies and improve code maintainability through vertical slicing.
Jos RoseboomEasingYou
talkDetail.whenAndWhere
Thursday, October 9, 10:40-11:30
Room 5
Have you ever felt there is too much relevant code for your current task to fit into your brain? Resulting in some StackOverflow in your head: a brain explosion.
Multiple factors contribute to this, one of them being the package structure of the code. In this talk I will explain why we wanted to refactor our package structure from horizontal (grouped by technical role like ‘controller’, ‘service’) to vertical (grouped by subject like ‘order’, ‘product’). I will show you how Spring Modulith can restrict access between packages and how you can gradually introduce it. On top of that, I will show some refactorings that we often used to break dependencies.
After this talk you will know why vertically slicing your packages might be a good idea and how you can use Spring Modulith to help you with that.
Multiple factors contribute to this, one of them being the package structure of the code. In this talk I will explain why we wanted to refactor our package structure from horizontal (grouped by technical role like ‘controller’, ‘service’) to vertical (grouped by subject like ‘order’, ‘product’). I will show you how Spring Modulith can restrict access between packages and how you can gradually introduce it. On top of that, I will show some refactorings that we often used to break dependencies.
After this talk you will know why vertically slicing your packages might be a good idea and how you can use Spring Modulith to help you with that.
Jos Roseboom
Jos gets a smile on his face when he makes other people happy by letting a computer do what they don’t like to do. He has been trying to do so professionally for the past 16 years.
In his spare time, Jos likes to play tennis. He is a trainer/coach for kids playing the typical Dutch sport korfball.
In his spare time, Jos likes to play tennis. He is a trainer/coach for kids playing the typical Dutch sport korfball.

talkDetail.transcript.loginToSeeTakeaways
talkDetail.transcript.loginToSeeInsights
comments.speakerNotEnabledComments