lundi 22 mai 2023

Vertical Slice Architecture Feature Dependency

I am using clean architecture and DDD less than one year and currently looking to vertical slice architecture to organize my code more better but I have an important question here:

If I have features like this

  • getCart
  • getProfileInfo
  • getShippingAddress
  • getPaymentMethod

And now I need to implement a new feature called placeOrder and this feature depends on some other features like getCart, getProfileInfo, getShippingAddresss, getPaymentMethod, what should I do in that case, can I inject other features in placeOrder service, or should I duplicate the code in this feature to be self-contained?

Aucun commentaire:

Enregistrer un commentaire