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.8k
Spring for the Architecturally Curious Developer
Oliver Drotbohm
November 09, 2022
Tweet
Share
More Decks by Oliver Drotbohm
See All by Oliver Drotbohm
What's new in Spring Modulith?
olivergierke
1
170
Domain-centric? Why Hexagonal, Onion, and Clean Architecture Are Answers to the Wrong Question
olivergierke
3
970
It Takes Two to Tango – Designing Module Interactions in Modulithic Spring Applications
olivergierke
5
750
Bottom-Up Architecture – Bridging the Achitecture Code Gap
olivergierke
4
980
Spring Modulith – A Deep Dive
olivergierke
8
4.6k
Spring Boot 3 & Spring Framework 6
olivergierke
4
2.1k
Architecturally-evident Java Applications with jMolecules
olivergierke
9
3k
A Deep Dive into Spring Application Events
olivergierke
12
3.4k
Building Better Monoliths – Modulithic Applications with Spring Boot
olivergierke
4
990
Other Decks in Programming
See All in Programming
社会人になっても趣味開発を続けたい! / traPavilion
mazrean
1
100
デミカツ切り抜きで面倒くさいことはPythonにやらせよう
aokswork3
0
260
マンガアプリViewerの大画面対応を考える
kk__777
0
250
バッチ処理を「状態の記録」から「事実の記録」へ
panda728
PRO
0
190
kiroとCodexで最高のSpec駆動開発を!!数時間で web3ネイティブなミニゲームを作ってみたよ!
mashharuki
0
910
他言語経験者が Golangci-lint を最初のコーディングメンターにした話 / How Golangci-lint Became My First Coding Mentor: A Story from a Polyglot Programmer
uma31
0
410
AI駆動で0→1をやって見えた光と伸びしろ
passion0102
1
840
スマホから Youtube Shortsを見られないようにする
lemolatoon
27
34k
Webサーバーサイド言語としてのRustについて
kouyuume
1
4.9k
monorepo の Go テストをはやくした〜い!~最小の依存解決への道のり~ / faster-testing-of-monorepos
convto
2
550
NixOS + Kubernetesで構築する自宅サーバーのすべて
ichi_h3
0
1.2k
SODA - FACT BOOK(JP)
sodainc
1
8.8k
Featured
See All Featured
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.5k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
9
930
How to Think Like a Performance Engineer
csswizardry
27
2.1k
The Cost Of JavaScript in 2023
addyosmani
55
9.1k
Fireside Chat
paigeccino
41
3.7k
Facilitating Awesome Meetings
lara
57
6.6k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.7k
What's in a price? How to price your products and services
michaelherold
246
12k
Producing Creativity
orderedlist
PRO
347
40k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
658
61k
For a Future-Friendly Web
brad_frost
180
10k
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