Reputation: 4651
An Infrastructure Service would be something like our IEmailSender, that communicates directly with external resources, such as the file system, registry, SMTP, database, etc. Something like NHibernate would show up in the Infrastructure.
Used to abstract technical concerns (e.g. MSMQ, email provider, etc)
a) are persistence objects ( ie Repositories / DAL ) also considered Infrastructure services ( according to the above quote they are )?
b) are all services that communicate with external resources and are not part of the primary problem domain ( ie removing them affects the application, but it doesn't affect the core domain problem ) considered Infrastructure services?
c) besides those services that communicating directly with the external resources, are there any other types of services which also fall under the umbrella of Infrastructure services?
thank you
Upvotes: 0
Views: 172
Reputation: 1736
Just use
Used to abstract technical concerns (e.g. MSMQ, email provider, etc)
as the main rule. Infrastructure service is something that hides underlying technology details. It's basically something that you'd change when you move from one technology to another (a particular mail client library; messaging queue implementation, data storage, logging routines, etc, etc up to entire .net framework and computer architecture).
So - repository/dal interfaces are part of domain as they construct objects from a persistent state. Their implementations (sometimes pluggable) are infrastructure part.
(And sorry but I assume b) and c) as more theoretical questions, which can be answered considering a particular application only).
Upvotes: 1