layering your apps

Increasing Signal by Removing Noise

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

@barryosull

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

BY REMOVING NOISE

Noise type 1

input & output

Input & output

What goes in and what goes out

ports & adapters

Driver

Adapters

Driven

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

translation 

Domain and Library code must translate

translation 

Mapping your

libraries/Services

  • 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

Core

Domain

Application

Infrastructure

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

 

HTTP

Adapter

Application

 

Repositories

External Services

Domain

Core

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

conclusion

  • 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

Domain

Thank you

Made with Slides.com