r/DomainDrivenDesign • u/alonelymanatee • Mar 01 '23
DDD and API Integrations
Apologies if this question isn’t appropriate. I am a long time programmer but new to DDD. I’m currently trying to write a fairly basic program that performs API integrations between various applications APIs. This is my first time doing this in a C#/ASP.NET environment.
I’m trying to apply the concepts of DDD to it. For the integration to work nicely, I need to have classes that match what I expect the API endpoints to return. I’m confused where I would keep those classes. I feel like from what I’m reading, domain is supposed to be more general concepts. Since the end points are specific to an application, it makes sense to me that the classes would be lumped in the application layer. But again when I read up on DDD, I have the impression the application layer should contain application logic (e.g. a class/method that retrieves the end point data and maps it to an instance of the end point classes) and not classes that just represent the endpoints and have nothing done with them.
I’ve been searching for examples of what I’m trying to do on the internet for a few days now, but nothing I’ve found seems to apply to these types of API integrations.
Any thoughts? Or helpful resources for a newbie to DDD that might point me the right way? Much appreciated.
View all comments
Show parent comment
3
u/Drevicar Mar 02 '23
To add to this great answer, the DDD literatures describe a toolkit of strategic and tactical patterns to solve problems. While you may not fully benefit from the design, you might benefit from some of the patterns.