Questions tagged [design]

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

Filter by
Sorted by
Tagged with
1
vote
0answers
32 views

Pure Components in Software Architecture [on hold]

Like "Pure Functions" in functional programming, which do not have any side effects, are there equivalent abstractions in Software Architecture/System Design? One of my main considerations during ...
0
votes
0answers
34 views

Enterprise Architect - Decision block and DEPENDENCY

I would like to ask for help with activity diagrams in EA and decision block (branching). Lets assume we have simplified activity diagram with decision block "Is working day today?" with 2 branches "...
-1
votes
1answer
40 views

CLI application: avoid boilerplate caused by different output formats depending on setting [on hold]

I have a CLI application that can print results in different formats, for now it's just JSON or plain text on the shell. Users can choose the format they want from the command line, the args parser ...
-1
votes
0answers
52 views

React - components or javascript, what is the better design decision? [closed]

For work, (this is in React) I had to develop a page with several panels. One panel has sub panels down to 3 levels. I developed all the panels as components. And also the subpanels as components. So ...
0
votes
2answers
65 views

About modelling behaviour. More parameters on function, or new function?

First, let me set up some context. I have a function that simulates a user typing a string, printing each character of the buffer at a fixed delay. But now, I want another behaviour. There has to be ...
-1
votes
0answers
22 views

How to maintain a software with different customized version? [duplicate]

I'm working on a software which has a lot of different clients to use in their customized requirement. The software is a desktop application based on C# WPF, which is mainly used for supporting the ...
4
votes
2answers
332 views

Am I Over-Engineering if I add some code for the unknown future? [duplicate]

Look at this code: Console.WriteLine(user.name); Console.WriteLine("**********"); // 10 stars //... Tomorrow, I needed to use 20 stars instead 10 stars. Okay I would change it: Console.WriteLine(...
2
votes
2answers
80 views

Do I use Repository or Service Object to Perform Logging?

I'm working in Java Spring, and I have typical service and repository layers. The repository grabs a JSON; passes it along to the service; service maps the repository response to a DTO. I also need ...
3
votes
3answers
92 views

Delete user data or replace it with empty resource?

Say, we have a public facing REST API which lets user manipulate data using POST, GET and DELETE. The API is exposed via Service A which at the backend calls Service B where most of the business logic ...
-1
votes
1answer
97 views

How to separate fields from methods in logical manner?

In my application I have entities like employee, client etc. Each of these have methods AddEmployee, RemoveEmployee, AddClient, RemoveClient. I don't want to keep fields like EmployeeName, ...
0
votes
4answers
136 views

Is it worth logging HTTP requests when they enter an API server?

I'm designing an API and have reached the topic of logging. I'm going to store my logs in Elasticsearch. I'm certainly going to do some logging at the time the HTTP response is sent back to the ...
0
votes
1answer
70 views

A RESTful API for internal company system accessing peripheral devices

I am currently working on an internal storehouse management system for a certain company. They wanted it to be a web app so that they can use it without installation on any devices. We decided to ...
1
vote
3answers
221 views

Enum design: when is an “open” value set acceptable?

