In my Application project I have INestedRequestObjectEncryptor interface, which is frequently used (in all endpoints), because it's used to decrypt requests and encrypt responses. Where should I put implementation of this interface in Clean Architecture? I think not in Infrastructure, because it's for data access. Also not in Core, because implementation needs to use external NuGet package, and Application layer should contain only Interfaces for other layers, as I read here: https://medium.com/dotnet-hub/clean-architecture-with-dotnet-and-dotnet-core-aspnetcore-overview-introduction-getting-started-ec922e53bb97. So where is the place for implementations like this?
Where to put implementation of frequently used interface in Clean Architecture
768 Views Asked by Szyszka947 At
1
There are 1 best solutions below
Related Questions in DOMAIN-DRIVEN-DESIGN
- How to use Interfaces in Domain Modelling DDD
- Domain driven design CQRS with multiple aggregates and bounded context
- Need more parameters in subclass overridden method
- Domain Driven Design: Aggregates Creating Aggregates
- How to deal with objects creation per request with high RPM node applications
- Async integration events needed sync
- In DDD where to handle interaction with external services that is part of business logic? In Domain Model or in Command Handler?
- How to split large time-related aggregates in DDD?
- One column with foreign key to multiple tables inf EntityFramework Core
- DDD & Clean Architecture: Why not define repositories in the application layer?
- Domain driven design: How to add a new database entry for an Aggregate?
- Integrate a versioning in aggregate
- when to pass args to the constructor of a service in ts?
- ASP.NET boilerplate module's dbcontext recreate abp main tables
- What's wrong with multiple entities in multiple bounded contexts pointing to the same identity?
Related Questions in CLEAN-ARCHITECTURE
- Inject a class into a composable function using hilt
- Handling related Room entities with Clean Architecture in a multi-module project on Android
- In clean architecture, is the presentation layer allowed to communicate directly with the infrastructure layer?
- Clean architecture/OOP and optimization: how to organize for classes with same logic
- Flutter Clean Architecture communication between Use Cases and Blocs
- How to merge one LiveData to another
- How to handle sync distributed transaction in microservices?
- Need clarification on the AuditableEntityInterceptor class of the Clean Architecture solution template for C#
- cannot be provided without an @Provides-annotated method. public abstract static class SingletonC implements MyApplication_GeneratedInjector error
- Where do I put business logic when implementing CQRS pattern using Mediatr in a .Net Clean Architecture application?
- How to split a package into two, where one contains a trait, the second contains the implementation of this trait for an foreign type
- How to use view and data framework in swift clean architecture
- Sonar showing condition always false error though it is not
- How to centralize and specialize error handling across different layers in a multi-layered architecture?
- DDD & Clean Architecture: Why not define repositories in the application layer?
Related Questions in INTERFACE-IMPLEMENTATION
- why can't we implement two interfaces that have methods with identical signature which one of them has a default implementation in java?
- How to implement C# interface in Python
- C# record and implement interface with nullable
- Issues implementing a check and erase on VBA coding for sells control
- Access Virtual Function In Interface Directly From Implemented Class
- Explicit Cast From Type to Not Implemented Interface Compiles but Fails in Runtime
- System.NotImplementedException after trying to run canvas.DrawText in .NET MAUI
- How to auto-generate an interface implementation in vscode
- Blazor component as partial class doesn't see implemented interface method from inside its view
- Return types not matching
- Implementing interfaces in a method using lambda (JAVA)
- How to use an interface where one module implements the functionality and another is calling it for the result in Kotlin
- ISupportInitialize in WinForms controls: explicit or implicit implementation?
- .NET Core - what is the best practice of implementing an interface due to conditions at runtime
- Where to put implementation of frequently used interface in Clean Architecture
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Here is a mental model to consider while getting to the solution:
If I am asked to change the application to have a Command Line Interface, will it cause the application/domain logic to change?
In your case,
INestedRequestObjectEncryptoris limited to drive request/response (HTTP interface) only. Even if it is accessing the data (which should be immutable and should be driven by domain logic), the purpose of this interface will strictly be limited toWeb/API.You can think of layering as follows:
UserUser(e.g. Consider Twitter, business logic can provide the capacity to create tweets, persist, and so on, while invariant violations for a tweet are handled by the domain while being created)
Web/APIare used to make the logic available to users. So they can use read entities, ask to change/update entities and provide the result to the end user(client).As I see this, even if
INestedRequestObjectEncryptoris accessing the data, it is limited to enabling theWeb/APIto work. It is not business logic.Obviously, I have little to no understanding of what your actual application is, I am only hoping to provide a mental model of thinking about interactions.