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.7k
Spring for the Architecturally Curious Developer
Oliver Drotbohm
November 09, 2022
Tweet
Share
More Decks by Oliver Drotbohm
See All by Oliver Drotbohm
It Takes Two to Tango – Designing Module Interactions in Modulithic Spring Applications
olivergierke
4
480
Bottom-Up Architecture – Bridging the Achitecture Code Gap
olivergierke
4
790
Spring Modulith – A Deep Dive
olivergierke
7
3.9k
Spring Boot 3 & Spring Framework 6
olivergierke
4
1.9k
Architecturally-evident Java Applications with jMolecules
olivergierke
8
2.7k
A Deep Dive into Spring Application Events
olivergierke
12
3.1k
Building Better Monoliths – Modulithic Applications with Spring Boot
olivergierke
4
880
Spring HATEOAS – Hypermedia APIs with Spring
olivergierke
1
660
Building Better Monoliths – Modulithic Applications with Spring Boot
olivergierke
6
4.2k
Other Decks in Programming
See All in Programming
Zoneless Testing
rainerhahnekamp
0
120
これでLambdaが不要に?!Step FunctionsのJSONata対応について
iwatatomoya
2
3.7k
良いユニットテストを書こう
mototakatsu
8
2.4k
テスト自動化失敗から再挑戦しチームにオーナーシップを委譲した話/STAC2024 macho
ma_cho29
1
1.3k
PHPで学ぶプログラミングの教訓 / Lessons in Programming Learned through PHP
nrslib
2
260
선언형 UI에서의 상태관리
l2hyunwoo
0
160
Effective Signals in Angular 19+: Rules and Helpers @ngbe2024
manfredsteyer
PRO
0
140
見えないメモリを観測する: PHP 8.4 `pg_result_memory_size()` とSQL結果のメモリ管理
kentaroutakeda
0
360
103 Early Hints
sugi_0000
1
230
採用事例の少ないSvelteを選んだ理由と それを正解にするためにやっていること
oekazuma
2
1k
menu基盤チームによるGoogle Cloudの活用事例~Application Integration, Cloud Tasks編~
yoshifumi_ishikura
0
110
Refactor your code - refactor yourself
xosofox
1
260
Featured
See All Featured
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
For a Future-Friendly Web
brad_frost
175
9.4k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
A Tale of Four Properties
chriscoyier
157
23k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5k
Making the Leap to Tech Lead
cromwellryan
133
9k
Designing for humans not robots
tammielis
250
25k
The World Runs on Bad Software
bkeepers
PRO
65
11k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.4k
How GitHub (no longer) Works
holman
311
140k
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