I was looking into the Enum design recommended by Microsoft (see here), and I found a statement that made me stop to think for a while: X DO NOT use an enum for open sets (such as the operating ...
0
votes
1answer
103 views

Is duplicating, deleting, pushing, and/or an object to/between lists a code smell?

I'm thinking about a structure like this. cardGame: players: - john: hand: - card: id: 1 suit: diamond ...
1
vote
0answers
56 views

Design question : is getting value from different datasource based on the certain condition a bad design?

Currently I am modifying an application which has a datasource and multiple configuration based on the server configuration (Staging, production etc). Each of the environment has different ...
2
votes
2answers
125 views

How to deal with duplicate features and/or redundant programs?

We have started trying to move toward CI and automation. There's not a lot of cross-talk between teams, and I've discovered that many have developed simple or sophisticated build & test scripts, ...
0
votes
1answer
161 views

Is it appropriate to run everything through web applications? [closed]

I work for a company in which the majority of our overall platform consists of a massive, monolithic web application. Nearly all of the application's functionality resides on 2 servers. Our main, ...
0
votes
1answer
73 views

Solving Event Dependence in Event Driven Systems

There are 60 Million Shipments per day. Each shipment has about 50 metrics to be calculated. Each metric is calculated based on a type of the event(Let's say event_1 has the required information to ...
1
vote
1answer
38 views

How to handle or design review system with pagination?

In typical online review system if any user give review on specific post or others thing, then when that user view that post his review show first. The perfect example of this is Google Play Store. If ...
1
vote
5answers
154 views

What are some efficient and easy-to-remember schemes for randomly-generated sequential ID numbers? [duplicate]

I am considering a new scheme for order numbers for our ERP system. For reasons I'd like not to get into, the number must be fairly easy to remember and must say something about the time (or at least ...
0
votes
2answers
240 views

Should this class be immutable?

Say I have a class that is used to monitor the size of a directory. Currently it can only monitor the size of a single directory: public class DirectoryMonitor { private final File ...
0
votes
2answers
51 views

Need suggestions for creating field level permissions which can be changed dynamically in an app

This is currently my User-Role-Permission model in the Db schema (excluded other tables to avoid confusion). My implementation goes like this: I have a Customer table and each Role has a different set ...
0
votes
6answers
427 views

Should setters only set values?

I always like to overthink things, so here's my thought of the day: Should setters only set the values of class properties, and not perform any other logic? Suppose I have a class class User { ...
-1
votes
1answer
52 views

What is the best design for this use case regarding bidirectional relationship? [closed]

For this question let's consider a system in which the users can match with each other (let's say for simplicity exactly like the dating apps). User1 matches User2 (and the other way around) only in ...
0
votes
1answer
50 views

What's the use of event sourcing and asynchronous message queues for sending commands

In short: Out of order commands end up with out of order events, so does the ordering of the events matter in such situations? Since we are uncertain about the order of commands when an asynchronous ...
0
votes
4answers
328 views

Are there limits for programming languages calling others?

So earlier today I found about IronPython: IronPython is an open-source implementation of the Python programming language which is tightly integrated with the .NET Framework. This was my first ...
0
votes
3answers
133 views

Should the attributes of a class be part of the public interface even when they could break its methods?

As a minimal example, consider the following (in Python): class Foo: def __init__(self, bar): # Assume bar is a valid at this point self.bar = bar def divide_by_bar(self, num)...
0
votes
0answers
47 views

Need some design advice on my ORM for Immutable objects & ref passing

I'm adding Immutable objects support to my Micro ORM called "Symbiotic" In the case of a create, I need to pass back a newly created version of the value passed in because the object is immutable and ...
0
votes
1answer
29 views

Update items based on a read operations on same items is a bad practice?

DynamoDB is the database solution, I'm using to store my items. It's a NoSQL/Document database and I got a real problem on real-time updates of items. First, the saved format is like { expiredTime:...
0
votes
1answer
66 views

Granularity of the Single Responsibility Principle [duplicate]

This is a related question and the OP appeared to go with extreme levels of granularity. The answers gave a good overview but I gather it's still somewhat down to personal interpretations/situations ...
0
votes
0answers
25 views

How to cache timestamp based key values with a distributed cache?

I have a dataset in a key value store (similar to Cassandra). The data model is - Key - ServiceName / timestamp_in_milliseconds value - operation In the write side I get some operations for a ...
1
vote
2answers
32 views

Excel Addin VBA, Backend/Frontend

I have a question regarding what is supposed to be backend and frontend for desktop applications and in this special case, an Excel Addin VBA. My application contains lot of forms and modules. I ...
0
votes
2answers
159 views

Rest API POST with illegal data in parameters: Bad Request or 404?

Take a hypothetical camera company providing an API to manage its users and cameras. Each user owns cameras, and every user of a camera has a role assigned (one of admin, operator, viewer - these are ...
0
votes
0answers
21 views

Comparison between central logic or distributed logic in microservices?

I'm designing an application in a microservices architecture. The app has its own logic but also needs to collaborate with other services. For example, the app is A, and other apps are B and C. ...
2
votes
0answers
28 views

How Best To Store Data Structures Around Flow

I'm working on building a simulator for HVAC units. The conceptual model I am working with is basically that an HVAC unit has inputs and outputs, and I need to be able to calculate the outputs for a ...
1
vote
0answers
104 views

Circular dependence and many references to the same object

I have tried to design a class diagram for my first game. But then I realized that there are some ugly parts. First, there is reference from StateSystem to State and from State to StateSystem. The ...
-1
votes
1answer
76 views

Is there a reason to have multiple projects for a single API? [closed]

I entered yesterday to my new job and while browsing their repositories, I noticed they have a project for every resource of a REST API. For example, if they need to add a REST resource called "people"...
0
votes
2answers
102 views

Best design for a AMQP work queue

I have a system where a user uploads a file to import some users but it's necessary to do some validations and this take some time. I would like to create a work queue with RabbitMQ and the user will ...
-1
votes
1answer
103 views

I have a data set of over a million addresses and I want to display the closest N locations to a given address or current location

I am a student working on a personal project which is essentially a location finder that will be on a website. I have a data set of over a million addresses and I want to display the closest N ...
-1
votes
3answers
177 views

Is it ok to have a class contain a list of its parent object?

I'm working on a software in which the client wants the admin to have all the rights to view and update the info of other employees. The admin is an employee itself so this is what I've come up with ...
0
votes
0answers
65 views

Business logic in a stateless backend when frontend already has all the data

I have a frontend application, that only knows about and communicates with a single backend service. This backend service serves only this frontend app and no-one else. Backend is completely stateless,...
0
votes
1answer
46 views

Design pattern that can be used for checking and handling a change in version number for incoming JSON message into data stream?

I have a Spark Streaming Job which processes messages coming from Kafka. My incoming json that I process sort of looks like {"sv" : 1.0, "field1" : "some data"} The only thing I do is put these in ...
1
vote
1answer
48 views

Front-end supporting multiple back-end versions - Maintaining backward compatibility

I know it's a broad question so I'll try to be as specific as possible. This question is probably as much an "organisational" question as a technical one. Our company is selling our software/platform ...
0
votes
2answers
101 views

How can independent game-modules block system-wide behaviour

We've stumbled at an inconvenient design in a game and wondering, whether there is nothing simpler. The background needs some explaining so I'm sorry for the wall of text. The setting We have a ...
0
votes
0answers
18 views

Updating an entity and many relationships: database vs application layer

We are working on a transformation project It has records in table entityA and entityB, which has a relation entityAB. We need to delete records in table entityA and recreate them with some other ...
0
votes
3answers
149 views

Domain Models with complex properties construction

According to this article: Using Ids in Domain Models is not a good practice. We should reference the entire domain model instead. In this case, when we want to provide only Getters for our ...
0
votes
1answer
51 views

What sort of data limit would make sense for pulling down all data vs autocomplete/pagination via ajax?

Imagine a page with an autocomplete textbox on it, to get Customer. I am wondering what sort of limit for record size makes sense in this day and age regarding whether all the customers should be ...
1
vote
3answers
69 views

Handling errors in looper/event loop interface

I have a C++ class that spawns a thread that contains an event loop of sorts and the class provides an API to query the list of events that have occurred since the last call, i.e something like std::...
0
votes
1answer
162 views

Where would you handle exceptions: controller, service, repository?

I have been having this dilemma from time to time whenever I have to design or start a new project from scratch. I particularly like how Spring framework is organised in terms of classic software ...
0
votes
2answers
82 views

Incorporate a background job enqueue endpoint in a REST API

To exchange data between our standalone frontend application and the backend API, we currently have a REST API, with standard endpoint to list/create/update/destroy ressources with a consistent naming ...