Application Architecture
Iván Stepaniuk
@istepaniuk
Architecture,
the lost years
Robert C. Martin
“Web” is not an
architecture.
Frameworks are
not architecture.
Symfony is a tool,
not architecture.
Application metaphor, the three layers
1 32
WAIT!
What does this even mean?
1. Interact with the user, both ways
1 32
3. Interact with outside world, other systems
1 32
2. The code that justifies the app existence
1 32
Are these layers equally important?
Do we build them the same way?
Do these change at the same pace?
It is all about
CHANGE
OK
How does business logic look like?
Patterns
Enterprise
Application
Architecture
Martin Fowler
Transaction Script
Modeled as procedures
+ Easiest to understand.
+ Obvious transaction boundaries.
- Difficult to de-duplicate.
Table Module
Modeled as objects and Record Sets
+ No DB vs. OO impedance mismatch.
- Model is database-centric.
- Objects, but not really OO.
Domain Model
Modeled after the business you work with.
+ Real OOP, with all the OO advantages.
- Hard to switch to if used to think data.
- Code overhead for simple logic.
Domain Model
Modeled after the business you work with.
+ Real OOP, with all the OO advantages.
- Hard to switch to if used to think data.
- Code overhead for simple logic.
Which pattern should I use?
Which one should we use?
Efforttoenhance
Complexity of the business logic
Which one should we use?
Efforttoenhance
Complexity of the business logic
7.42
Which pattern does symfony follow?
Domain Model
Architecture
Antipatterns
Anemic Domain Model
- Objects have state, but no behavior
- The Business is somewhere else
Leads to:
- Upside down Transaction Script
- God objects
Anemic Domain Model
- Objects have state, but no behavior
- The Business is somewhere else
Leads to:
- Upside down Transaction Script
- God objects
Inheritance!
To extend behaviour
Application architecture
Table Driven Domain Model
- The data model is the domain model
- All objects backed up by a table
Leads to:
- High viscosity
- Complex, slow, fragile tests
- CRUD obsession
Table Driven Domain Model
- The data model is the domain model
- All objects backed up by a table
Leads to:
- High viscosity
- Complex, slow, fragile tests
- CRUD obsession
CREATE
READ
UPDATE
DELETE
DATABASE
DATABASE
DATABASE
DATABASE
Application architecture
Application architecture
Connected Domain Model
In a connected system, elements are highly available to each other.
Adding the first feature to a connected system is cheap …
… the cost of all those connections is that subsequent features
are very likely to interact with previous features, driving up the the cost …
In a modular design, connections are deliberately kept to a minimum.
The cost of the first feature is likely to be higher …
Features are less likely to interact in a modular system, though,
leading to a steady stream of features at relatively constant cost.
- Kent Beck
Connected Domain Model
WAIT!
OK, Active Record is bad, but
what about productivity?
Symfony vs. OOP
Symfony vs. OOP
Is not the debate here
Hexagonal Architecture
or Ports and Adapters
Domain boundaries
Entities Services
Values
Integration
Domain boundaries
Entities Services
Values
Integration
Hexagon
Entities
Services
Values
Hexagon
Entities
Services
Values
Controller
Entity
Manager
Mail system
Template
Form
Queue
Upstream
Service
Or layers again
1 32
Delivery Domain Infrastructure
Or layers again
1 32 Srv
ValuesController
Entity
Manager
Template
Form Queue
Upstream
Service
Entities
Delivery Domain Infrastructure
Questions?
Or come and ask me later!

More Related Content

PPTX
Why you shouldnt use django for that
PPT
Dev381.Pp
PDF
Hexagonal architecture - message-oriented software design (PHP Benelux 2016)
PDF
Hexagonal
PPTX
Implementing DDD Concepts in PHP
PDF
All the cool kids....
PDF
Hexagonal architecture - message-oriented software design
PDF
Api chaining(tm)
Why you shouldnt use django for that
Dev381.Pp
Hexagonal architecture - message-oriented software design (PHP Benelux 2016)
Hexagonal
Implementing DDD Concepts in PHP
All the cool kids....
Hexagonal architecture - message-oriented software design
Api chaining(tm)

What's hot (20)

PDF
BeAPI API Framework
PDF
The quest for global design principles - PHP Benelux 2016
PPTX
Code first approach in entity framework
PPTX
Oracle Database Interview Questions -PART 1 | sql, plsql, dbms, scenario base...
PDF
Object- Relational Persistence in Smalltalk
PDF
Clean architecture with ddd layering in php
PPTX
Entity Framework and Domain Driven Design
PPTX
Architecture Principles CodeStock
PDF
Concurrency basics
PPT
Fyp saufi
PDF
Advanced Application Architecture Symfony Live Berlin 2018
PPTX
REST != WebAPI
PDF
Domain-Driven Design with ASP.NET MVC
PDF
Elements of DDD with ASP.NET MVC & Entity Framework Code First
PPTX
Implementing DDD with C#
PDF
Actor model in F# and Akka.NET
PPTX
CQRS recipes or how to cook your architecture
PPT
soap toolkit
PPTX
.NET presentation
BeAPI API Framework
The quest for global design principles - PHP Benelux 2016
Code first approach in entity framework
Oracle Database Interview Questions -PART 1 | sql, plsql, dbms, scenario base...
Object- Relational Persistence in Smalltalk
Clean architecture with ddd layering in php
Entity Framework and Domain Driven Design
Architecture Principles CodeStock
Concurrency basics
Fyp saufi
Advanced Application Architecture Symfony Live Berlin 2018
REST != WebAPI
Domain-Driven Design with ASP.NET MVC
Elements of DDD with ASP.NET MVC & Entity Framework Code First
Implementing DDD with C#
Actor model in F# and Akka.NET
CQRS recipes or how to cook your architecture
soap toolkit
.NET presentation
Ad

