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
86
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
65
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
106
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
58
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
115
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(...
1
vote
0
answers
180
views
How to structure a hybrid offline/online repository in Flutter with Drift and GetIt (clean architecture)?
I'm working on a Flutter app that includes barcode scanning and offline-first support.
The app uses:
Drift for local SQLite storage
GetIt for dependency injection
Clean Architecture
A hybrid approach ...
0
votes
1
answer
265
views
Spring Modulith with clean architecture and java gradle multi module setup
I am trying to combine spring modulith (1.3.4) and clean architecture to verify the proper dependencies between gradle modules. The project setup is defined by the following structure:
Domain
Logical ...
0
votes
0
answers
43
views
Using Room Database with Dagger 2 and multi-module project
I have the following project structure:
app/
di/
components/
modules
JakcApplication.kt
MainActivity.kt
core/
data/
local/
database/
...
0
votes
0
answers
90
views
RabbitMq with multiple consumers and publishers in nestjs
I have a NestJS app that connects to RabbitMQ and communicates with a Java Spring app. The app needs to both publish to and consume from multiple queues, including cases where it publishes to and ...
0
votes
0
answers
53
views
How to Reuse Use Cases Across Different Modules in a Modular Android App?
I have a modular Android application following Clean Architecture, where each module is responsible for a specific feature.
I have a Recipe Module that...
... fetches recipe data from the server ...
1
vote
2
answers
68
views
What is the best way to inject IConfiguration value into services
I am working on ASP.NET Core WebAPI projects with clean architecture, and I came around the situation where I need retrieve value from appsettings.json
I am able to do so by injecting the ...
0
votes
0
answers
57
views
How can I observe for date or timezone changes to update the UI using MVVM, UseCase and Hilt?
I have a interface called TimeZoneMonitor to monitorize Time Zone or Date changes.
I also have a UseCase that queries the database, looking for information based on the current system date.
The code ...
0
votes
1
answer
82
views
A repository interface located in the Domain layer does not have access to DTOs, which belong to the Application layer
I searched Stack Overflow and didn't find an answer to a similar question.
In a query handler, which is in the Application layer, I want to retrieve only a subset of the properties from the Customer ...
1
vote
1
answer
51
views
How to include an error case in the UIState?
I'm trying to catch any error cases in the ViewModel and update the UIState, but it's not working.
This is the sealed interface to handle the different responses:
sealed interface UniversalisUiState {
...
-2
votes
1
answer
1k
views
How to properly implement the Repository Pattern in Clean Architecture without violating domain rules in .NET? [closed]
I'm working on a .NET 8 project following Clean Architecture, where I want to correctly implement the Repository Pattern while adhering to domain-driven design principles.
My Current Setup:
Domain ...
0
votes
2
answers
350
views
Where to map to domain from Data layer in MVVM Clean Architecture?
'm working on an Android application using the MVVM architecture with clean code principles. The app has three layers:
UI -> Domain -> Data (Repository -> Data Source)
From the data layer, I ...
1
vote
1
answer
49
views
Should I check equity value in domain entity to prevent unnecessary events in DDD?
My domain entity often looks like this:
class {
rename(string $name): void {
if ($this->name === $name)
return;
$this->name = $name;
$this->...
0
votes
1
answer
123
views
Trouble when Creating a Context Factory in Clean Architecture
I am trying to implement CA in an ASP.NET Core Web API. Right now I have the presentation, infrastructure and application all set up, but when I tried Updating the Database with the DbContext Entities ...
0
votes
0
answers
26
views
How to Handle Feature-Specific Parameter Requirements in a Repository Pattern Implementation?
Best Approach to Handle Varying Parameters in Feature-Specific Implementations of an Abstract Repository in Dart
I have an abstract Repository<T> class in Dart that defines several methods, as ...
1
vote
1
answer
85
views
Proper usage of Google API (Navigation) in Android clean architecture
I have a question regarding usage of Google APIs (in my case NavigationAPI) in clean architecture.
So in order to use google navigation it is necessary to have Navigator object from NavigationApi....
0
votes
1
answer
117
views
How to avoid invariants spanning multiple aggregate roots in DDD
I'm learning about DDD and have come up with a strange situation which I'm not entirely sure how to handle. It is my understanding that an aggregate, or an entity with an aggregate, can have a ...
0
votes
1
answer
125
views
Using multiple repositories in application layer DDD
I'm learning about DDD and am attempting to model a basic interaction between a user and a shopping cart, and am wondering if the following code is directly aligned with DDD principles, or if there is ...
0
votes
0
answers
59
views
How to Call ViewModelProvider without ref in Flutter
What I Want to Achieve:
I want the search results to be updated every time a character is inputted (or changed) in the search box. I aim to implement this feature as close to clean architecture as ...
1
vote
0
answers
32
views
flutter clean architect help for network and third sdk manager
I am planning to use clean architecture in Flutter to develop my upcoming projects. Currently, I'm using libraries such as flutter_bloc and get_it. The entire project is composed of core, features, ...
0
votes
0
answers
27
views
Identity in Clean Architecture. Unable to find the required services,required services by calling 'IServiceCollection.AddRazorPages'
I am new to Netcore and Clean Architecture. I have do many search but many thing change so I decide to ask here.
I also post the source code here for more investigation.
https://github.com/...
1
vote
3
answers
317
views
How to use DTOs from application layer in domain layer repository interface (repository pattern)?
I am learning ASP.NET clean architecture structure. I have an application layer with a query GetAllRestaurants which has to return paginated restaurant objects.
I am using repository pattern, with the ...
0
votes
0
answers
17
views
Query attribute of another aggregate in DDD
I am building an application for managing printers. I have transaction aggregate and customer aggregate,1 transaction have 1 customer ,I want to fetch list of transaction with customer name for the UI....
1
vote
1
answer
519
views
How to maintain Clean Architecture principles with Cloudflare Workers' context-dependent bindings in a Hono API?
I am currently developing a Hono API application practicing the basics of Clean Architecture (you can look it up), but tldr it provides ways to isolate layers between each other, making it easier to ...
1
vote
1
answer
265
views
Flutter clean architecture using domain entities in presentation layer
so i am in a hastle here , in the the presentation layer I want to pass data through the bloc events to the bloc state and finally to a page and I found that I am repeating the same params everywhere ,...
0
votes
2
answers
228
views
When using Clean Architecture in Android projects, why does the Presentation Layer need to have a dependency on the Data Layer? [closed]
Looking at many blog posts and GitHub projects, I've noticed that when implementing Android project with Clean Architecture, the Presentation Layer often has dependencies on the Data Layer. I'm not ...
0
votes
1
answer
65
views
Is it acceptable to pass a list of the same aggregate root type to a method in Domain-Driven Design (DDD)
We are learning and implementing Domain-Driven Design (DDD), and we have a sample entity below: PaymentInvoice.
My question is, is it acceptable to pass a list of PaymentInvoice entities to the ...
0
votes
1
answer
1k
views
Using Clean Architecture and Repository/Unit of work to build the application with ASP.NET Identity
I am working on creating a project using Clean Architecture (backend part). In this application I'm going to deal with users that can registrate/log in using jwt athentication and manipulate with ...
-1
votes
1
answer
132
views
How to manage multiple states in a single BLoC without affecting the UI? [closed]
I'm developing a Flutter application using the BLoC pattern. I have a single UI page that interacts with a BLoC that handles 5 events and 10 states. My requirement is as follows:
When I fire an event ...
0
votes
1
answer
51
views
Data integrity enforcement in Clean architecture: Domain or Data Layer?
I have a project in which I have a 1->N relationship: a person needs to have at least a pet. Because of this rule, we can't have a person without any pets.
There are a PetRepository and a ...
1
vote
1
answer
854
views
How to run flutter pub get for all packages in a multi-module Flutter project?
I'm working on a large Flutter project where each feature is organized into its own package. In the main directory, I want to run flutter pub get to install dependencies for all the packages at once. ...
2
votes
1
answer
186
views
Managing Internal Service Calls in DDD Application Layer Without Excessive DTO Mapping
I’m developing an application using DDD with a Domain, an Application, and an Infrastructure layer.
Inside my Domain, I have my entities with business logic and some domain services. In the ...
0
votes
0
answers
57
views
Retrofit: Simple way to extract response body when HTTP response code is non 200/201
I am using Compose, Flows, clean arch, MVVM and repository pattern.
I don't want to crate any generic classes. I really just want to see a simple GET and POST handled with Loading, Success or Error ...
0
votes
1
answer
113
views
Orchestrated vs Core use-cases in clean architecture
I have an endpoint that should create a book, and if it is the clients first created book it should send an email like "Congratulations to your first book". Following Clean Architecture I ...
0
votes
1
answer
81
views
How to setup the state management architecture for current use case? [closed]
In my flutter application, I'll be having multiple pages.
Consider 2 pages for now. Both these pages have some filters that are common and can be modified from either page. Both these pages also have ...
0
votes
2
answers
251
views
FormData parameter is always null in endpoint when passing a collection of IFormFile
The following CreateImages endpoint is in my C# .NET Web API. Testing with Postman and Swagger UI, when I upload files and send the request, files parameter below is always null. I don't have this ...