Skip to main content

Questions tagged [clean-architecture]

Clean Architecture is a book by Robert C. Martin that contains solutions to architecting software solutions. Collectively these concepts are referred to as "Clean Architecture".

Filter by
Sorted by
Tagged with
2 votes
2 answers
154 views

So I was reading Eric Evans DDD book and one point that was not clear to me is which Layer (in case of using Clean Code) should be reponsible to: define the interface contract for an Entity (...
Prometheus's user avatar
0 votes
0 answers
62 views

I have to extend a complex piece software and I wonder if I should make the changes directly "where they belong", or if I should try to not touch existing stuff and "plug-in" the ...
Stefan Woehrer's user avatar
0 votes
1 answer
168 views

(For context I am developing in Angular) Historically my applications have tended towards the layered architecture that the Angular fraemwork leads you into. However I feel that the next application I ...
royneedshelp's user avatar
0 votes
2 answers
338 views

I have a question about setting up my service. My main concern is if the design is clean and in order. Whether it meets the SOLID principles and does not spill out on me. I have entities like order ...
Petr Klekner's user avatar
5 votes
2 answers
1k views

I'm trying to get hands-on experience with Uncle Bob's Clean Architecture in Go, but I'm running into some issues. Also, I'm not yet familiar with all of Go's idioms. For testing purposes, I'm ...
Crite's user avatar
  • 61
2 votes
2 answers
2k views

I'm currently working on a large legacy project that tried to implement Clean Architecture combined with MVVM, but unfortunately didn't fully adhere to the principles. One major problem: The ...
developKinberg's user avatar
4 votes
1 answer
255 views

Let's say I'm making a space 4X game (because I am!) and I have an ISpaceObject interface in my domain layer, with a number of classes such as Ship, Starbase, Planet, Wormhole, etc. implementing it. I ...
ekolis's user avatar
  • 577
1 vote
2 answers
219 views

I'm curious to know your opinion on how to organize code in services and repositories in the context of a three-layer architecture (controllers - services - repositories). Let's say there is a User ...
Альберт Александров's user avatar
0 votes
3 answers
776 views

Repository interfaces are often defined in the Domain layer. This makes sense for command handlers, which call repository methods and return nothing. But what about query handlers that call repository ...
MrChudz's user avatar
  • 147
2 votes
2 answers
450 views

I'm working with a layered architecture and I'm unsure where to place the pagination logic. This answer suggests that it's not a domain concern, which I think makes sense. In most cases, pagination ...
Hadi Satrio's user avatar
2 votes
2 answers
785 views

For the last few days I'm searching any information about compatibility of JPA and Clean Architecture/DDD. I found next ideas for decoupling application from hibernate. Do not use @ManyToMany or @...
AndyFlight's user avatar
4 votes
5 answers
369 views

Everyone! While reading Chapter 23 of the book Clean Architecture, specifically the Presenters and Views section, I came across something rather unexpected where Uncle Bob states: Every button on the ...
Tozine's user avatar
  • 79
2 votes
2 answers
328 views

I’m studying Clean Architecture, and I came across a technical concept in the diagram from chapter 8. In this chapter, the author states that the Financial Data Mapper implements the Financial Data ...
Tozine's user avatar
  • 79
3 votes
1 answer
440 views

I'm starting a new project and I want to follow a Clean Architecture(ish) approach. I've modeled my projects in that manner (attached diagram). For the API I'm using FastEndpoint since I like it, it'...
developer82's user avatar
0 votes
1 answer
443 views

I’m currently creating a class diagram to develop an application following the “Clean Architecture” guidelines by Robert C. Martin. I’m unsure about how to structure the “Entity” component, ...
Idan Carta-Lag's user avatar
2 votes
1 answer
157 views

Should our api-response-to-domain-entity transform functions be in the API/Infrastructure layer, or the Domain layer? We have a react-native mobile application written in TypeScript. We have separated ...
Nick's user avatar
  • 29
2 votes
2 answers
528 views

We have a very complex and mature ASP.NET web application that is about 20 years old and has 5 million lines of code spread across roughly 30 project in a single monolithic solution. It's running on ....
Pavel's user avatar
  • 123
1 vote
2 answers
251 views

I'm going to ask this question using a concrete example. An optimal answer would take into account that this is just an example for the general problem. I'd like to implement a user management system ...
DarkTrick's user avatar
  • 286
0 votes
1 answer
239 views

I'm trying to decide how to hide data layer details (joinedload of sqlalchemy) in clean architecture. I have some dilemma about clean architecture. Please look at the code of some api endpoint (full ...
Альберт Александров's user avatar
-1 votes
3 answers
729 views

Generally, for a simple project: how do you move from 3-tier architecture to clean architecture? What I'm trying to do here is to get a feedback on how would the developer which understands 3-tier ...
OzrenTkalcecKrznaric's user avatar
1 vote
3 answers
353 views

I'm currently designing a multi-layered application and am trying to figure out the best practice for error handling within the Business Logic Layer (BLL). Should I handle errors directly within the ...
Marko Sami's user avatar
1 vote
1 answer
359 views

I'm developing an api in Fast API using sqlalchemy to manage my ORM classes and operations with the database. I'm dealing with some design decisions to have my classes as little coupled as possible ...
Alejo Villores's user avatar
0 votes
1 answer
421 views

In Uncle Bob's Clean Architecture, he provides the following diagram: This diagram is used for discussing the Open-Closed Principle (OCP). I understand that the interface Financial Report (FR) ...
neuralcoral's user avatar
0 votes
0 answers
107 views

I reproduced a small example of kerkour's Rust Clean Architecture on the Rust Playground. The code is just an example and the methods code makes no sense at all. This architecture leaks DB information ...
Fred Hors's user avatar
  • 139
1 vote
1 answer
155 views

I am developing an Android application trying to comply with Uncle Bob's clean architecture. User interface has a text and a button. Button triggers a usecase (TextToSpeechUseCase) from viewmodel. ...
iAmTryingToBeAnAndroidDev's user avatar
0 votes
1 answer
317 views

I am trying to apply Robert Martin's Clean Architecture on my .NET project. In one of chapters about boundary, it talks about that database interface should reside in business logic component rather ...
Afshar's user avatar
  • 223
3 votes
2 answers
751 views

Does the mediator pattern add any value beyond dependency injection? I am encountering the mediator pattern for the first time in context of this sample application, which is meant to demonstrate how ...
jpaugh's user avatar
  • 239
1 vote
2 answers
300 views

I’m trying to follow the Clean Architecture and CQRS within an application that, let’s say, create a product. To achieve this, the application has 3 adapters, one for reading a file, another for ...
Vithor Escames's user avatar
0 votes
0 answers
178 views

To understand DDD better, I am trying to create the Domain Layer of an online class application. I have a concept of a Student, Tutor and Session. I thought of having one aggregate called Session and ...
Mush-A's user avatar
  • 109
5 votes
4 answers
973 views

I'm reading the book "Clean Architecture" from Robert C. Martin and there is something that has been puzzling me in most parts of the book. When the author introduces the term "...
naggety's user avatar
  • 160
0 votes
1 answer
237 views

We are implementing an application by trying to follow the Clean Architecture template for C#. Our application is an ASP.NET core web api and we want to implement the observability for that ...
Enrico Massone's user avatar
1 vote
1 answer
521 views

We have a .net core app with the following folder / onion structure: WidgetApp -> Core -> Application -> JobAutoStarter -> JobAutoStarter.cs WidgetApp -> Core -> Domain -> ...
dot's user avatar
  • 581
1 vote
1 answer
141 views

I'm writing a pretty common Symfony web application, in which HTML is server side rendered (it's not an SPA application). To illustrate my question, let's take a pretty common fictional eshop ...
sgt-hartman's user avatar
-3 votes
1 answer
303 views

Cricket scoring is complex and I want to build an app in part to practice good design principles/patterns and develop a clean solution. A few high level classes I have in mind are: Match | Innings | ...
zadane's user avatar
  • 407
3 votes
4 answers
2k views

We're working on a new project (backend, API), following the "clean code" and "clean architecture" principles (described in Robert Martin's books), dividing our application into ...
LNK's user avatar
  • 139
1 vote
2 answers
231 views

I'm working on a project with the task of creating a route to checkout ticket purchases for events. In this scenario, I have a controller that receives the request with order data, client information, ...
Victor Antunes B.'s user avatar
0 votes
1 answer
455 views

I'm studying architecture patterns and I don't understand which type of scenario is more preferable to use clean architecture or hexagonal architecture. Is there something like that? For example, &...
CaioSousa's user avatar
6 votes
2 answers
4k views

I have been reading about clean architecture and following Domain-Driven Design. In all the examples I have found, the interfaces of the repository are defined in the domain. However, it is in the ...
Álvaro García's user avatar
0 votes
2 answers
699 views

I am told everywhere that entities are only to represent the data structure, then entities should be mapped to a model and then the model possibly to a DTO. The other way is similar, DTO -> model -&...
Gersalom's user avatar
-1 votes
2 answers
1k views

I'm currently implementing clean architecture in my project. My application includes various types of communication protocols (TCP, HTTPS, etc.) implemented in the infrastructure layer. These ...
Shady Shahin's user avatar
2 votes
2 answers
595 views

I'm refactoring a common web app (not spa but traditional server side html rendering). The design/code organization follows more or the less the Clean architecture concepts (ie: controller calls a use ...
sgt-hartman's user avatar
3 votes
2 answers
761 views

I'm a novice in architecture. Now I’m reading Clean Architecture and I don’t understand one thing. I'm wondering at what stage should I create components? Before any design or when I already have some ...
user avatar
1 vote
3 answers
483 views

I've been working at this company for about a year now. it's a growth company working in B2B. I'm one year out of university, with a major in computer science. I work in the web team, using an Angular ...
Jeremaia Scott's user avatar
0 votes
1 answer
145 views

I have an app with "clean architecture" classic layers: Ports (such as HTTP, GRPC, GRAPHQL resolvers) Services (CRUD methods and others) Adapters Domain My app has of course multiple &...
Fred Hors's user avatar
  • 139
2 votes
3 answers
946 views

I am pretty new to async programming and the whole stream stuff, since i have a web programming background with php, where async programming and streams isn't really a big topic most time. I try to ...
Jim Panse's user avatar
  • 408
0 votes
1 answer
185 views

I am going back and forth on an aspect of our FluentValidation and MediatR pipeline behavior implementation. We receive requests which, in a Mediator pattern, are mapped to command or query objects, ...
BJ Safdie's user avatar
  • 103
-2 votes
1 answer
124 views

About formatting Here are two scenarios in which the details of the formatting are described. How should in the clean code way, this be formatted Scenario 1: Dependent functions of dependent functions ...
user13047397's user avatar
13 votes
4 answers
5k views

Let's say that I have a class called Mission. This class is intended to represent a mission requested by a professor working in a faculty. Mission has a private enum field representing whether the ...
Mehdi Charife's user avatar
0 votes
2 answers
642 views

I'm fairly new at system architecting and I'm looking for some advice. My company is revamping its order management system. Currently is a monolith system that scales very poorly and is difficult for ...
ArcSpark76's user avatar
1 vote
1 answer
673 views

I'm currently in the process of integrating Clean Architecture into my Spring Boot project and I'm seeking advice on the ideal project structure and the types of classes and projects that should be ...
shiningStar's user avatar

1
2 3 4 5 6