Similar to Application architecture (20)

PDF
The JSON architecture
PPTX
Domain oriented development
PPTX
L07 Oranizing Domain Logic
PPTX
Life Beyond Rails: Creating Cross Platform Ruby Apps
PPTX
L13 Oranizing Domain Logic
ODP
Data massage! databases scaled from one to one million nodes (ulf wendel)
ODP
Front Range PHP NoSQL Databases
PDF
Architecture by Accident
ODP
Data massage: How databases have been scaled from one to one million nodes
PPTX
L23 Summary and Conclusions
PDF
Agile data lake? An oxymoron?
PPTX
Big iron 2 (published)
PDF
Document Based Data Modeling Technique
PDF
L15 Organising Domain Layer
PPTX
Java EE 7 with Apache Spark for the World’s Largest Credit Card Core Systems ...
PPTX
Let's talk about... Microservices
PPTX
Why mongo db was created - Dwight Merriman - MongoSF 2011
PDF
Super Sizing Youtube with Python
PDF
Os Solomon
PDF
Understanding and building big data Architectures - NoSQL
The JSON architecture
Domain oriented development
L07 Oranizing Domain Logic
Life Beyond Rails: Creating Cross Platform Ruby Apps
L13 Oranizing Domain Logic
Data massage! databases scaled from one to one million nodes (ulf wendel)
Front Range PHP NoSQL Databases
Architecture by Accident
Data massage: How databases have been scaled from one to one million nodes
L23 Summary and Conclusions
Agile data lake? An oxymoron?
Big iron 2 (published)
Document Based Data Modeling Technique
L15 Organising Domain Layer
Java EE 7 with Apache Spark for the World’s Largest Credit Card Core Systems ...
Let's talk about... Microservices
Why mongo db was created - Dwight Merriman - MongoSF 2011
Super Sizing Youtube with Python
Os Solomon
Understanding and building big data Architectures - NoSQL
Ad

Recently uploaded (20)

PPTX
Tech Workshop Escape Room Tech Workshop
PPTX
Cybersecurity: Protecting the Digital World
DOCX
How to Use SharePoint as an ISO-Compliant Document Management System
PPTX
Monitoring Stack: Grafana, Loki & Promtail
PDF
AI-Powered Threat Modeling: The Future of Cybersecurity by Arun Kumar Elengov...
PPTX
Advanced SystemCare Ultimate Crack + Portable (2025)
PPTX
Introduction to Windows Operating System
PPTX
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
PDF
DNT Brochure 2025 – ISV Solutions @ D365
PDF
DuckDuckGo Private Browser Premium APK for Android Crack Latest 2025
PPTX
"Secure File Sharing Solutions on AWS".pptx
PPTX
Trending Python Topics for Data Visualization in 2025
PDF
MCP Security Tutorial - Beginner to Advanced
PPTX
Computer Software - Technology and Livelihood Education
PDF
How AI/LLM recommend to you ? GDG meetup 16 Aug by Fariman Guliev
PDF
CCleaner 6.39.11548 Crack 2025 License Key
PDF
Visual explanation of Dijkstra's Algorithm using Python
PDF
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
PDF
iTop VPN Crack Latest Version Full Key 2025
PDF
Salesforce Agentforce AI Implementation.pdf
Tech Workshop Escape Room Tech Workshop
Cybersecurity: Protecting the Digital World
How to Use SharePoint as an ISO-Compliant Document Management System
Monitoring Stack: Grafana, Loki & Promtail
AI-Powered Threat Modeling: The Future of Cybersecurity by Arun Kumar Elengov...
Advanced SystemCare Ultimate Crack + Portable (2025)
Introduction to Windows Operating System
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
DNT Brochure 2025 – ISV Solutions @ D365
DuckDuckGo Private Browser Premium APK for Android Crack Latest 2025
"Secure File Sharing Solutions on AWS".pptx
Trending Python Topics for Data Visualization in 2025
MCP Security Tutorial - Beginner to Advanced
Computer Software - Technology and Livelihood Education
How AI/LLM recommend to you ? GDG meetup 16 Aug by Fariman Guliev
CCleaner 6.39.11548 Crack 2025 License Key
Visual explanation of Dijkstra's Algorithm using Python
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
iTop VPN Crack Latest Version Full Key 2025
Salesforce Agentforce AI Implementation.pdf

Application architecture