Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Spring for the Architecturally Curious Developer
Search
Oliver Drotbohm
November 09, 2022
Programming
1.9k
5
Share
Spring for the Architecturally Curious Developer
Oliver Drotbohm
November 09, 2022
More Decks by Oliver Drotbohm
See All by Oliver Drotbohm
What's new in Spring Modulith?
olivergierke
1
300
Domain-centric? Why Hexagonal and Onion Architecture Are Answers to the Wrong Question
olivergierke
4
2k
It Takes Two to Tango – Designing Module Interactions in Modulithic Spring Applications
olivergierke
5
810
Bottom-Up Architecture – Bridging the Achitecture Code Gap
olivergierke
4
1.1k
Spring Modulith – A Deep Dive
olivergierke
9
5.4k
Spring Boot 3 & Spring Framework 6
olivergierke
4
2.1k
Architecturally-evident Java Applications with jMolecules
olivergierke
9
3.1k
A Deep Dive into Spring Application Events
olivergierke
12
3.5k
Building Better Monoliths – Modulithic Applications with Spring Boot
olivergierke
4
1k
Other Decks in Programming
See All in Programming
「OSSがあるなら自作するな」は AI時代も正しいか ── Build vs Adopt の新しい判断基準
kumorn5s
7
2.7k
PHPer、Cloudflare に引っ越す
suguruooki
2
200
Structured Concurrency, Scoped Values and Joiners in the JDK 25 26 27
josepaumard
1
150
KMP × Kotlin 2.3 - How Android Got Slower While iOS Builds Improved by 47%
rio432
0
200
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
450
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
390
Sans tests, vos agents ne sont pas fiables
nabondance
0
110
サーバーレスで作る、動画データ管理基盤
oyasumipants
0
190
Terraform言語の静的解析 / static analysis of Terraform language
wata727
1
150
ソフトウェア設計の結合バランス #phperkaigi
kajitack
0
510
実用!Hono RPC2026
yodaka
2
310
GitHubCopilotCLIをはじめよう.pdf
htkym
0
330
Featured
See All Featured
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
150
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
130
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.9k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
530
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.3k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.3k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
180
Everyday Curiosity
cassininazir
0
210
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.8k
From π to Pie charts
rasagy
0
180
How Software Deployment tools have changed in the past 20 years
geshan
0
33k
Transcript
SPRING FOR ARCHITECTURALLY CURIOUS DEVELOPERS Oliver Drotbohm
[email protected]
/ odrotbohm
None
Coming in 2023… Follow @mawspring on
The Domain
Orders Inventory Order Line items Stock Inventory items
Unfortunately, Post-its don't run in production…
Unfortunately, Post-its don't run in production… … except you work
at Miro.
None
None
Awesome! ! Now… what? "
Let's get started… src/main/java ….acme.myproject ….acme.myproject.domain ….acme.myproject.persistence ….acme.myproject.service ….acme.myproject.web
None
Let's get started… src/main/java ….acme.myproject ….acme.myproject.domain ….acme.myproject.persistence ….acme.myproject.service ….acme.myproject.web #$
via https://devopedia.org/cohesion-vs-coupling
Domain Based Structure Domain Based Boundaries via Dan North –
CUPID—for joyful coding Video cast episode @ Software Architektur im Stream (english)
src/main/java ….acme.myproject ….acme.myproject.customer ….acme.myproject.inventory ….acme.myproject.order Much better… %!
via https://devopedia.org/cohesion-vs-coupling
Web Business logic Data access @Repository Order Inventory … @Controller
@Service Verification? Testing? Documentation? Observation?
None
Sample code https://github.com/odrotbohm/arch-evident-spring
Demo time! &!
Error Scenarios Transactional Event Listeners
@EventListener @EventListener … @TransactionalEventListener @TransactionalEventListener … @Transactional Event Event Commit
Consistency boundary Spring bean Legend
Error scenarios
What if a transactional event listener fails? "
@EventListener @EventListener … @TransactionalEventListener @TransactionalEventListener … @Transactional Event Event Commit
Consistency boundary Spring bean Legend Publication lost! ) '(
Event Publication Registry
@TransactionalEventListener @TransactionalEventListener … Event @TransactionalEventListener … @TransactionalEventListener … Transaction Commit
Demo time! &!
Spring Modulith A convention to map modules to packages Simple
set of access rules and API to verify Test support to bootstrap modules Documentation support Observability support
Thank you! Questions? Oliver Drotbohm
[email protected]
odrotbohm Sample Code