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
Whoops! Where Did My Architecture Go?
Search
Oliver Drotbohm
April 05, 2013
Programming
2
370
Whoops! Where Did My Architecture Go?
Slides of my talk at BEDCon 2013 in Berlin, Germany.
Oliver Drotbohm
April 05, 2013
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
430
Bottom-Up Architecture – Bridging the Achitecture Code Gap
olivergierke
4
700
Spring Modulith – A Deep Dive
olivergierke
7
3.7k
Spring for the Architecturally Curious Developer
olivergierke
5
1.7k
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
870
Spring HATEOAS – Hypermedia APIs with Spring
olivergierke
1
650
Other Decks in Programming
See All in Programming
デプロイを任されたので、教わった通りにデプロイしたら障害になった件 ~俺のやらかしを越えてゆけ~
techouse
52
32k
リリース8年目のサービスの1800個のERBファイルをViewComponentに移行した方法とその結果
katty0324
5
3.6k
Streams APIとTCPフロー制御 / Web Streams API and TCP flow control
tasshi
1
290
レガシーな Android アプリのリアーキテクチャ戦略
oidy
1
170
Webの技術スタックで マルチプラットフォームアプリ開発を可能にするElixirDesktopの紹介
thehaigo
2
920
外部システム連携先が10を超えるシステムでのアーキテクチャ設計・実装事例
kiwasaki
1
230
Outline View in SwiftUI
1024jp
1
150
『ドメイン駆動設計をはじめよう』のモデリングアプローチ
masuda220
PRO
8
440
CPython 인터프리터 구조 파헤치기 - PyCon Korea 24
kennethanceyer
0
240
とにかくAWS GameDay!AWSは世界の共通言語! / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
1
550
推し活の ハイトラフィックに立ち向かう Railsとアーキテクチャ - Kaigi on Rails 2024
falcon8823
6
2.2k
JaSST 24 九州:ワークショップ(は除く)実践!マインドマップを活用したソフトウェアテスト+活用事例
satohiroyuki
0
260
Featured
See All Featured
Building Adaptive Systems
keathley
38
2.2k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Building an army of robots
kneath
302
42k
It's Worth the Effort
3n
183
27k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Being A Developer After 40
akosma
86
590k
Ruby is Unlike a Banana
tanoku
96
11k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
9
680
The Language of Interfaces
destraynor
154
24k
Fireside Chat
paigeccino
32
3k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Designing for humans not robots
tammielis
249
25k
Transcript
Whoops! Where did my architecture go? Approaches to architecture management
for Java and Spring applications Oliver Gierke
Oliver Gierke SpringSource Engineer Spring Data
[email protected]
olivergierke www.olivergierke.de
Background 5 years of consulting Lots of code reviews Eoin
Woods‘ talk on InfoQ
"If you think architecture is expensive, try no architecture.
Macro VS. Micro Architecture
Macro VS. Micro Architecture
Sample Code http://github.com/olivergierke/ whoops-architecture
Roadmap Divide and conquer Of layers and slices A plain
Java based approach
Architecture 101
Know your dependencies
Explicit / Visible dependencies
Granularity Modules Layers Vertical slices Subsystems
Granularity Java ARchive Package Class
Divide and conquer
Component
Component Single unit to understand
Component Single unit to change
Component Scope of risk of change
B A
B A
B Cost of separation A
B Definition and maintenance of dependencies A
B Smaller unit to understand A
B Reduced risk of change A
Of layers and slices…
None
None
Presentation Service Data Access
Presentation Service Data Access
Presentation Service Data Access
Presentation Service Data Access Account Customer Core
Presentation Service Data Access Account Customer Core
Presentation Service Data Access Account Customer Core
Layers Well understood Known to developers Less important to business
Slices Hardly understood New to developers Key for business req
Presentation Service Data Access Account Customer Core
"How to implement an architecture inside a codebase?
Architecture VS. Codebase
"How to implement an architecture inside a codebase?
"How to implement an architecture inside a codebase?
"How to maintain an architecture inside a codebase?
Code analysis JDepend Sonar
Demo
Sonargraph Formerly known as SonarJ
Demo
A plain Java based approach
"How far can we get with plain Java means only?
Presentation Service Data Access Account Customer Core
Packages
….layer.slice ….slice.layer ….slice
….web.core ….service.core ….repository.core
….core.web ….core.service ….core.repository
….core ….customer ….account
"Why the f#$k should I even care?
"Does it make a difference?
Dependency management
"You only need to manage, what you can refer to…
Layers first Leaks slice internals Lower layers visible to everyone
Slices first/only Start with package per slice Expose interfaces and
domain types Keep implementations private
Slices first/only Encapsulates business module Internals understood anyway
"Start with less packages and the least visibility possible…
Presentation Service Data Access Account Customer Core
Presentation Service Data Access Account Customer Core
Demo
Take-aways Know your dependencies On every granularity Start as strict
as possible Get lenient where necessary
Resources Spring Data JPA @ GitHub Sonargraph Blogpost
Thanks & credits Eoin Woods - Talk @ InfoQ Uwe
Friedrichsen - Slides @ Slideshare