HTTP Server
URL Router
View X
View Y
View Z
Model A
Model B
Database
HTTP
Function calls
Queries
The Monolith
Logic X, Y, Z
SPAGHETTI
HTTP Server
URL Router
View X
View Y
View Z
Model A
Model B
Database
URL Router
URL Router
Model A
Model B
Model B
Business Logic
Logic X
Logic Y
Logic Z
COPY PASTA
HTTP Server
View X
View Y
View Z
Model A
Model B
Database B
Model A
Model B
Model B
Logic X
Logic Y
Logic Z
Database A
HTTP Server
View X
View Y
View Z
Model A
Database B
Model B
Logic X
Logic Y
Logic Z
Database A
View
B
View A
DISTRIBUTED SPAGHETTI
Model A
Model B
Logic X
Logic Y
Logic Z
Logic X
Logic Y
Logic Z
Data
A
Data
B
Data
B
Data
A
Data
B
A pure function is a function that has the following properties:
No matter what language you work in, programming in a functional style provides benefits. You should do it whenever it is convenient, and you should think hard about the decision when it isn't convenient.
John Carmack
HTTP Server
View X
View B
Model A
Database B
Model B
Logic X
Database A
Data
A
Data
B