Skip to content

PrΓ©sentation technique des applications

Ivan Gabriele edited this page Apr 24, 2024 · 31 revisions

Backend

Structure et nommage des fichiers

/
β”œβ”€β”€ config
β”œβ”€β”€ domain
β”‚   β”œβ”€β”€ entities
β”‚   β”‚   └── foo
β”‚   β”‚       └── Foo.kt
β”‚   β”œβ”€β”€ exceptions
β”‚   β”‚       └── FooException.kt
β”‚   β”œβ”€β”€ filters
β”‚   β”‚       └── FooFilter.kt
β”‚   β”œβ”€β”€ mappers
β”‚   β”œβ”€β”€ repositories
β”‚   β”‚   └── (I)FooRepository
β”‚   └── use_cases
β”‚       └── foo
β”‚           β”œβ”€β”€ dtos
β”‚           β”‚   └── FooDTO.kt
β”‚           └── CreateOrUpdateFoo.kt
β”œβ”€β”€ infrastructure
β”‚   β”œβ”€β”€ api
β”‚   β”‚   β”œβ”€β”€ adapters
β”‚   β”‚   β”‚   β”œβ”€β”€ bff
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ inputs
β”‚   β”‚   β”‚   β”‚   β”‚   └── foo
β”‚   β”‚   β”‚   β”‚   β”‚       └── CreateOrUpdateFooDataInput.kt
β”‚   β”‚   β”‚   β”‚   └── outputs
β”‚   β”‚   β”‚   β”‚       └── foo
β”‚   β”‚   β”‚   β”‚           └── FooDataOutput.kt
β”‚   β”‚   β”‚   └── publicapi
β”‚   β”‚   └── endpoints
β”‚   β”‚       β”œβ”€β”€ bff
β”‚   β”‚       β”‚   β”œβ”€β”€ FooController,kt
β”‚   β”‚       β”‚   └── BarControllerV[0-9].kt
β”‚   β”‚       └── publicapi
β”‚   β”‚           β”œβ”€β”€ FooController.kt
β”‚   β”‚           └── BarControllerV[0-9].kt
β”‚   β”œβ”€β”€ database
β”‚   β”‚   β”œβ”€β”€ models
β”‚   β”‚   β”‚   └── FooModel.kt
β”‚   β”‚   └── repositories
β”‚   β”‚       β”œβ”€β”€ interfaces
β”‚   β”‚       β”‚       └── (I)DBFooRepository.kt
β”‚   β”‚       └── JpaFooRepository.kt
β”‚   └── monitorenv/monitorfish/rapportnav
└── utils

Questions

  • Fichiers de config ? (opinion perso : tout dans un config/ au mΓͺme niveau que domain/ et infrastructure/).
  • MΓ©lange de diffΓ©rents types de nommage : parfois suffixes, parfois prefixes.
  • Confusion dans le nommage des repository domain et des repository infrastructure, mΓͺme chose pour les interfaces.
  • Versioning via de sous-dossier, des suffixes, des sur-dossiers ?
  • Acronymes all cap ou camel-cased ?
  • Remise en question des dossiers inputs/ et outputs/ dans le dossier adapters => pourquoi pas directement dans adapters ?
  • Suffixe des entitΓ©s (opinion perso : pas de suffixe).