Skip to main content
Filter by
Sorted by
Tagged with
Best practices
0 votes
0 replies
44 views

I’m currently working on a personal Android project using Kotlin and Android Studio, following a basic MVVM architecture: ─main │ ├───java │ │ └───com │ │ └───example │ │ └───...
alex_pythooon's user avatar
1 vote
1 answer
78 views

What is the best practice for creating an object based on the value of a string argument? I am loading my configuration from a file and passing the string as an argument that gets mapped to a specific ...
mike erbaturakis's user avatar
Best practices
1 vote
2 replies
53 views

I am trying to create a full SwiftUI Document app (using swift 6, as it matters). Apple doc says that the Document init(configuration:)and fileWrapper(configuration:)are called on a background thread -...
AirXygène's user avatar
  • 3,041
0 votes
0 answers
80 views

I wanted to create a flexible MessageProcessor, depending on the SupplierType(= enum) and depending on which MessageProcessor comes out a different Message-object will be used. The current situation ...
zhrgci's user avatar
  • 716
Best practices
2 votes
4 replies
105 views

Follow-up on this question: Singletons: good design or a crutch? It is true, that using singletons can make testing harder, and bugs can hide behind them. GoF defines singleton to use when: Global ...
zerocukor287's user avatar
  • 1,675
3 votes
1 answer
80 views

I’m refactoring my Laravel application to follow a clean architecture approach with clear separation of concerns: Controller → Service → Repository The Controller handles the HTTP layer,the Service ...
Lana Hanna's user avatar
-1 votes
1 answer
67 views

A question on consideration for case/approach choice. Let's say we have an app that has an ORM model and also uses simple realisation of the Command pattern. Inside of each command we need to ...
Gennadiy's user avatar
  • 341
0 votes
1 answer
156 views

In Java, I can write something like this: public class Brother { private final Parent parent; public Brother(Parent parent) { this.parent = parent; } public void annoySister() { ...
office.aizaz's user avatar
2 votes
0 answers
212 views

I'm designing my system which consists of three parts, abstract layer (al) where traits and generic data structures are defined; implementation layer (il) where different structures implement traits; ...
Eason's user avatar
  • 171
5 votes
2 answers
198 views

Let me introduce first the problem. I will present a simplification of my QT6 project app (in C++) to not make it too difficult to read, as the original code has lots of unnecesary things for this ...
Alberto Moreno Castro's user avatar
1 vote
1 answer
108 views

When I make a POST request, the server responds immediately with an id, but the actual result is delivered later via a server push event (e.g., WebSocket or Pusher). Here's what I'm trying to do: When ...
dlocyalp's user avatar
1 vote
1 answer
74 views

I'm working on a feature where I need to send analytics data whenever a command is executed — for example, whether the command was triggered via a hotkey or a UI button. However, I want to achieve ...
Harutyun Dokhoyan's user avatar
0 votes
1 answer
83 views

I’m building a Rust library that manages multiton instances keyed by strings. Users of the library provide factory methods to create instances implementing a trait, and the library should: Return the ...
Source's user avatar
  • 381
0 votes
0 answers
114 views

I'm trying to build a simple Finite State Machine (FSM). Intuitively, I've described each finite state as a typeclass: class FS st where fsUpdate :: st -> StatefulEntity -> StateMondad st ...
kubivan's user avatar
  • 393
6 votes
2 answers
152 views

I’m currently building a unit converter app in Java (as a beginner), and I want to avoid duplicating logic for each type of unit. Right now, I have different enums like Length, Weight, Time, etc., and ...
jamesdiaz's user avatar
  • 137
4 votes
2 answers
98 views

I'm new to Java class design and need help with the following: Example scenario: I want to pass the company name and email to the BaseEmailMessage class, and fetch these values from the application....
kdeepak's user avatar
  • 79
1 vote
1 answer
99 views

Suppose I have a Parent class in Java: public class Parent { protected int value; public Parent() { value = performHeavyCalculations(); } private int performHeavyCalculations(...
i1ravenov's user avatar
0 votes
1 answer
59 views

I'm currently working with a distributed system composed of multiple microservices, some of which communicate via RESTful APIs and others through asynchronous messaging (Kafka). My current challenge ...
Mark Mayfield's user avatar
0 votes
1 answer
160 views

A private lambda function is accessing a private final class member that is initialised in the class constructor. However, this code pattern compiles with error: variable num might not have been ...
user1589188's user avatar
  • 5,778
-5 votes
1 answer
73 views

I have a simple form a user fills out. He selects some things from the DB like other users, etc, to fill in some entries, types other things manually, and submits it. So I have a question: the docs ...
ZzZombo's user avatar
  • 940
0 votes
0 answers
71 views

As a university software engineering project, my group has to make a videogame out of the board game Galaxy Truckers (rules summary, if it helps), using the MVC pattern (we're using Java as a language,...
Giacomo Amaducci's user avatar
1 vote
0 answers
126 views

I'm developing a workout tracking app that integrates with Health Connect to collect and process sensor data during a workout session. The expected workflow is: The user starts a workout. Health ...
Clover99's user avatar
-2 votes
1 answer
120 views

The following is a toy example: An image stores a width, height and filepath, represented by the struct IMAGE: #include <cstdlib> #include <type_traits> struct IMAGE { int WIDTH; ...
timmy george's user avatar
-1 votes
1 answer
45 views

I'm working on a company project where the UI interacts with multiple different microservices instead of a single fronting api microservice. Is it the right architecture? We also have an Authorization ...
Mahesh's user avatar
  • 844
0 votes
1 answer
301 views

I am playing with VSA and I encounter something that seams wrong. I want to build a Web Api using MediatR and CQRS. Now, let's say I want to implement some CRUD operation on an entity called User, ...
Florin Ghisa's user avatar

1
2 3 4 5
644