Questions tagged [clean-architecture]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
-1
votes
0answers
20 views

Patterns for updates for other rows on a create of entity for an user?

Consider an entity that can have multiple rows for each user and it has a property that should be true for only one row for a given user. I am on the NoSQL database (AWS DynamoDB) On my service layer -...
3
votes
1answer
206 views

How to handle complex business logic permissions in the database?

I have a system in development and part of the system is how permissions are handled, business logic rules for this are very complex so after lots of trials, we couldn't fit them directly in the ...
1
vote
3answers
343 views

Do adapters get only called by usecases?

Suppose we have a layered architecture like onion architecture or clean architecture with three modules representing each layer: domain.py usecase.py databaseadapter.py The domain layer contains the ...
-1
votes
1answer
79 views

What is enterprise logic, business logic in clean archittecture?

I had go through jason taylor link. He mentioned that The Domain layer contains enterprise logic and types and the Application layer contains business logic and types. The difference is that ...
3
votes
1answer
143 views

Business logic on the client side of a modern web app

If we look at the typical software architecture guide, it will have the domain layer, application services, and UI, where domain layer contains the business logic. This is a nice clean separation ...
-3
votes
0answers
27 views

How VIPER design looks like for login flow and chat flow for chat like app in iOS?

I am developing a chat like app, and I am new to VIPER architectural design. I am stuck at the beginning of the implementation and app has to show login module if user has not Signed IN/UP, if user ...
1
vote
0answers
27 views

Socket.io behind api gateway

So the architecture I am currently working with, we have an api-gateway that gets all the requests and publishes them to our Eventsystem/ or directly to our essential services(auth, etc). Now we want ...
3
votes
1answer
138 views

Why dependency direction is determined by levels and not by change frequency?

Clean Architecture defines level as a distance from inputs and outputs. So Entities or business-objects are the highest level. What is a practical reason to make lower level dependent on higher level? ...
1
vote
1answer
169 views

Clean Code: How much architecture code should be written if architecture is supposed to be fluid

I watched a video series from Uncle Bob on Clean Code. He makes a few points on architecture which I both agree with but I believe could have clarification. From Uncle Bob: The Interactor is ...
0
votes
1answer
57 views

Moving authentication outside the domain layer

In discussion about an architecture decision that we do consider wrong and how exactly to address it, some lack of understanding on the matter arose. In dealing with authentication and authorization, ...
0
votes
1answer
36 views

Mutli tenant app with onion architecture and multiple presentations

Currently I started designing a new multi tenant SaaS application based on the onion architecture in C# Using a rest web API to expose my services and consume them on 3 platforms. Two web apps (one ...
1
vote
1answer
76 views

Clean Architecture: Can Use Cases Imply UI?

In the chapter "Business Rules" of his book "Clean Architecture", Robert C. Martin comments on the relationship between use cases and the UI: [...] the use case does not describe ...
3
votes
1answer
411 views

Clean Architecture use case testing

Use case interactors in the Clean Architecture consists of the application specific business rules. Interactors uses the Data Access Interface to fetch the required data from the data access layer. ...
1
vote
1answer
70 views

How to decide on abstraction level and entity definitions?

I am working on a hobby project of mine where I want to make an application to doing my personal finances. Just for learning. I am trying to adhere and implement best practices and patterns to learn ...
1
vote
0answers
53 views

Layers of validation for clean architecture in .Net Core web application

For a clean architecture where there is presentation layer (Javascript), web api layer, application/domain layer, infrastructure layer (EF Core ORM). Let's say it is an ATM system and the use case/...
0
votes
0answers
135 views

Adaptive/split server API - what's a good way to design it?

I'll try to describe the scenario using a Turn-based game (such as card game or somethin'), where Game is the server, and the actual player is a client. (hence using Client-Server architecture), I'm ...
0
votes
1answer
87 views

DDD and MediatR - where the Validation and Business Logic go

I'm trying to get to grips with Domain Driven Design and MediatR. A reaction to being involved with applications that favour Services for almost everything. I see so much value in DDD and I'm trying ...
0
votes
2answers
95 views

How to handle different types of errors in Clean Architecture?

So, in the process of creating a user there are 4 possible outcomes: Username is already taken Email is already taken Username is invalid Email is invalid Here is what I have in the controller for ...
1
vote
2answers
112 views

How to organize database access logic for the infrastructure and application layer when avoiding ORM tools?

I'm trying create a .NET Core project and followed some guides to create a basic architecture Jason Taylor - Clean Architecture with ASP.NET Core 3.0 Sample project Clean Architecture Template I'm ...
0
votes
2answers
70 views

How to implement an app with an actions toolbar?

Say I am creating an app which contains selectable components and a toolbar/action bar. Some tools work on selected components only, some work on all components together. Pretty standard stuff. I can ...
1
vote
0answers
32 views

Does my ASP.NET architecture implement DDD in a safe and future proof way?

I'm very new to DDD and sometimes confused by it because many people inside the DDD community tend to have very different approaches when it comes to implementation. I tried to summarize all what I've ...
0
votes
0answers
53 views

Clean architecture and state pattern

I am working in an GUI application that would work as follows: It will retrieve and save data from any of the following sources: A "Cloud Library": This library would get and save data to a cloud. ...
7
votes
2answers
279 views

Why can't Entities leave the inner layers in the Clean Architecture?

I was reading about the clean architecture, and I don't get this part: Don't use your Entity objects as data structures to pass around in the outer layers. Make separate data model objects for that. ...
1
vote
0answers
47 views

Identity and access management in Clean Architecture and MVC design

The application user has a lot of standard functionality we see in most applications. At a high-level, this includes some form of authentication, authorization, and session management. At a low-level, ...
-3
votes
1answer
43 views

In which layer should a `MailerInterface` be?

Speaking about DDD, in which layer should a hypothetical MailerInterface be? I know the implementation (or adapters) for each specific mail sender package should be in the infrastructure, but these ...
0
votes
1answer
47 views

Notify user in a event driven architecture

We have put in place an account service management : its reponsability is to let a user register is account, confirm his email, etc... We have put also in place a process layer that is reponsible to ...
-4
votes
1answer
36 views

How to decide what should be bounded context

I am trying to develop a demo application and confused while designing context. Let's say we have three entity and their properties User Id Email Todo Questions Answers Value ...
13
votes
1answer
5k views

Clean Architecture: Should each view have its own presenter and viewmodel?

I am still thinking about clean architecture and just ran into a question regarding the higher levels (Views and Presenters) I am posting Uncle Bobs picture first here that you remember what I am ...
3
votes
2answers
224 views

Architecture for real time updates from the data in file system

I am trying to revamp my legacy application to make it scalable and performant. Its current architecture is something like this Consider a short-lived script that gets invocated 500k+ times a day, ...
1
vote
1answer
416 views

Implementing clean architecture

I just read the book 'clean architecture' by Uncle Bob and really like the approach. But the big disappointment came when I tried to implement it in C#. I really hope you can help me with some ...
2
votes
1answer
77 views

Collect Data of different Modules inside a Monolith

During my first attempt of implementing an project with the "Clean Architecture" I try to implementation a job portal where I came across a problem concerning the communication between (hopefully) two ...
0
votes
3answers
114 views

Microservice should be an independent software unit - Up to which level?

I have read several times that a Microservice should be an independent software unit. But what does that mean exactly and is it really achievable for each business case? Does that mean that I can run ...
1
vote
3answers
119 views

How to design a stable API for a progress display function?

Task Description I need a way to wrap different types of progress bars in a way that an algorithm can update the progress without knowing about the exact implementation. The progress implementation ...
-1
votes
1answer
95 views

Clean Architecture: are repositories always needed?

I'm trying to apply Clean Architecture to a mobile Android App, but I still have some doubts about how to manage API calls. Currently, the classes are structured like this: View -> ViewModel -> ...
-3
votes
1answer
192 views

