Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
42 views

a question regarding quality and best practices. In a system that requires many scheduled tasks, what is the "formal" way to handle this? When there is a number N of automation services ...
LegsNotHand's user avatar
1 vote
3 answers
1k views

I am using the TailwindCSS grid function to show the stats and their value. I want to know how to decrease the distance/gap between the state and its value so that I can bring them closer to each ...
Praveen Kumar's user avatar
1 vote
2 answers
100 views

Hey, I think that I am not the only Android and Kotlin developer who has an “allergy” to when statements. The simple reason is that these statements often easily grow into some ugly code. For example:...
Nick Sahno's user avatar
-2 votes
2 answers
100 views

I have the following singleton implementation based on a video https://youtu.be/Q6HJpgdkAK8?si=k-9ksjHirLHq5Ne2 Some features of my own implementation are different, but i want to know whether my ...
Oscar RoAh's user avatar
-2 votes
1 answer
73 views

I have an interface AService which has 2 methods, and this interface is implemented by two different classes. One of the methods is directly called from an another service by calling on an AService ...
user998692's user avatar
  • 5,256
0 votes
2 answers
84 views

So, in my understanding, with Decorator pattern you can easily attach additional "responsibilites" (or more generally, behaviors) to an object dynamically. Usually the decoration chain is ...
Baffo rasta's user avatar
1 vote
3 answers
107 views

