Category: api, api

Posted on Feb25th2021 by Matthias Noback If you're one of those people who make a separation between an application and a domain layer in their code base (like I do), then a question you'll often have is: does this service go in the application or in the domain layer?

I'm not going to write again about what the layers mean, but here is how I decide if a service goes into Application or Domain: Is it going to be used in the Infrastructure layer?

I want the Application layer to define a programming interface/API that can be used by the Infrastructure layer.

That is, it's not coupled to specific infrastructure, neither by code nor by the need for it to be available at runtime.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners