Rethink your 
Architecture 
Marten Deinum
„I think there has been a general abandonment 
of good design and development practices in 
the Java community.” 
–Vaughn Vernon
„If you can't build a structured monolith, what 
makes you think microservices are the answer?” 
–Simon Brown
Architectural Crisis 
CQRS 
MVC 
DDD 
(S)EDA 
μServices SOA 
CBD 
Anemic Domain Model 
Layers/Tiers/Slices 
DCI 
Pipes and Filters 
Transaction Script
Software Architecture 
Software architecture isn’t about big design up front 
Every software team needs to consider software 
architecture 
The software architecture role is about coding, 
coaching and collaboration 
You don’t need to use UML 
A good software architecture enables agility 
–Simon Brown (Software Architecture for Developers)
Software Architecture 
„Architecture is like weather: you can’t have 
none” 
– Oliver Gierke
Software Architecture 
Domain 
Presentation 
Service 
Data Access 
Presentation 
Service 
Data Access 
DTO 
Domain
Software Architecture 
Presentation 
Service 
Data Access 
Presentation 
Service 
Data Access
Software Architecture 
Presentation 
Service 
Data Access 
Presentation 
Service 
Data Access
Software Architecture 
Presentation 
Service 
Data Access 
Presentation 
Service 
Data Access 
Presentation 
Service 
Data Access
Software Architecture 
Presentation 
Service 
Data Access 
Presentation 
Service 
Data Access 
Presentation 
Service 
Data Access
Big Ball of Mud
Layers 
biz.deinum.app.web 
biz.deinum.app.service 
biz.deinum.app.repository 
biz.deinum.app.domain 
biz.deinum.app.dto 
Presentation 
Service 
Data Access 
DTO 
Domain
Layers 
biz.deinum.app.service.module 
biz.deinum.app.module.service 
Presentation 
Service 
Data Access 
DTO 
Domain
Layers 
public interface UserService { … } 
public class UserServiceImpl 
implements UserService { … }
Layers 
public interface UserRepository { … } 
public class JpaUserRepository 
implements UserRepository { … }
“OOP to me means only messaging, local 
retention and protection and hiding of state-process, 
and extreme LateBinding of all things” 
– Alan Kay (2003)
Layers 
Presentation 
Service 
Data Access 
DTO 
Domain 
public interface UserService {…} 
public class UserServiceImpl 
implements UserService {…} 
public interface UserRepository {…} 
public class JpaUserRepository 
implements UserRepository {…} 
public class User { 
public User() {…} 
}
„We don’t build layered software, we have a 
couple of domains that interact.” 
– Russ Miles (2013)
Life Preserver Pattern 
Integration 
Core
Life Preserver Pattern 
Integration 
Core 
User 
Event 
web 
security 
ws
Slices 
biz.deinum.app.user 
biz.deinum.app.user.web 
biz.deinum.app.order 
biz.deinum.app.order.web 
biz.deinum.app.order.ws 
Presentation 
Service 
Data Access 
DTO 
Domain
Software Architecture 
Integration 
Core 
User 
Event 
web 
security 
ws
Reading List

Rethink your architecture - Marten Deinum