Skip to content
/ yaacu Public

slices, clean architecture, runtime dependencies example

License

Notifications You must be signed in to change notification settings

ameros/yaacu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

Yet Another Architecture Clean Up

slices, clean architecture, runtime dependencies (inversion & || externalization) example

Slices first

Classified Ads is sample domain. First context is Realestate. So:

  • com.example.classifieds.realestate.campaign
  • com.example.classifieds.realestate.advertisement
  • com.example.classifieds.realestate.exposure

Then layers

Domain:

  • com.example.classifieds.realestate

Persistence:

  • com.example.classifieds.realestate.repositories

Use Cases:

  • com.example.classifieds.realestate.commands

Interactors:

  • com.example.classifieds.realestate.handlers

Abstraction first

  • Repositories in the domain are interfaces
  • Handlers in use cases are interfaces

Then dependencies

  • Persistence implements domain repositories
  • Interactors are implementation of use cases' handlers; depend on domain but not on persistence

Experiment

  • Each detail (implementation) can be considered as runtime dependency for higher level
  • Infrastructure can be considered as orbit with satellites
  • Layers are glued with help of satellites into application

About

slices, clean architecture, runtime dependencies example

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages