Skip to main content

Questions tagged [design-patterns]

A design pattern is a general reusable solution to a commonly occurring problem in software design.

10 votes
5 answers
2k views

My app is an Android app where I pass the below User object to all the screens. This class contains hour format and timezone properties that determine time formatting preferences: data class User( ...
Ravi Raj's user avatar
  • 209
0 votes
1 answer
79 views

A web application was realized for the specific needs of a production plant. Now the customer wants to extend its use to a second production plant and in the future to others. Production plants look ...
Filippo's user avatar
  • 117
0 votes
0 answers
51 views

Say myModel's data should be populated from multiple third party providers llm/api data. I want to avoid repeating the get_response logic in multiple models. My current thoughts consist of inheriting ...
jjk's user avatar
  • 553
5 votes
3 answers
242 views

I currently have around twenty GitHub repositories used by one group of developers. Each repository is a Spring Boot Java microservice. I now want to open these repositories to a second group in order ...
Ryley38's user avatar
  • 235
2 votes
4 answers
573 views

I'm developing a library in JavaScript (TypeScript, actually) which is split into several modules. It's meant to run both on the web and in non-web environments like Node.js. The library is meant to ...
Blue Nebula's user avatar
1 vote
4 answers
237 views

I'm working on a Spring Boot application with a VoucherService and VoucherController. I currently have the service method return an ApiResponse<T> directly, like this: @Transactional public ...
Conquer the world's user avatar
-3 votes
1 answer
227 views

Is there a name for this anti-pattern? A reference to a class member is being passed to another class method, rather than having the class method set the class member directly. public class ...
Jeff Roe's user avatar
2 votes
2 answers
319 views

I have a data aggregation function that collects statistics from multiple sources. The problem is that whenever I add a new metric, I need to manually update the code in three different places, which ...
Tank's user avatar
  • 37
1 vote
1 answer
286 views

We have a CAD software extension, where you can draw products like walls, doors, windows, etc., and you can export the drawing as an order, which contains the parts and costs. As part of this export, ...
Divan's user avatar
  • 369
2 votes
7 answers
408 views

Recently a junior team member was asked to use a survey tool to act as a system by which fuel delivery drivers could submit their Bill of Lading to our dispatch team for record collection after ...
David Stratton's user avatar
0 votes
1 answer
152 views

I'm building a Laravel-based web application that functions as a personal online photo archive. Each user uploads and manages their own private collection of images. These images are encrypted at rest ...
TimoFran's user avatar
1 vote
6 answers
345 views

In a certain program I would like to have three objects, say, a, b, and c, with c being a shared private member (sub-object) of a and b. The data between the three objects shall only go this way: a &...
Alexey's user avatar
  • 968
0 votes
1 answer
182 views

I have an excel macro that imports daily share price files, and finds the highest price for a share after a given date. Each of these daily stock price files has ~1000 rows of data. Currently I have ...
Frankie139's user avatar
1 vote
1 answer
181 views

Problem Match prioritized tasks with suitable workers. Details Consider a task with following properties - type and size. Based on task type, tasks are prioritized. While a worker has following ...
Ammar's user avatar
  • 123
0 votes
1 answer
111 views

I'm working with a data mapper called UserMapper and a User model. Currently, UserMapper has a method called find_many. Now, a client makes requests like /api/users?sort_by=+last_name,-birthdate, so I'...
Dante's user avatar
  • 161

15 30 50 per page
1
2 3 4 5
302