layering your apps

Increasing Signal by Removing Noise

  • DDD Consultant/Trainer
  • Architect
  • Legacy Cartographer
  • PHP Dublin Organiser
  • DDD IE Organiser


Barry O Sullivan

About me

Hands on Session

  1. Map our inputs and outputs
  2. Map our libraries/services
  3. Discuss where concepts should belong

What we'd like to do

applying ddd

What usually happens

applying ddd

What gets in the way

applying ddd

Increase signal


Noise type 1

input & output

Input & output

What goes in and what goes out

ports & adapters





Hide details behind interfaces

Mapping your

inputs & outputs

  • 15 minute session
  • List all the inputs and outputs of your system
    • HTTP
    • Database
    • Messaging
    • etc. . . 

Noise type 2

translation between DSLs

Domain specfic languages (DSL)

"A domain-specific language (DSL) is a computer language specialised to a particular application domain."

Two types: External and Internal

Libraries are Internal DSLS


Domain and Library code must translate


Mapping your


  • 20 minute session
  • List all the libraries/services you use
    • DBAL lib
    • Template engine
    • Datetime lib
    • etc . . .
  • Where do they live currently?

Layering your app

Where should concepts belong

onion architecture





  • Domain details at centre
  • Implementation details at edge
  • Application coordinates
  • Dependencies point inward







External Services



onion architecture

Where do concepts belong 

  • 20 minute session
  • Takes the results of the last 2 sessions
  • Ask where they should belong?
    • Input/Output? 
    • Translation?
    • Is it actually infra/app/domain/core?
    • What would make your jobs easier?

next steps

We've removed a lot of noise;

now we focus on the signal.


  • Iterate on the language expressed by the interfaces
    • Do this with domain experts
    • Language should be domain focussed if possible
  • Iterate on domain concepts free from the noise
  • Concepts should begin to emerge naturally


  • Sometimes it's hard to see the forest for the trees
  • Discover the domain by removing unnecessary implementation details
  • Develop a language that allows communication and collaboration


Thank you

Layering Your Application: Increasing Signal by Removing Noise

By Barry O' Sullivan

Layering Your Application: Increasing Signal by Removing Noise

This is a small workshop that teaches developers DDD skills that will benefit them on a day to say basis. Rather than focussing on the tactical patterns (ValueObjects, Aggregates, Factories, etc . . .) we're instead going to focus on high level architecture and the various layers they can use. From this we can figure out where code belongs and how to structure our applications so that they're easier to understand and test. The workshop will be broken down into three parts: 1. Overview of an Onion Architecture and Ports and Adapters - What are your inputs and outputs? 2. Mapping the existing system - List out all the libraries, services, concepts used in your system, where do they live currently? 3. Separating the layers - Take the results above and categorise each of them, where do they belong? How would we layer them in an ideal world?

  • 809