Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [design]

Questions about problem solving and planning for a solution through software design.

Filter by
Sorted by
Tagged with
-2 votes
1 answer
110 views

Proper use of microservices within the system

I have an application in which a client interacts with a backend, which interacts with blockchain. Since blockchain executions can be time-consuming, they are executed asynchronously within different ...
Ahmet Yazıcı's user avatar
-1 votes
1 answer
150 views

Fast methods to consolidate 20 csv files into one xml file [closed]

We have 2 systems Legacy & New and I have to migrate the data from the legacy system to the new system. The legacy system exports the data in .csv format while the new system accepts the data in ...
Maher Nabil's user avatar
1 vote
0 answers
93 views

Limiting exposed interface for state transitions

Scenario: Given a class with some internal state and methods to manipulate this state, I want to limit the exposed methods that are available to potential clients/users of my API. TLDR: In the ...
sfiss's user avatar
  • 908
0 votes
2 answers
101 views

Logical architecture based on modules and SPI

I'm looking for the most proper way to design a modular application with ServiceLoader. --MAIN IDEA-- module app.view | exports app.view.View interface that defines UI api module app.engine | exports ...
SmallDevice's user avatar
3 votes
1 answer
168 views

Composite repositories: minimizing dependency injections

I have an application with dependency injection that consumes a REST API. The API calls are abstracted into entity-specific repositories. Some of the repositories are: HttpNotebookRepository, ...
Amal K's user avatar
  • 101
0 votes
2 answers
128 views

Where to check preconditions in multi functions

In a library, there could exist three types of functions. The first are those which are visible to the user i.e. their declarations are installed in the library's include directory. The third are ...
Nitin Malapally's user avatar
-1 votes
1 answer
106 views

How to handle dependencies between objects/components

Im currently working on a college project on the simulation of magnetic interactions of particles, see physical simulation: design thoughts. Right now im starting to code my system according to this ...
Meck3l's user avatar
  • 17
3 votes
2 answers
273 views

What make a microservice a microservice?

I am new to microservice. While learning about them, I was wondering what is the basic rules (the minimum) that make a microservice a microservice. I have found some rules/characteristics along the ...
Hung P.T.'s user avatar
2 votes
2 answers
198 views

Pattern for a base class to do pre-validation and/or post-processing on a deriving class's overridden method?

