1,249 questions
2 votes
1 answer
57 views
Validator access to database
My question is how do I need to validate fields. I have this class (request dto): public class CompleteGoogleRegistrationRequest { public string IdToken { get; set; } = string.Empty; public ...
-3 votes
1 answer
84 views
Should one service call another service or use the repository directly? [closed]
I'm learning Clean Architecture and I can't figure this out. Imagine this scenario: I have a ServiceA that calls its repository: public class ServiceA : IServiceA { private readonly IRepositoryA ...
Best practices
0 votes
1 replies
64 views
Hexagonal vs Clean vs Onion Architecture — Which Is Truly the Most Solid?
In your experience, which software architecture can be considered the most solid and future-proof for modern systems? Many developers highlight Hexagonal Architecture for its modularity and decoupling,...
Best practices
0 votes
1 replies
44 views
How should shared DTOs be managed across API, Application, and Frontend layers in a .NET 9 Clean Architecture project?
I’m working on a .NET 9 Clean Architecture solution with the following structure: API – ASP.NET Core Web API (.NET 9) Application – Application services and business logic Domain – Core domain ...
Best practices
0 votes
0 replies
40 views
SwiftUI Header in UIKit + ViewModifier vs. If Logic — Feedback?
I’m gradually migrating our screen from UIKit to SwiftUI, and the first step is using a SwiftUI SearchBar as the header inside a UIKit table view. • The rest of the screen is still UIKit, and we’re ...
1 vote
2 answers
103 views
mapstruct generated implementation cannot find imported class in multi-module Spring Boot project
I am using clean architecture and have 3 modules: application -> details -> core I'm trying to use Mapstruct to generate mappers in application & mappers in details. I have this mapper in ...
Best practices
0 votes
2 replies
57 views
Hexagonal Architecture: How to orchestrate complex business workflows?
Problem Statement I'm implementing a complex business workflow using Hexagonal Architecture (Ports and Adapters), but I'm struggling with how to properly orchestrate. Business Workflow Requirements ...
-3 votes
1 answer
89 views
Usage of tap({ error }) vs. catchError for side effects [closed]
In Angular/RxJS, when should you use tap({ error }) and when catchError for side effects? How do you best separate the two logically or combine them? For example, does resetting the UI to its previous ...
2 votes
1 answer
111 views
Clean way to share data between viewModels
I'm trying to follow Google's clean architecture guidelines. I have a navigation subgraph with multiple pages corresponding to stages of filling a form. Each page has it's own viewModel. On the last ...
0 votes
1 answer
40 views
Gateways design in a react native app with TDD approch and clean architecture principles
I'm currently developing a mobile app for booking overnight accommodations in React Native. I'm currently developing the "book accommodation" functionality and I'm running into a design ...
0 votes
0 answers
34 views
How to avoid duplicating dependencies in multiple project libraries [duplicate]
For further work, I need the egui-winit library. My entire project is divided into the following libraries: engine-window (requires egui-winit::winit for operation) engine-ui (requires egui-winit::...
0 votes
1 answer
113 views
What is the aim of useCase existence when it comes to Clean Architecture in Android?
I cannot really understand what I should do in my UseCases. As I know, repositories are responsible for particular field, type of data and their work is to provide business-logic and connection to ...
0 votes
0 answers
66 views
How to prevent instantiating Repository instead UseCase
I am studying Clean Arch with Java. My project structure is like: project | |--domain | |--entity | | |--Student.java | |--repository | |--StudentRepo.java (...
0 votes
1 answer
53 views
How can the application layer get data from a DTO if the domain interfaces don't know about it?
The scenario: - infrastructure/ ├── dtos/ │ ├── note_dto │ ├── todo_dto │ └── note_preview_dto <-- includes 3-5 previewTodos from database │ ...
1 vote
1 answer
100 views
How to properly reuse heavy calculations performed in the Parent class within the Child class?
Suppose I have a Parent class in Java: public class Parent { protected int value; public Parent() { value = performHeavyCalculations(); } private int performHeavyCalculations(...