People who code: we want your input. Take the Survey

Questions tagged [design]

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

Filter by
Sorted by
Tagged with
-1
votes
1answer
75 views

How to run and manage multiple instances of an application (different start params) on multiple servers? [closed]

Our main (C#) application: takes in parameters and starts working (batch processing, takes anywhere from minutes to hours) up to x instances of said application per server instances are started by ...
1
vote
2answers
180 views

C Const Safety with Struct Data Pointers

In our codebase, having precise management of memory, data was being passed around like so: typedef struct { size_t const sz_size; size_t sz_len; int32_t * const restrict pData; } S_ARR_T; ...
2
votes
1answer
134 views

Do we still use modular subsystems with object-oriented models?

I have been reading some old design books (SSADM, JSD.etc) on software engineering that deal mainly with a procedural view of creating systems. I was just wondering if we still use these old ...
-3
votes
3answers
180 views

Should we allow users to write to database directly? How to do it correctly

I'm developing a new application that allows the user to do many writes. Therefore, it is very inefficient that we use our server-side to handle every write request by users. Should we allow users to ...
1
vote
1answer
123 views

What design pattern to implement notifications for a .NET application?

I have an ASP .NET web application dashboard that is used to send notifications to several .NET desktop clients. The current implementation is that the web app writes the new notification to a ...
1
vote
1answer
78 views

Loose coupling vs transparency in visitor pattern that visits composite

I have a composite object (I will call it A) that has fixed number of sons (I will call them A1 and A2) All of them have an Accept(Visitor) method. I have a GUI, A is the main window that consists of ...
0
votes
1answer
44 views

File parsing in UI Layer or Application Services Layer

Let's say that I have a list of financial transactions that I need to read in from the file. I want to make the best guess I can at what account should be credited/debited based on the transaction ...
0
votes
0answers
31 views

Doing the same tasks from multiple places when using Clean Architecture and CQS?

I'm working on some tooling that will help speed up the process of setting up a new computer for new developers. I want the user to be able to execute many tasks either as one task or grouped together ...
0
votes
3answers
74 views

Designing this module to support exchangeable drivers

We have a battery manager implementation which uses a fuel gauge driver and a charger driver. Currently both of these drivers are hard-references to the fuel gauge and charger driver we currently ...
1
vote
2answers
80 views

Using objects to construct nearly the same objects

I am getting worried I have some terrible design pattern here in JS/Node.js/MongoDB. It seems to that to create an object, I need an object that looks like that object. This includes data that comes ...
-3
votes
1answer
36 views

How are different resolution settings for videos handled by server and client based on setting and connection speed? [closed]

I was watching youtube and squinted at the text in the video and wondered what happens when I switch from 720p to 1080p. Does the streaming service, Youtube and or any other, just have the files in ...
0
votes
1answer
56 views

What approaches are there for handling elements in contiguous memory while being dependent on other user input

I am creating a vectorized reinforcement learning environment. It handles multiple instances of a board game in synchron. Up until now, the state of the environment was a specific representation of ...
1
vote
2answers
71 views

Where to put a deffiniton of an external data provider in a DDD/Onion Architecture application?

Consider that when working on an Application which is modelled using DDD and implemented using Onion Architecture, you come along a following business case: The Application, as one of its features, ...
1
vote
5answers
205 views

OOP applications and Databases

I am having such a hard time with OOP and databases. Both in C++ with SQL and even more so with Node.js and MongoDB. For this question I will use Node/Mongo. Let's say we have a user object. Over time ...
0
votes
1answer
64 views

How to use single Spring-Boot instance to cater to multiple environments?

We have a Spring-Boot Web application currently deployed to 7 environments (DEV, SIT, UAT, Pre-Prod, Prod, etc.). This application connects to other REST services, which has different URLs for each of ...
-1
votes
3answers
207 views

Design pattern for creating and scheduling tests/exams

I have an Exam class that represents an examination/test: public class Exam { public int Id { get; set; } [Required] [StringLength(maximumLength: 30, MinimumLength = 1] public string ...
0
votes
2answers
83 views

How to determine whether (and how) my design should use inheritance, composition, decoration and/or strategy

I want to create a little todo app, with a "pedagogic focus" on clean software design. I spent some time reading about design patterns lately and I am trying to wrap my mind about which of ...
1
vote
2answers
116 views

Inversion of Control: Separation of concerns in a composition root

In a C# console application of mine (which uses CliFx for the command line processing), I'm setting up dependency injection using Autofac. What I've learned about IoC is that you should have a single ...
1
vote
1answer
45 views

12 Factor and External Dependencies (Web Server)

Question about the 12 factor principles and, specifically, the dependencies step: https://12factor.net/dependencies From how I read this, the general idea is that you want code that doesn't rely on ...
-4
votes
1answer
84 views

Design a login system

I have a task of designing login system with the requirement below: If the user login over three times, lock account for the first 5 minutes. The next failed 3 times login-in will lock the user ...
-1
votes
1answer
48 views

Model design for `Team`s and `Member`s

Say we have to create a model for a company, where employees can be part of many different teams. A team can have member members. Members can be part of many teams. How to design database tables for ...
0
votes
1answer
50 views

Easily showing and hiding UI options for different releases of a standalone Java Application

I have a very simple standalone java application that allows users to tick which messages they want to transfer and then click go, essentially. We now need to provide different users with a different ...
-3
votes
1answer
62 views

How do i decide the compute sizing for a portal [closed]

I am designing the government portal that is gonna provide scholarship to various students under numerous schemes from GOI. In that way around 40 million users would be there to use the portal. how ...
1
vote
1answer
66 views

when and how to use class responsibility collaboration cards vs sequence diagrams?

I've recently come across CRC cards and sequence diagrams at my university. Martin fowler has said that sequence diagrams are interchangeable with CRC cards when you're in the design phase of your ...
0
votes
1answer
43 views

Limiting access to telemetry API only for certain application

Let's consider such an example: I'm an author of application like Google Chrome. I would like to my application sends anonymous telemetry logs to my server. How do I prevent somebody to use my server ...
-1
votes
2answers
86 views

Payment Processor using polymorphism?

I am writing a payment Processor class, then will take different payment objects in input and talks to external services to process payment.My class is designed using polymorphism as follow: public ...
15
votes
4answers
3k views

Should entities contain information about their amount?

Can I get some thoughts on the entity design? Let's say I have an entity called Book. Let's say I create a specific instance of that book. It has a title A and an author B. Since there can be multiple ...
0
votes
0answers
50 views

Designing a unique id reliably based on a String date?

I am creating an Android application that sets alarms based on the String date of a list of Objects (PendingIntents, with each taking in an id, that is an integer). In order to cancel the ...
0
votes
0answers
39 views

Multiple endpoints but share the business layer

I am looking at a code base that has multiple APIs and traditional server rendered website. The business logic is duplicated between each of the APIs. I would like to clean this up and share the ...
0
votes
0answers
45 views

HTTPS headless browser to HTTP localhost Flask

I have two Docker containers: Headless browser grabbing images by running JavaScript Flask server analysing these images (and sending results to another server) I'm using a bridge network to ...
0
votes
0answers
29 views

What are the best choices to make for scaling a rule-based chat application?

I am trying to build a rule-based chat application that will integrate with Facebook Messenger. The application will ideally have a set of flows, like registration of a customer, subscribing to a ...
2
votes
3answers
144 views

When does a function violate the SRP?

I have a function that was written because several methods used the same sequence of code so an abstraction was useful. The function takes a string representing the path to a registry key and then a ...
0
votes
2answers
117 views

Loop outside method or method with internal loop?

If I have a list of objects that need to have an operation performed on each, is there a best practice in abstracting the loop or not? Looping over list and call def func(item): some_op(item) ...
0
votes
2answers
144 views

Technology choice reasoning

I am tasked with making a program that will roughly have the same steps as a program that a former has written. The program that I'm trying to imitate doesn't seem to be open for extension, otherwise ...
1
vote
2answers
84 views

Should a single method in a service class perform multiple operations for its controller?

Let's say I have a controller called MessageReceiverController which is a controller of an API that other services can call and include messages in the requests. For each of the messages the ...
1
vote
4answers
158 views

How to express abstractions?

In a program there is an abstraction from an person to a shape. This abstraction is so that collision detection can be performed. Here is my original class hierarchy: namespace Graphics { class Shape ...
1
vote
0answers
30 views

Managing the output rate for a queue triggered service

I have a service which is triggered by messages from three queues (which are populated by different topics), and writes the processed results to another system (say DB service) synchronously. The ...
2
votes
2answers
96 views

How to go about calling parent's instance method from child instance?

This question is a continuation of a question originally posted here. I'm trying my hand at creating a Snake clone with JavaFX. One of the requirements for the game is to have a sort of powerup food, ...
1
vote
1answer
90 views

Using isinstance() during exception handling for subsequent action

I've read various posts that polymorphism should be used instead of isinstance, and I agree that makes sense when the use of isinstance is checking the subtypes of a class to determine what to do. ...
1
vote
2answers
65 views

c# template method pattern design question

I'm currently in a situation where I have multiple derived class types(just one is shown in the example below) that need to apply some logic before and/or after calling a method implemented in a ...
1
vote
1answer
51 views

Design help for web application that will run as separate instances with different content

I've built an RSVP web application with a React front end, Node.js backend, NGINX webserver, SQL database and hosted on a DigitalOcean Droplet with Ubuntu. The issue is, every time I want to launch ...
-1
votes
2answers
144 views

Need help with thinking about design to build bidding service [closed]

I have a legacy service written in a procedural style which I am rewriting. I want to improve the maintainability first and foremost; the code gets tweaked often as the business rules change over time....
2
votes
1answer
62 views

Choosing test method of bash command output with bats

Context While writing a bash script I would like to test every command I write. To do so I create a separate function per command that executes the function. In addition I want to log the output of ...
2
votes
1answer
127 views

Event Driven Architecture how should channels be used

I'm using event driven architecture, to perform realtime signal proccessing and to provide independent metrics. I decided to use a redis cluster to act a cache and a message bus. I'm a bit confused ...
4
votes
2answers
143 views

GoF Builder Pattern Applicability

The book Design Patterns: Elements of Reusable Object-Oriented Software says to use the builder pattern when The algorithm for creating a complex object should be independent of the parts that make ...
1
vote
4answers
101 views

Using Enum to represent VehicleType in cab Booking system

I am working on low level design of cab booking type of system and feeling stuck at modelling Vehicle in Booking class.I came up with following design. Class Vehicle { } ...
1
vote
1answer
72 views

Implementing SSO on a REST API

I have a REST API server with its own authentication methods. I need to provide to some third party apps an authentication solution which should be processed on my server, I don't want them to handle ...
-1
votes
1answer
49 views

Designing around potentially multiple RESTful API calls to a downstream service

To set up the problem, let's imagine we have a downstream service that we need to call for some information. We set up an API endpoint and call another method which will hold our business logic and ...
6
votes
1answer
159 views

Handling same exception thrown by different methods

Is there an idiomatic way to catch an exception when multiple methods may throw?: try: someMethod() # raises OSError someOtherMethod() # raises OSError except OSError: handle() The ...
18
votes
3answers
2k views

How do you push Design changes in TDD in late development stage

I was recently part of a TDD development team. At certain point I realized that there is a design mistake instead of Object Oriented Design and Structural design the problems were solved via statuses. ...

1
2
3 4 5
95