a tale of three architectures

17
A Tale of Three Architectures It was the best of times, it was the worst of times, it was the in between times… Charles and Mark, 1859/2017

Upload: mark-cheeseman

Post on 22-Jan-2018

47 views

Category:

Software


0 download

TRANSCRIPT

A Tale of Three Architectures

It was the best of times, it was the worst of times, it was the in between times…

Charles and Mark, 1859/2017

…you’re on ten here, all the way up, all the way up – you’re on ten on your guitar, where can you go from there? Nowhere, Exactly. What we do is, if we need that extra push over the cliff, you know what we do? Eleven.

Nigel Tuffnell, 1984.

Sometimes we think we are going to eleven, but actually we are just getting pushed over the cliff.

Mark Cheeseman, 2017.

•Transaction Script

•Anaemic Domain Model

•Domain Model

Turning it up to 11...

https://gist.github.com/hombredequeso/c2e5f77d9aac716376292defb7d9e1b8?ts=2

Escaping the Problems of Transaction Script

1. Focus on business operations, not data mutation.

Escaping the Problems of Transaction Script

2. Only allow objects in a valid state to come into existence.

Escaping the Problems of Transaction Script

3. Only mutate data in the context of an explicit business operation.

Escaping the Problems of Transaction Script

4. Severe the connection between business/domain model and database

Martin Fowler, Patterns of Enterprise Application Architecture

By Ktrinko - Own work, CC0, https://commons.wikimedia.org/w/index.php?curid=17169364

Public Domain, https://commons.wikimedia.org/w/index.php?curid=2139090

Presentation

Application

Data Access

Presentation ApplicationData

Access

Web Page

ApplicationData

AccessWeb API

FTP Directory

Web Controller

CoreBusinessDomain

Data

Access

API Controller

FTP Directory

File Source/Data Stream

Processor

Browser

App1 App2 App3

Vaughn Vernon, Implementing Domain Driven Design