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
Architektura, która pomaga!
Search
Matt Stasch
November 25, 2016
Programming
0
560
Architektura, która pomaga!
My presentation from FutureDevDay 2016
Matt Stasch
November 25, 2016
Tweet
Share
More Decks by Matt Stasch
See All by Matt Stasch
Monads in .NET
mat3u
0
420
HATEOAS dla ludzi!
mat3u
0
480
Domain Events - czyli jak radzić sobie z rzeczywistością!
mat3u
1
880
Rx 101
mat3u
0
820
F# 101
mat3u
0
760
Prosta architektura dla nieprostego systemu
mat3u
1
790
Other Decks in Programming
See All in Programming
Team operations that are not burdened by SRE
kazatohiei
1
280
Benchmark
sysong
0
280
A2A プロトコルを試してみる
azukiazusa1
2
1.3k
AWS CDKの推しポイント 〜CloudFormationと比較してみた〜
akihisaikeda
3
320
すべてのコンテキストを、 ユーザー価値に変える
applism118
2
980
今ならAmazon ECSのサービス間通信をどう選ぶか / Selection of ECS Interservice Communication 2025
tkikuc
20
3.8k
たった 1 枚の PHP ファイルで実装する MCP サーバ / MCP Server with Vanilla PHP
okashoi
1
220
PostgreSQLのRow Level SecurityをPHPのORMで扱う Eloquent vs Doctrine #phpcon #track2
77web
2
410
“いい感じ“な定量評価を求めて - Four Keysとアウトカムの間の探求 -
nealle
0
230
High-Level Programming Languages in AI Era -Human Thought and Mind-
hayat01sh1da
PRO
0
630
技術同人誌をMCP Serverにしてみた
74th
1
450
Google Agent Development Kit でLINE Botを作ってみた
ymd65536
2
210
Featured
See All Featured
Why Our Code Smells
bkeepers
PRO
337
57k
Statistics for Hackers
jakevdp
799
220k
How to train your dragon (web standard)
notwaldorf
94
6.1k
KATA
mclloyd
30
14k
The Pragmatic Product Professional
lauravandoore
35
6.7k
Code Reviewing Like a Champion
maltzj
524
40k
Unsuck your backbone
ammeep
671
58k
Navigating Team Friction
lara
187
15k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
53
2.8k
Building Applications with DynamoDB
mza
95
6.5k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
138
34k
Transcript
Architektura, która pomaga! Mateusz Stasch
Mateusz Stasch @mattstasch http://mattstasch.net
PROJEKT IT
None
Źródło: CNN
UI Backend DB
SPA Backend DB Mobile
Backend SPA Mobile
Backend EF SPA Mobile
Backend DB SPA Mobile
DB A P I RESTish SPA Mobile
DB Command A P I SPA Mobile
DB Command Events A P I SPA Mobile
DB Command Events Queries A P I CQS SPA Mobile
CQRS
DB Zmiana WSP Skutki Odczyt A P I SPA Mobile
DB Zmiana WSP Skutki Odczyt A P I SPA Mobile
DB Zmiana WSP Skutki Odczyt A P I SPA Mobile
DB Zmiana WSP Skutki Odczyt A P I SPA Mobile
Zmiana
Mobile
Mobile Agreement Resource Agreement Resource
Mobile Diff Skutki
Mobile Create Approve
Zmiana
Domena
Domena
Domena Command
Domena Command Event Event
Domena Command Event Event API T Event
C : ApproveAgreement E : AgreementApproved EH : AgreementNotificationHandler EH
: SupersedeAgreementHandler EH : AgreementMailHandler
Skutki
class AgreementAuditLog : IHandle<AgreementApproved> { // ... public void Handle(AgreementPublished
@event) { // ... } }
class AgreementAuditLog : IHandle<AgreementApproved> { // ... public void Handle(AgreementPublished
@event) { // ... } }
class AgreementMailHandler : IHandle<AgreementApproved> { // ... public void Handle(AgreementApproved
@event) { MailService.Send(); } }
Manager Facade DB API Service
AgreementApproved
AgreementCreated AgreementConditionsChanged AgreementApproved AgreementSuperseded AgreementArchived
AgreementCreated AgreementConditionsChanged AgreementApproved AgreementSuperseded AgreementArchived mstasch jkowalski jkowalski system mstasch
2016/01/05 12:34:34 2016/01/05 14:35:28 2016/01/07 10:04:10 2016/06/01 14:12:34 2017/01/01 00:00:50
Manager Facade DB API Service
Odczyt
Mobile
Mobile
Mobile Cache
Mobile Cache
Architektura daje klocki na właściwym poziomie abstrakcji
Źródło: Widmann SRL
Źródło: Wikimedia
Źródło: Wikimedia
SPA DB Command WSP Events Queries A P I CQS
if (user.Roles.Any(RolesHelper.IsAdministrator) && agreement.status == AgrementStatus.Active) { // ... }
if (user.roles.some(roleHelper.isAdministrator) && agreement.status === "Active") { // ... } ... .Where(agr => agr.Owner == user.Id && agr.Editors.Contains(user.Id)) ...
SPA DB Command Events Queries A P I S S
S S
WSP SPA DB Command Events Queries A P I CQS
T
Resource W S P
Resource W S P Resource Allowed Operations
Resource Resource W S P Allowed Operations "AllowedOperations": { "CanEdit":
false, "CanApprove": true, "CanReject": true, "CanUploadContract": false, ...
WSP SPA DB Command Events Queries A P I T
S
Security
Hypermedia
Po co to komu?
Nie myśleć…
None
Nie myśleć… … o tym co nie jest esencjonalną wartością
biznesową
To jest UX dla programistów Żółw „ ”
Pytania?
Dzięki! Mateusz Stasch