Slide 1

Slide 1 text

Naming in DDD “express your intentions in your code” @SepNamdar @KhaledSouf

Slide 2

Slide 2 text

Who we are? SEPEHR NAMDAR @SepNamdar @DDD_Iran @SHODOioFR

Slide 3

Slide 3 text

Who we are? KHALED SOUF @khaledsouf @SoCraTes_CA @Livifrance/@KRYcare @ScRomandie

Slide 4

Slide 4 text

‘There are only two hard things in Computer Science: cache invalidation and naming things.’ Phil Karlton @SepNamdar @KhaledSouf

Slide 5

Slide 5 text

What is the naming? ‘specify (a sum, time, or place) as something desired, suggested, or decided on’ Oxford languages @SepNamdar @KhaledSouf

Slide 6

Slide 6 text

Naming is @SepNamdar @KhaledSouf ● A team activity ● A set of rules ● A tool to communicate Collaborative Modeling

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

“A specification / title / index for a thing to understand what it does without going deep inside it.” our humble definition Naming is @SepNamdar @KhaledSouf

Slide 9

Slide 9 text

Why naming? ‘Programs are meant to be read by humans and only incidentally for computers to execute.’ Donald Knuth @SepNamdar @KhaledSouf

Slide 10

Slide 10 text

Why naming? @SepNamdar @KhaledSouf

Slide 11

Slide 11 text

How to name ? @SepNamdar @KhaledSouf “Conceptual Contour”

Slide 12

Slide 12 text

What is the intent ? @SepNamdar @KhaledSouf

Slide 13

Slide 13 text

What is the intent, now ? @SepNamdar @KhaledSouf

Slide 14

Slide 14 text

What is the intent, now ? What is the intent of the system (expressed as names) What are the use cases (expressed as verbs) All technical stuff @SepNamdar @KhaledSouf

Slide 15

Slide 15 text

Repository BookRepository BookCollection 1 2 Books 3 Suffix Repository Suffix Collection Plural Library 4 Domain term @SepNamdar @KhaledSouf

Slide 16

Slide 16 text

Repository BookRepository BookCollection 1 2 Books 3 Suffix Repository Suffix Collection Plural Library 4 Domain term @SepNamdar @KhaledSouf “Intention-Revealing Interfaces”

Slide 17

Slide 17 text

Repository Implementation BookRepositoryImpl MongoBooks 1 2 BookData 3 Suffix Impl Prefix Type Plural @SepNamdar @KhaledSouf

Slide 18

Slide 18 text

Repository Implementation BookRepositoryImpl MongoBooks 1 2 BookData 3 Suffix Impl Prefix Type Plural @SepNamdar @KhaledSouf

Slide 19

Slide 19 text

Repository Implementation BookRepositoryImpl MongoBooks 1 2 BookData 3 Suffix Impl Prefix Type Plural FakeBooks InMemoryBooks HttpBooks FileBooks @SepNamdar @KhaledSouf

Slide 20

Slide 20 text

Infrastructure Service RecruiterInfra or RecruiterMapping or RecruiterXXX Recruiters 1 2 RecruitersCalendar 3 Technical Suffix Plural Domain Term @SepNamdar @KhaledSouf

Slide 21

Slide 21 text

Infrastructure Service RecruiterInfra or RecruiterMapping or RecruiterXXX Recruiters 1 2 RecruitersCalendar 3 Technical Suffix Plural Domain Term @SepNamdar @KhaledSouf “Intention-Revealing Interfaces”

Slide 22

Slide 22 text

Application Service InterviewService PlanInterview PlanInterviewAction or PlanInterviewUseCase Suffix Service Domain Term Suffix Action/UseCase 1 2 3 @SepNamdar @KhaledSouf

Slide 23

Slide 23 text

Application Service InterviewService PlanInterview PlanInterviewAction or PlanInterviewUseCase Suffix Service Domain Term 1 2 3 @SepNamdar @KhaledSouf Suffix Action/UseCase

Slide 24

Slide 24 text

Domain Service PlanInterviewService InterviewPlanifier 1 2 Suffix Service Domain Term @SepNamdar @KhaledSouf

Slide 25

Slide 25 text

Domain Service PlanInterviewService InterviewPlanifier 1 2 Suffix Service Domain Term @SepNamdar @KhaledSouf

Slide 26

Slide 26 text

Naming smells @SepNamdar @KhaledSouf

Slide 27

Slide 27 text

1 - Make UL pronounceable @SepNamdar @KhaledSouf

Slide 28

Slide 28 text

2 - Incoherent names - addServer() - addReceiver() - addSatellite() - putSignal() @SepNamdar @KhaledSouf

Slide 29

Slide 29 text

3 - Technical names in Domain - class AbstractCar - List carList - class PlayerImpl @SepNamdar @KhaledSouf

Slide 30

Slide 30 text

4 - Mixing contexts Sourcing - Skills - Source of Contact Candidate @SepNamdar @KhaledSouf

Slide 31

Slide 31 text

4 - Mixing contexts Sourcing - Skills - Source of Contact Interview - Skills - Name - Experiences - Soft Skills @SepNamdar @KhaledSouf Candidate

Slide 32

Slide 32 text

4 - Mixing contexts Sourcing - Skills - Source of Contact Interview - Skills - Name - Experiences - Soft Skills Contracting - Name - Address - Social Number - Salary @SepNamdar @KhaledSouf Candidate

Slide 33

Slide 33 text

4 - Mixing contexts Sourcing - Skills - Source of Contact Interview - Skills - Name - Experiences - Soft Skills Contracting - Name - Address - Social Number - Salary @SepNamdar @KhaledSouf Candidate Candidate Candidate

Slide 34

Slide 34 text

4 - Mixing contexts Sourcing Someone found on a recruitment network with a CV that matches search criteria Interview Someone who should be evaluated by a technical recruiter Contracting Someone who passed his interview successfully and will be integrated to the company @SepNamdar @KhaledSouf Candidate Candidate Candidate

Slide 35

Slide 35 text

4 - Mixing contexts Sourcing - Skills - Source of Contact Interview - Skills - Name - Experiences - Soft Skills Contracting - Name - Address - Social Number - Salary Prospect Candidate Employee @SepNamdar @KhaledSouf Prospect Candidate Employee

Slide 36

Slide 36 text

7 - Translate Ubiquitous Language @SepNamdar @KhaledSouf

Slide 37

Slide 37 text

Domain Model Final word @SepNamdar @KhaledSouf Ubiquitous Language Expressed as Documentation Expressed as Conversation Expressed as Diagram Expressed as Code The Truth

Slide 38

Slide 38 text

‘if you want me to talk for 60 minutes, give me 5 minutes to prepare; if you want me to talk for 5 minutes, give me a few hours to prepare’ Vaughn Vernon - Domain-Driven Design Distilled @SepNamdar @KhaledSouf Final word

Slide 39

Slide 39 text

@SepNamdar @KhaledSouf Any question?

Slide 40

Slide 40 text

- https://www.digdeeproots.com/articles/naming-as-a-process/ - https://opus.ch/ddd-concepts-and-patterns-supple-design/ - https://opus.ch/ddd-concepts-and-patterns-supple-design-2/ @SepNamdar @KhaledSouf Resources

Slide 41

Slide 41 text

@SepNamdar @KhaledSouf نوﻧﻣﻣ