We are talking about implementing Domain-Driven Design at my company, which sounds like a great step forward for us. That being said, I am left with a few questions after a couple of days of research. For reference, we are using a model that has: data, business logic, API, UI.
The biggest gap in my understanding is how to define the difference between the business layer and the UI layer. When I see the proposal laid out by the developers, it reads to me like we are making decisions based on the UI, which seems to be against the principle of DDD. They explained to me that I should think of the objects the UI needs as separate business objects. That didn't sit right with me, because it was essentially saying that any change we make in the UI with data(which is fairly often right now, as we get customers feedback) means we need to go through and update 3 layers always, and sometimes up to 4.
And thinking about that is what sparked me to ask this question. Why wouldn't we have direct EF Core access in the API layer, and then if we need to perform any business logic, send the data to a microservice(or business logic function) to get whatever needs to happen to it done. We have clear pieces of logic that exist in the business that aren't just creating a seemingly meaningless abstraction layer, that also needs to be used with different sets of data.
I get the idea behind abstraction for classes in code, but it seems to me like what the API layer is doing is filling the implementation layer for the code to use. It seems redundant to go back and create a second layer of abstraction, especially when it will mirror the first.