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
270
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
800
Bottom-Up Architecture – Bridging the Achitecture Code Gap
olivergierke
4
1.1k
Spring Modulith – A Deep Dive
olivergierke
9
5.2k
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
Coding at the Speed of Thought: The New Era of Symfony Docker
dunglas
0
4.5k
Linux Kernelの1文字のミスで 権限昇格ができた話
rqda
0
2.3k
Codex CLI でつくる、Issue から merge までの開発フロー
amata1219
0
300
Redox OS でのネームスペース管理と chroot の実現
isanethen
0
520
Ruby and LLM Ecosystem 2nd
koic
1
1.5k
AIと共にエンジニアとPMの “二刀流”を実現する
naruogram
0
120
条件判定に名前、つけてますか? #phperkaigi #c
77web
2
940
脱 雰囲気実装!AgentCoreを良い感じにWEBアプリケーションに組み込むために
takuyay0ne
3
430
iOS機能開発のAI環境と起きた変化
ryunakayama
0
140
Reactive ❤️ Loom: A Forbidden Love Story
franz1981
2
220
Codex CLIのSubagentsによる並列API実装 / Parallel API Implementation with Codex CLI Subagents
takatty
2
820
実践ハーネスエンジニアリング #MOSHTech
kajitack
7
5.6k
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
Agile that works and the tools we love
rasmusluckow
331
21k
Skip the Path - Find Your Career Trail
mkilby
1
94
Building Applications with DynamoDB
mza
96
7k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
Between Models and Reality
mayunak
3
260
Testing 201, or: Great Expectations
jmmastey
46
8.1k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
110
Documentation Writing (for coders)
carmenintech
77
5.3k
First, design no harm
axbom
PRO
2
1.2k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
91
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