I refactoring some Python code and one time I came up with a kind of pattern that I can not really assign a name (I'm not really familiar with patterns though). Here is an attempt on an abstract ...
scrapp's user avatar
  • 19
0 votes
2 answers
172 views

In object-oriented programming, there are two main relationships between objects. Inheritance (is-a-relation) Composition (has-a-relation / also called containment) For inheritance, one can have a ...
Gajanana D S's user avatar
0 votes
1 answer
86 views

I'm stuck with a very simple problem I can't find a simple solution to. I am looking for an elegant pattern to map data between two datasource SourceA SourceB ClassA1 -> ClassB1 ClassA2 -> ...
Rob's user avatar
  • 1
0 votes
0 answers
62 views

I designed the following class for the game in production. public class Character { public string Name { get; set; } public List<SustainedAction> ActionsInParticiption = ...
user185266's user avatar
-1 votes
1 answer
45 views

Let's say I have implemented an Action Design Pattern, and I have these actions: MakeJuice MakeCoffee MakeBreakfast MakeDessert now, for every actions, as it should, have their own set of ...
ssrsvn's user avatar
  • 33
0 votes
1 answer
94 views

I've developed a React application for a book library based on what I learned in my university classes. The application manages a list of books, allowing users to view, rate, and delete books. I've ...
amira.patel's user avatar
0 votes
1 answer
113 views

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 ...
Odin Hufnagl's user avatar
1 vote
1 answer
75 views

I have to conduct tasks 1-6 in an orchestrated async manner. every task has a receive queue and respond queue. These tasks are long-running...can take several days to finish. The orchestrator is ...
dhinkatika's user avatar
0 votes
2 answers
125 views

Our Rest service is a classic Controller-Service-Repository architecture implemented in Java with Spring. As described here, it helps with separation of concerns and unit testing. Sometimes, our ...
Marat Asadurian's user avatar
1 vote
1 answer
98 views

I have two databases: a master database, which serves as a common database, and another database (dedicated to each tenant/customer) with the same schema. If you have experience with a multi-database ...
mubashir's user avatar
  • 961
0 votes
1 answer
111 views

In my eCommerce microservices app, I want to create a page to display the order summary. The order contains a group of products, each with its own ID. Should the front end make multiple requests to ...
salma sherif's user avatar
2 votes
0 answers
44 views

I'm working on a custom middleware for traefik that serves as a base for other sub-middlewares. Each sub-middleware implements an interface and has its own config structure. Here's an outline of my ...
longvanren's user avatar
1 vote
1 answer
749 views

Is this the Result Pattern / Operation Result Pattern? Or something different (if so, what?) Result Pattern: From what I can see, the Result Pattern's intent is to return status, not substantive data/...
Adrian K's user avatar
  • 10.4k
1 vote
2 answers
244 views

I developed a Spring Boot application where I have a set of controllers that connect to a common service layer. I don't mind using any protocol (REST, GraphQL, gRPC, etc.) for the communication ...
Morteza Jalambadani's user avatar
0 votes
3 answers
190 views

While trying to connect to axon server using docker image of it: version: '3' services: axonserver: image: axoniq/axonserver:2024.1.2-jdk-17-nonroot hostname: axonserver container_name: ...
Seyed Ali's user avatar
0 votes
1 answer
36 views

I'm trying to learn and understand dependency injection. (python example below): class Printer : def print(self): pass class CSVPrinter(Printer) : def print(self, data): for i ...
andrew's user avatar
  • 61
1 vote
1 answer
61 views

I have a probably pretty common case where a Client Component (CC) uses the useState hook to conditionally render Server Components (SCs). A CC will turn any component it imports into CCs, which in ...
paternostrox's user avatar
1 vote
1 answer
96 views

I'm not sure how exactly to formulate this question so I will illustrate by example. I am using the bitflags crate which provides a trait called Flags. The flags trait involves the presence of an ...
Muhr's user avatar
  • 13
0 votes
1 answer
38 views

I have a blazor project that has a sperate Webapp UI and a mobile app UI utilising blazor hybrid principals, they share multiple components that display some data and allow actions to be performed on ...
James Rogers's user avatar
0 votes
1 answer
84 views

We are developing an IoT cloud solution with an event driven architecture. The devices produce events and communicate with consumers through an event broker. All event messages are serialized in JSON. ...
poklaassen's user avatar
0 votes
1 answer
116 views

Seeking for your advice, currently doing self studies regarding the Python Design Pattern. In chapter 2 I stock with this class. It has 2 module, logger_class.py and new_script_with_logger.py for the ...
Kram R's user avatar
  • 49
0 votes
1 answer
73 views

In this observer pattern, there is one more thing I am using: a push-pull mechanism, so there is a reference from observer to subject also. so now when the Subject is part of the observer itself that ...
Shivam Varshney's user avatar
-1 votes
1 answer
75 views

I have the following requirement to fulfill: When the database is unavailable, I have to write all queries into a buffer file (for ex. .PMQ) for later execution. Caching database results is common ...
Pan Michal's user avatar
0 votes
1 answer
304 views

A Kubernetes novice here. I have a simple client/server web application for video conversion: The frontend uploads a video via HTTP POST, receives a response with a status check URL The backend ...
cuckoo's user avatar
  • 237
0 votes
2 answers
132 views

I'm developing an Entity Component System (ECS) in C++ and I'm trying to find an efficient way to iterate over different component structs using a single function. Here's an example of my component ...
TNP's user avatar
  • 1
3 votes
3 answers
201 views

I'm working on a small hobby project with someone as a learning exercise. In it, the user traverses a dungeon, finding treasure, fighting monsters, etc. etc. Right now, the approach looks a little bit ...
ConnieMnemonic's user avatar
0 votes
1 answer
27 views

I'm studying design patterns for an exam and I'm stuck on a question: Combining the Separated Interface and Remote Facade patterns. The textbook we're using is "Patterns of Enterprise Application ...
Camila Alegre's user avatar
0 votes
1 answer
67 views

I try to implement multiple concrete classes, which share the same API. The base functionalities between these classes are the same, but they support different types of configuration (among shared ...
Guti_Haz's user avatar
  • 2,752
0 votes
0 answers
44 views

I am trying to implement an HR management module wherein I have three 3 types of employees namely RegularEmployee, ReengagedEmployee, OutsourcedEmployee. All of them have some common properties like ...
genuinebookworm's user avatar
2 votes
2 answers
143 views

def regex = 'crt1234[a-z]_(\\w\\w)_DTS(.*)' Pattern pattern = Pattern.compile(regex) Matcher matcher = pattern.matcher("crt1234_DH_DTS") matcher.findAll() How do I loop through ...
user3411153's user avatar
2 votes
2 answers
117 views

Context I have a predicate trait. It takes some type T and returns a boolean value for it. trait Predicate<T> { fn evaluate(&self, t: &T) -> bool; } I also have evaluator that ...
Sun of A beach's user avatar
0 votes
0 answers
37 views

Which example of using HttpClient in a class is preferable? Set HttpClient as field and use across all methods in class with dispose: public class HttpClientExampleRepository : ...
seanrco's user avatar
  • 1,091
0 votes
1 answer
52 views

I have the structure of folder as: folder_structure I want to use files which are present in deps folder in the dag files present in dags folder, how to do that? Can someone please help me with this I ...
Pavithra Naga Yallapu's user avatar
0 votes
1 answer
79 views

I am practicing using the Service / Repository pattern in a C# / .NET 8 app and have some questions about best practices. Below is an example interface for one of the services: namespace NCAAMB....
seanrco's user avatar
  • 1,091
0 votes
2 answers
38 views

It's a bit like the singleton pattern with the twist that one passes arguments when acquiring the object and are getting the same object if and only if the arguments are the same. Example in python: a ...
skyking's user avatar
  • 14.6k
0 votes
2 answers
120 views

I want to write a library (a module) in Python for logging. The logger instance should be unique per process and global per process. (Meaning that it should not be passed around as an argument to ...
user2138149's user avatar
  • 18.7k
0 votes
1 answer
44 views

Suppose several classes are defined in multiple different files across a Python project, such as mylib.somefile.Class1 mylib.somefile.Class2 mylib.anotherfile.Class3 mylib.athirdfile.Class4 ... What ...
glass-ships's user avatar
1 vote
2 answers
89 views

My View Model looks like this: public class ProductVM { public string SerialNumber { get; set; } // Other properties left out for brevity } In the form that fills this model, users can ...
Nikola's user avatar
  • 138
0 votes
4 answers
63 views

Let's say at the beginning I had a requirement where by sending a post request to my /posts API endpoint - post had to be created. To implement this I created a PostsUsecases thinking about it as a ...
eugenedrvnk's user avatar
0 votes
0 answers
167 views

I'm writing a Python package that implements a class which should be a singleton. The class is responsible for sending async http requests. Thus the class needs to have access to an aiohttp....
waykiki's user avatar
  • 1,134
0 votes
1 answer
56 views

As far as I know Repositories should work with Domain/Business Entities. All the operations to save and retrieve data to create entities should go there, and then the Repository is used by the Domain ...
Nikola's user avatar
  • 138
0 votes
1 answer
74 views

I have implemented the abstract factory design pattern with Python and I see that it gives me the following error. this is my code : """ Abstract Factory - Abstract Factory Pattern ...
hamid reza's user avatar
1 vote
2 answers
112 views

When you do architecture design, you usually divide the subsystems. Is there any methodology to divide the subsystems? Are architectural patterns like hexagonal architecture, clean architecture, etc. ...
csucjh's user avatar
  • 23
1 vote
1 answer
128 views

P.S. example is in kind-of-scala, but language not really matter, I am interesting in functional approach in a whole. Usually I saw pattern like this outer world -> controller -> serviceA -> ...
Егор Лебедев's user avatar