What is the simplest version of best practice application architecture for a backend in C# and ASP.NET Core WebAPI?

I know that in some contexts, best practice would be DDD, CQRS and EventSourcing, but in my case this would be too complicated of two reasons: My team is beginners, and we want them to be productive ...
0
votes
1answer
203 views

Android project, clean architecture and modular approach

I have this project with MVVM and clean architecture well implemented but I've decided to split it into modules. Right now I have: apimodule apimodule: with the retrofit dependencies app: with the ...
1
vote
0answers
58 views

Changing entities in Clean Architecture

I'm modeling the "Domain" Layer of "Clean Architecture" for an application that gets its data from an XML file when starts. The XML file looks like: <?xml version="1.0" encoding="UTF-8" ?> <...
6
votes
3answers
2k views

Difference between Domain Driven Design and Clean Architecture

I have been studying Clean Architecture (CA) by Robert C. Martin and have found it quite useful in promoting architectural standards for large applications. Through implementation of a case study, I ...
0
votes
1answer
60 views

How do I deal with multiple repositories for one aggregate?

Suppose I have in my domain model two aggregates: Dog and Cat. Dog is composed of DogName and DogFood. Cat is composed of CatName and CatFood. The repositories, however, are a PetNames API which ...
1
vote
1answer
113 views

Define input and output interfaces for each application layer

I want to create a multi-layered backend architecture with a REST layer and GraphQL layer later on. So let's say you would start with the basic layers controller, service, repository would it make ...
6
votes
3answers
199 views

Where to convert primitive types in meaningful types in Clean Architecture / Onion Architecture

The book "Implementing Domain Driven Design" (page 361) suggests to use special types to distinguish several kinds of IDs, e. g. using BookId(1) instead of just 1 of type Int or Long. In my Clean ...
2
votes
0answers
572 views

How & Should we use Clean Architecture in Front-end?

Just a little explanation: "I'm used to be a solo front-end developer in my company and using default folder-structure and way of coding which vue-cli provided, it is good for a solo developer and ...
2
votes
2answers
355 views

Uncle Bob's Clean Architecture - Dealing with anemic interactors, tiering, and front-end MVVM

Background In Uncle Bob's Clean Architecture, use case interactors are responsible for the orchestration of business objects to accomplish some user goal. As an easy example, an e-commerce application ...
2
votes
1answer
794 views

Clean architecture and Repository pattern

I'm working in a new project and I'm trying to use the Clean Architecture approach with Repository pattern. I'm using .net core 3, C#, Automapper, MediatR and Dapper. I have these layers: Domain (in ...
4
votes
3answers
548 views

Clean Architecture: Use case spanning multiple UI elements

So I'm currently trying to write a project using Clean Architecture. Its a Unity Engine project which doesn't make the task any easier. The Issue I'm running into however is much more basic and has ...
-2
votes
1answer
86 views

Is a good practice to create Interfaces for use case objects?

Are use case classes (application services on DDD or a.k.a. Facades) stable? Should controllers and listeners be coupled with interfaces at all?
-2
votes
1answer
39 views

Where should Service Providers live?

I'm in a dilemma that might look silly. Where should Service Providers live? On a dedicated Providers folder: - Providers - CarProvider.foo - UserProvider.foo - Cars - Car.foo - Users - User....
2
votes
2answers
77 views

Mantain same entity data in different layers

I'm trying to split the use of a business entity (e.g. a post) thought an application uses, trying to obtain a clean architecture So I will likely have: A class model, where the business logic lives ...
1
vote
2answers
184 views

Should a BDD feature be implemented by a one (and only one) clean architecture interactor?

TL; DR Given BDD documentation with features composed by several scenarios, should we: Create a single interactor per feature Create minor interactors per scenario, and composing the feature ...
2
votes
2answers
582 views

Clean Architecture - How to pass request data towards inner, domain level Use Cases?

Use Case Interactor: We can see it in this picture how does a request cross the layers until it reaches the Use Case Interactor. How does the controller pass the request towards the Use Case ...