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
Sustainable SPA with DDD - The beginning of a w...
Search
Manfred Steyer
PRO
February 06, 2020
Programming
4
740
Sustainable SPA with DDD - The beginning of a wonderful friendship?
Manfred Steyer
PRO
February 06, 2020
Tweet
Share
More Decks by Manfred Steyer
See All by Manfred Steyer
Your Architecture as a Crime Scene:Forensic Analysis
manfredsteyer
PRO
0
81
Rethinking Data Access: The New httpResource in Angular
manfredsteyer
PRO
0
240
Reactive Thinking with Signals, Resource API, and httpResource @Devm.io Angular 20 Launch Party
manfredsteyer
PRO
0
150
JavaScript as a Crime SceneForensic Analysis
manfredsteyer
PRO
0
68
Modern Angular with Signals and Signal Store:New Rules for Your Architecture @jax2025 in Mainz, Germany
manfredsteyer
PRO
0
160
Premier Disciplin for Micro Frontends Multi Version/ Framework Scenarios
manfredsteyer
PRO
0
88
Your Architecture as a Crime SceneForensic Analysis
manfredsteyer
PRO
0
61
Live Coding: Migrating an Application to Signals
manfredsteyer
PRO
0
160
The Missing Link in Angular’s Signal Story: Resource API and httpResource
manfredsteyer
PRO
0
180
Other Decks in Programming
See All in Programming
Using AI Tools Around Software Development
inouehi
0
510
Perlで痩せる
yuukis
1
670
Development of an App for Intuitive AI Learning - Blockly Summit 2025
teba_eleven
0
100
型安全RESTで爆速プロトタイピング – Hono RPC実践
tacke_jp
0
110
無関心の谷
kanayannet
0
120
型付け力を強化するための Hoogle のすゝめ / Boosting Your Type Mastery with Hoogle
guvalif
1
250
『Python → TypeScript』オンボーディング奮闘記
takumi_tatsuno
1
150
REST API設計の実践 – ベストプラクティスとその落とし穴
kentaroutakeda
2
340
Babylon.js 8.0のアプデ情報を 軽率にキャッチアップ / catch-up-babylonjs-8
drumath2237
0
120
2度もゼロから書き直して、やっとブラウザでぬるぬる動くAIに辿り着いた話
tomoino
0
130
#QiitaBash TDDでAIに設計イメージを伝える
ryosukedtomita
2
1.6k
Devinで実践する!AIエージェントと協働する開発組織の作り方
masahiro_nishimi
6
2.8k
Featured
See All Featured
Scaling GitHub
holman
459
140k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.3k
GraphQLの誤解/rethinking-graphql
sonatard
71
11k
Java REST API Framework Comparison - PWX 2021
mraible
31
8.6k
Bash Introduction
62gerente
614
210k
Navigating Team Friction
lara
186
15k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
35
2.3k
Faster Mobile Websites
deanohume
307
31k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
6
640
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.3k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
42
2.4k
The Language of Interfaces
destraynor
158
25k
Transcript
@ManfredSteyer Sustainable SPA with DDD The beginning of a wonderful
friendship? angular-architects.io
What do we need for a good architecture? Experience
@ManfredSteyer Domain Driven Design
@ManfredSteyer How to create sustainable frontend architectures with ideas from
DDD? ?
@ManfredSteyer How to create sustainable frontend architectures with ideas from
DDD? ?
@ManfredSteyer Contents 1) DDD in a Nutshell 2) Monorepos 3)
Monorepos & DDD 4) DDD & Micro Frontends
@ManfredSteyer About me… • Manfred Steyer ANGULARarchitects.io • Angular Trainings
and Consultancy • Google Developer Expert (GDE) • Trusted Collaborator in the Angular Team Page ▪ 8 Manfred Steyer Public: Frankfurt, Munich, Vienna In-House: everywhere http://softwarearchitekt.at/workshops
@ManfredSteyer 1) DDD in a nutshell
@ManfredSteyer Domain Driven Design Strategic Design Tactical Design Decomposing a
System Design Patterns & Practices
@ManfredSteyer Domain Driven Design Strategic Design Tactical Design Decomposing a
System Design Patterns & Practices
@ManfredSteyer This is what Strategic DDD prevents
@ManfredSteyer Example e-Procurement System
@ManfredSteyer Catalog Approval Specification Ordering Example Sub-Domains
@ManfredSteyer 2) Monorepos
@ManfredSteyer Workspace
@ManfredSteyer Advantages No version conflicts No burden with distributing libs
@ManfredSteyer Moving back and forth Npm Registry
@ManfredSteyer https://nrwl.io/nx
@ManfredSteyer Visualize Module Structure
@ManfredSteyer 3) Nx Monorepos and Strategic Design
@ManfredSteyer Catalog Ordering Shared Feature Feature Feature Feature Feature UI
UI UI UI UI UI UI UI UI Domain Domain Domain Domain Domain Domain Util Util Util Util Util Util Enterprise Monorepo Patterns, Nrwl 2018: https://tinyurl.com/y2jjxld7 @ManfredSteyer Shared Kernel (if really needed) & other libs Smart Comp. Dumb Comp.
@ManfredSteyer Catalog Ordering Shared Feature API Feature Feature Feature Feature
UI UI UI UI UI UI UI UI UI Domain Domain Domain Domain Domain Domain Util Util Util Util Util Util @ManfredSteyer
@ManfredSteyer Catalog Ordering Shared Feature API Feature Feature Feature Feature
UI UI UI UI UI UI UI UI UI Domain Domain Domain Domain Domain Domain Util Util Util Util Util Util @ManfredSteyer
@ManfredSteyer Application Domain Infrastructure Isolate your domain! Domain e. g.
data access Use case specific facades, state management Entities, biz logic
@ManfredSteyer Alternatives to layering • e. g. Hexagonal Architecture, Clean
Architecture • Anyway: We need to restrict access b/w libraries
@ManfredSteyer DEMO
@ManfredSteyer BLOG ANGULARarchitects.io
@ManfredSteyer Finegrained Libraries • Unit of recompilation • Unit of
retesting • Access restrictions • Information Hiding
@ManfredSteyer Facades and State Management
@ManfredSteyer Facade (Application Service) @Injectable({ providedIn: 'root' }) export class
ProductFacade { […] }
@ManfredSteyer Facade (Application Service) @Injectable({ providedIn: 'root' }) export class
ProductFacade { public products: Product[] = []; […] } State!
@ManfredSteyer Facade (Application Service) @Injectable({ providedIn: 'root' }) export class
ProductFacade { public products: Product[] = []; constructor(private productService: ProductService) { } […] }
@ManfredSteyer Facade (Application Service) @Injectable({ providedIn: 'root' }) export class
ProductFacade { public products: Product[] = []; constructor(private productService: ProductService) { } search(category: string): void { […] } }
@ManfredSteyer Facade (Application Service) @Injectable({ providedIn: 'root' }) export class
ProductFacade { public products: Product[] = []; constructor(private productService: ProductService) { } search(category: string): void { […] } } SPA has to pull :-(
@ManfredSteyer Facade (Application Service) @Injectable({ providedIn: 'root' }) export class
ProductFacade { public products: Observable<Product[]>; constructor(private productService: ProductService) { } search(category: string): void { […] } } Also key for messaging
@ManfredSteyer App Home Catalog Search RatingFacade ProductFacade SearchFacade Facades Have
State
@ManfredSteyer App Home Catalog Search RatingFacade ProductFacade SearchFacade Facades Have
State
@ManfredSteyer App Home Catalog Search RatingFacade ProductFacade SearchFacade Facades Have
State Store (z. B. Redux/ NGRX) Observable Action
@ManfredSteyer Entities & Aggregates
@ManfredSteyer Entity/ Aggregate Root (OOP) public class BoardingList { private
int id; private int flightId; private List<BoardingListEntry> entries; private boolean completed; // Getters and Setters public void setStatus(int passengerId, BoardingStatus status) { // Complex logic to update status } }
FP und DDD?
@ManfredSteyer Entities (FP) export interface BoardingList { readonly id: number;
readonly flightId: number; readonly entries: BoardingListEntry[]; readonly completed: boolean; } export function updateBoardingStatus( boardingList: BoardingList, passengerId: number, status: BoardingStatus) { // Complex logic to update status }
@ManfredSteyer 4) Micro Frontends
@ManfredSteyer Catalog Ordering Shared Feature Feature Feature Feature Feature …
… … … … … … … … @ManfredSteyer e-Procurement App Deployment Monolith
@ManfredSteyer Catalog Ordering Shared Feature Feature Feature Feature Feature …
… … … … … … … … @ManfredSteyer Catalog App Ordering App Option 1: One App per Domain
@ManfredSteyer Catalog Ordering Shared Feature Feature Feature Feature Feature …
… … … … … … … … @ManfredSteyer Catalog App Ordering App Option 2: One Monorepo per Domain Publish shared libs seperately via npm Different Versions
@ManfredSteyer BLOG ANGULARarchitects.io
Summary • Slicing into sub-domains • Slicing into layers •
Finegrained libraries • Enforce restrictions • Fits to micro frontends
@ManfredSteyer
@ManfredSteyer Contact and Downloads [web] ANGULARarchitects.io [twitter] ManfredSteyer d Slides
& Examples Public: Frankfurt, Munich, Vienna In-House: everywhere http://softwarearchitekt.at/workshops