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
5
1.6k
Spring for the Architecturally Curious Developer
Oliver Drotbohm
November 09, 2022
Tweet
Share
More Decks by Oliver Drotbohm
See All by Oliver Drotbohm
Bottom-Up Architecture – Bridging the Achitecture Code Gap
olivergierke
3
160
Spring Modulith – A Deep Dive
olivergierke
7
2.2k
Spring Boot 3 & Spring Framework 6
olivergierke
4
1.8k
Architecturally-evident Java Applications with jMolecules
olivergierke
8
2.5k
A Deep Dive into Spring Application Events
olivergierke
12
3k
Building Better Monoliths – Modulithic Applications with Spring Boot
olivergierke
4
850
Spring HATEOAS – Hypermedia APIs with Spring
olivergierke
1
600
Building Better Monoliths – Modulithic Applications with Spring Boot
olivergierke
6
4k
REST Beyond the Obvious – API Design for Ever Evolving Systems
olivergierke
5
1.1k
Other Decks in Programming
See All in Programming
12年前の『型システム入門』翻訳の思い出話
mame
11
1.2k
今こそ始める、CDKコンストラクトライブラリ開発 ― 入門から実践まで
tmokmss
1
930
なぜ宣言的 UI は壊れにくいのか / Why declarative UI is less fragile
uenitty
29
13k
Findy - エンジニア向け会社紹介 / Findy Letter for Engineers
findyinc
2
81k
日付と正規化
megmogmog1965
0
140
実用的かつリーズナブルな 「Azure × Gemini × LINE」~キャラクターBot 実装ライブデモ~
tomodo_ysys
1
170
CSC307 Lecture 10
javiergs
PRO
0
310
AWSでゲームサーバーを運用! Amazon GameLiftのお話
iriikeita
0
200
CSC307 Lecture 13
javiergs
PRO
0
150
生成AIをkintoneに連携してみた
hideg
0
230
CSC307 Lecture 12
javiergs
PRO
0
220
20240706_CDKConf
takuyay0ne
0
1.2k
Featured
See All Featured
Java REST API Framework Comparison - PWX 2021
mraible
PRO
20
7.2k
Clear Off the Table
cherdarchuk
89
320k
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
105
6.8k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
What's new in Ruby 2.0
geeforr
338
31k
A better future with KSS
kneath
231
17k
How to Ace a Technical Interview
jacobian
274
23k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
34
1.9k
Faster Mobile Websites
deanohume
303
30k
Rebuilding a faster, lazier Slack
samanthasiow
78
8.5k
Creatively Recalculating Your Daily Design Routine
revolveconf
214
11k
Raft: Consensus for Rubyists
vanstee
134
6.5k
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