ddd-infrastructure-lib
1.1.0
dotnet add package ddd-infrastructure-lib --version 1.1.0
NuGet\Install-Package ddd-infrastructure-lib -Version 1.1.0
<PackageReference Include="ddd-infrastructure-lib" Version="1.1.0" />
<PackageVersion Include="ddd-infrastructure-lib" Version="1.1.0" />
<PackageReference Include="ddd-infrastructure-lib" />
paket add ddd-infrastructure-lib --version 1.1.0
#r "nuget: ddd-infrastructure-lib, 1.1.0"
#:package ddd-infrastructure-lib@1.1.0
#addin nuget:?package=ddd-infrastructure-lib&version=1.1.0
#tool nuget:?package=ddd-infrastructure-lib&version=1.1.0
ddd-infrastucture-lib
Boiler plate code for the Infrastructure layer in a Domain Driven Design project. This library provides scaffolds with synchronous and asynchronous methods for:
- Abstraction of logging
- Data Access Objects (DAOs)
- Aspect Oriented Programming (AOP)
- Remoting
Goal of this library is to provide reusable and extendable code for common infrastructure tasks and to enable Domain Driven Design best practices. This is achieved by e.g. using Data Access Objects (DAOs) to abstract data access logic from the domain layer, allowing to switch between different data storage technologies without affecting the domain logic. When applied correctly, simply changing the derived classes should be enough. This way developers can start implementing with lean mocks that e.g. simply stored data in memory and later switch to more complex implementations that interact with real databases or remote services.
Content
For the scaffolds mentioned above, the library provides the following classes and interfaces.
Logging
Interfaces and classes for logging are located in the namespace com.schoste.ddd.Infrastructure.V1.Logging. The interfaces, classes and their concepts are used by other parts of the library (e.g., AOP aspects) and can also be used directly in the application code. This feature can be used in combination with Aspect Oriented Programming (AOP).
ILogger: An interface defining methods for logging messages with different severity levels (Info, Warning, Error).Log: An abstract class providing a singleton instance to the concrete implementation of theILoggerinterface. The actual logging implementation must be provided in a derived class and assigned to theInstanceproperty by implementing theLog.Initialize(ILogger logger)method.
Data Access Objects (DAOs)
Interfaces and classes for managing data access operations are located in the namespace com.schoste.ddd.Infrastructure.V1.DAL.
IDataAccessObject<T>: An interface defining synchronous and asynchronous CRUD operations for a generic typeT.DataAccessObject<T>: An abstract class implementing the management logic for theIDataAccessObject<T>interface. The actual implementation of data access logic (e.g., database interactions) must be provided in derived classes.
Aspect Oriented Programming (AOP)
Interfaces and classes for managing data access operations are located in the namespace com.schoste.ddd.Infrastructure.V1.Aspects. The AOP feature is enabled by creating objects via the com.schoste.ddd.Infrastructure.V1.Shared.Services.ObjectFactory class and attributes which implement the com.schoste.ddd.Infrastructure.V1.Aspects.IMethodAspect interface.
IMethodAspect: An interface defining methods for pre- and post-execution logic around method calls.LoggedAspect: An implementation for theIMethodAspectinterface to provide logging functionality. The logging information are written to any implementation of thecom.schoste.ddd.Infrastructure.V1.Logging.ILoggerinterface which is referenced bycom.schoste.ddd.Infrastructure.V1.Logging.Log.Instance.RemotedAspect: An implementation for theIMethodAspectinterface to enable remote method calls in a way, that makes the implementation seemingly similar to local method calls. The remote calls are handled by the implementation of thecom.schoste.ddd.Infrastructure.V1.Remoting.IRemotingClientinterface for the client side (caller / recipient of the method's return values) and thecom.schoste.ddd.Infrastructure.V1.Remoting.IRemotingServerinterface for the server side (callee / executor of methods).
Remoting
Interfaces and classes for managing remote method calls are located in the namespace com.schoste.ddd.Infrastructure.V1.Remoting. This feature uses the Aspect Oriented Programming (AOP).
IRemotingClient: An interface defining methods for invoking remote method calls synchronously and asynchronously.RemotingClient: An abstract class implementing the management logic for theIRemotingClientinterface. It handles the serialization of method parameters and and deserialization return values. The actual implementation of the communication logic (e.g., via HTTP, TCP, etc.) must be provided in derived classes.IRemotingServer: An interface defining methods for registering and handling remote method calls.RemotingServer: An abstract class implementing the management logic for theIRemotingServerinterface. It handles the deserialization of incoming method calls and the serialization of return values. The actual implementation of the communication logic (e.g., via HTTP, TCP, etc.) must be provided in derived classes.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.