I have the following pattern repeating itself in multiple places: abstract class Database { void connect() { this.setStatus( CONNECTING ) try { await this.realConnect() } catch ...
Markus Meskanen's user avatar
23 votes
6 answers
6k views

How important is it to clearly understand requirements and architecture before starting to code? [closed]

Whenever possible I have been requiring an understanding of the requirements and architecture for the next scope of work before starting to code. Sometimes due to schedule pressure on larger projects ...
Bill Dyer's user avatar
  • 377
0 votes
1 answer
414 views

Are there any guidelines for calculating hardware requirements in a containerized environment?

At an architectural section of an interview I was asked to produce hardware requirements for a certain system I designed. It was a microservice-based system which runs in Kubernetes, Openshift or any ...
svz's user avatar
  • 307
3 votes
2 answers
2k views

Is this approach to website design adequate or am I making a mistake?

I'm not conversant with this topic, and therefore I watched a tutorial about a one-page dynamic PHP website (quite educational in my opinion) in which the creator designed the following pages. For ...
Ismael Párica's user avatar
1 vote
3 answers
360 views

Is in my case role based access better than permissions?

Hello StackExchange community, I'm in a bit of an impasse for my current project. The software in question is a collaborative program designed to let employees work together on the platform and assign ...
manimerz's user avatar
0 votes
1 answer
210 views

Is it secured to accept and execute user provided CURL commands

Assume you have to figure out a dynamic way where the user can provide an API call to hit in the backend for example, user to provide a webhook to call on his end server So, An idea for users to ...
Youans's user avatar
  • 461
0 votes
1 answer
95 views

How to refactor parallel inheritance tree?

I have a (php) program, which must change yearly. This program calculates tax for every year and there are sometime changes in requirements. First, the user fills their incomes, expenses, etc. Then ...
nrob's user avatar
  • 111
-1 votes
3 answers
360 views

Is it better to override methods in classes or make methods general?

I am creating the backend of a microservice that will serve as a tool to see in real time how the company's employees are distributed by projects and what days they have assigned to each one. The ...
Diegol's user avatar
  • 1
-1 votes
1 answer
41 views

What is the convention for deciding which resource to place an endpoint under? [closed]

I have an endpoint that teachers can use to invite students to a virtual classroom by providing their emails in a list format. Let's call it POST invite-students. I have these four resources: api/v1/...
oamandawi's user avatar
  • 101
0 votes
1 answer
167 views

Trie data for searches in time ranges

I am developing an API responsible for returning the distinct searches made on a service given a date prefix. Example data: 2015-08-01 00:00:18 %22http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%...
alves's user avatar
  • 101
0 votes
1 answer
169 views

Many if conditions

I have the code but I want to be pseudo as possible so I learn from other ways as much as possible. So what I am building is web based tool and in one section we have a table. This table renders lines ...
Codemenot's user avatar
-1 votes
1 answer
195 views

Better way to represent grammar symbols in C

I'm trying to build a simple compiler for a subset of the C language in C. To achieve this, I needed to figure out a way to represent the grammar symbols. Basically, each symbol can either be a "...
Mehdi Charife's user avatar
-1 votes
3 answers
299 views

Is it ok to save all fields of an entity as a string if it should not be changed?

I have a complex object that has several fields can be updated until it is locked. Is it proper to save this locked entity as another entity which has no object child, only string data. complex object ...
AhuraMazda's user avatar
0 votes
1 answer
80 views

How to design a fifo coupon distribution system

I have an app written in java and using mysql as DB. I need to create a coupon distributed system where I have 100 coupons stored in DB and the first 100 customers who login should get those coupons. ...
dev Joshi's user avatar
  • 109
0 votes
1 answer
88 views

Do we need to test an integration of units if each unit has been tested against collaborator (mocks) and interface contracts?

Given: Let's say I have 3 objects A, B, C that form a cluster. Each unit (A,B,C) is independently tested with mocked collaborators. The "integration" is the call to A that calls out to B and ...
PhD's user avatar
  • 2,511
1 vote
2 answers
112 views

Design dilemma with relation between entities and 'global'

I have the following dilemma with designing a piece of software. How can I design a relation between the follwing entities so that a configuration rule can be global or apply to a building / room or ...
Erwin van Hoof's user avatar
1 vote
2 answers
142 views

Designing Products with multiple variations

I have a Product entity: public class Product { public int Id { get; set; } public string? Name { get; set; } public string? Description { get; set; } [ForeignKey("Brand"...
Subliminal Hash's user avatar
2 votes
3 answers
287 views

Rest API: paths versus queryparams for user accounts

I'm looking for some guidance around REST design for user account endpoints. I generally understand REST and some of the principles involved, with paths being used to fetch items from a resource: /...
aroooo's user avatar
  • 255
0 votes
2 answers
384 views

Mapping class diagrams to source code

I'm attending a software engineering class at my university, and my final consists of a fully-documented desktop application to be built in a four people team. While designing and coding this software,...
Thomas Herondale's user avatar
1 vote
1 answer
107 views

UML Class Diagram Excersise

Problem statement: The information system of a university must manage information relating to its employees, departments, institutes, courses provided, and research projects. Information relating to ...
Luca Pedersoli's user avatar
-2 votes
1 answer
99 views

CRUD for hierarchical data in ASP.NET - single view/controller vs. separate view/controllers?

I'm trying to develop a CRUD feature for an ASP.NET app that lets me manage customer information. Each customer can be subscribed to one or more services, and each service can have one or more terms. ...
David's user avatar
  • 1
0 votes
1 answer
67 views

Separating model and applicative user in app

I am working on a mobile application, and I want to plan a separation between the model layer that represents a user (that comes from the server) and the "applicative" user that has the same ...
Maor's user avatar
  • 111
7 votes
9 answers
2k views

Changing number of arguments of a function

I wanted to know the best practice(s) for ensuring scalability while passing arguments. Say, in version 1.0 of an application, the foo function looks like this void foo(int i) Now, in version 1.1, ...
awakened's user avatar
2 votes
1 answer
618 views

UML Diagram double arrow

In a Microsoft Learn article on MVVM there is an, what I assume, UML diagram that didn't make sense to me. (https://learn.microsoft.com/en-us/archive/msdn-magazine/2009/february/patterns-wpf-apps-with-...
Nordin's user avatar
  • 31
0 votes
1 answer
90 views

Design a model for a user

There has been a change in the project I am working on. Until today, there was only one type of user in the system. From the moment you logged in, you had all the information about the user. The new ...
Maor's user avatar
  • 111
1 vote
2 answers
97 views

Sharing a data class in a flow

Suppose there is a flow of functions in C++ step1(); step2(); step3(); step4(); step5(); and they interact by adding and modifying data on a data class D (only data, no functions). For example, step1(...
tqw's user avatar
  • 121
2 votes
1 answer
633 views

How much logic can the infrastructure level hold in Clean Architecture

I am trying to wrap my head around the concepts of Clean Architecture, and specifically about the responsibility of the Infrastructure layer. Its purpose is often described as "to provide ...
lemerek759's user avatar
2 votes
1 answer
96 views

Should we process data in the transmitter class or in the receiver class?

I have a transmitter class which contains raw data which represents physical values (double and int). These values should be taken by a receiver class to display them with logs (string) sorted ...
Tesla123's user avatar
  • 129
0 votes
1 answer
305 views

Cron job to read multiple "entities" from the database

I have one microservice (in GO) that needs to read a whole table every hour, filter out some data and send it to another application. So as an example, imagine I have the following model: type User ...
Manuelarte's user avatar
0 votes
2 answers
119 views

How do I guarantee ordered processing of occurring events in concurrent environment?

I have a Kafka topic providing events of the following type: id(hash):[ADD|REMOVE]. These events may be generated at a high rate and are idempotent, i.e. getting 123:ADD one time and ten times in a ...
svz's user avatar
  • 307
0 votes
1 answer
165 views

Is this a good use of events?

At my company we are revising some backend architecture. I think I have identified a use case where event streaming (for example with Apache Kafka or RabbitMQ) makes sense. Because me (and everyone ...
Puck's user avatar
  • 45
3 votes
2 answers
1k views

Is it good design to have a repository update multiple entities?

I'm building a web application using Laravel. I use the repository pattern as my data layer. Imagine there's some entity like Product and a product can be assigned to a ProductCategory. The Product ...
user2190492's user avatar
1 vote
2 answers
167 views

physical simulation: design thoughts

I'm an applied physics student and currently working on a simulation of the magnetic interactions of multiple protons within a protein. Me having only little experience with programming and almost ...
Meck3l's user avatar
  • 17
0 votes
1 answer
272 views

In DDD, must a Value Object turn into an Entity when some limited idenifiablity is required?

I have an Entity type, let's say Car for example. There is a Value Object type Tire for it. Each car has a set of tires with certain properties. Sometimes tires are replaced, which is communicated by ...
Erik Hofer's user avatar
-1 votes
2 answers
438 views

Attribute Driven Design

From Wikipedia: Attribute-driven design (also called ADD or Attribute-driven design method) is a methodology to create software architectures that takes into account the quality attributes of the ...
Jared Schreiber's user avatar
9 votes
4 answers
4k views

How to store a fixed length array in a database

I have a mysql database in which I have drafts, each of which contains exactly 24 players the order of which matters. I am conflicted between having a drafts table with 24 extra columns for each ...
RobbyG's user avatar
  • 101
3 votes
4 answers
800 views

Giving multiple components access to a single database

This is in context of a distributed computing. There is a Service A which owns a database and hosts APIs for updating an entities in this database. As time went by, the service has evolved and we are ...
Sanath Kumar's user avatar
-2 votes
1 answer
70 views

Pattern for flexible promotions/badges [closed]

Let’s imagine system like Garmin connect, you run, record your workout and then once you finish workout is uploaded to the system and being analyzed. Based on analysis you can receive badge: for 5 km ...
Snorlax's user avatar
  • 111
0 votes
2 answers
542 views

What if a Repository needs to apply Business Logic to load an Aggregate?

I have an aggregate User and the user has a Score. The Score of a user is calculated by queriying a bunch of different tables and running through (often very large) result sets applying some business ...
Mats's user avatar
  • 163
1 vote
0 answers
80 views

How to have only one consumer handle a long running task at a given point?

I need to design an application which makes requests to an external API. External API has a hierarchy of entities: User which contains ListOfItemss which contain Items. I need to get data on all Items ...
Yos's user avatar
  • 157
0 votes
0 answers
53 views

How to map translated variable names for column names, so I can export them?

In short story, I want to make some universal generators for different formats (CSV, XLS, XLSX and JSON for now). Just to be clear, I will make different classes for all formats. I have different ...
Lube's user avatar
  • 109
7 votes
4 answers
2k views

The meaning of "function blocks of limited size of coding" in ISO 13849-1

Section 4.6.3 of ISO 13849-1 concerning "safety-related application software" has following provisions: c) Software design shall feature: semi-formal methods to describe data and control ...
lightweight's user avatar