16. Experience
● You look back on a recent project that went well
● You look at your choices and consider them the
cause of the project's success
● You tell other people to make the same choices.
25. Should you...
Use façades?
Use Yaml?
Write methods you can call with 0, 1 or 2 arguments?
Use middlewares?
Use PSR-7?
Over-engineer your project using hexagonal architecture?
35. Domain vs Infrastructure
● Model
(entities, value objects)
● Use cases
(application services)
● Interfaces for boundary
objects
● Framework-specific code
● Implementations for
boundary objects
● Web controllers, CLI
controllers, etc.
43. Examples
We have a TicketsController with a
buyTicket action. It gets the logged in user from
the session and gets the user's address from the
submitted form data.
53. Sources
● Alistair in the "Hexagone": https://www.youtube.com/watch?v=th4AgBcrEHA
● My upcoming book "Advanced Web Application Architecture"
https://leanpub.com/web-application-architecture/
● Nat Pryce, Steve Freeman - Growing Object-Oriented Software, Guided by Tests
● Vaughn Vernon - Implementing Domain-Driven Design (see the chapter about
Architecture)