Questions tagged [design]

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

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

How to handle pagination in a stateless application having multiple components involved for the data?

This problem statement is around one UI component, 3 service components. The current design of the application is like: UI makes request to Service-A to get data Service-A first makes a call to ...
0
votes
4answers
106 views

When to pass a concrete object, vs a way to obtain the object

Say there is some view that displays user details like name, age, email, etc. That view could maybe be constructed with the following pseudocode: UserView(User user); And that view would be able to ...
-1
votes
0answers
35 views

Representing paths SVG-style vs as bitmaps

When developing drawing-related applications, you have two extremes on how you store things. One option is what MS Paint takes - you just store the final bitmap, not caring about individual things ...
0
votes
0answers
37 views

Where to carry JWT Tokens in Requests

I have an AspNet application which I'm authenticating using a separate AspNet Core application. It returns a JWT token which is then carried in a Http Cookie. The AspNet application validates each ...
0
votes
1answer
141 views

What is the most common stateless way for authentication in microservices?

I'm trying to get into Microservices by creating a project, so far I've stumbled upon authentication mechanisms, in a monolithic architecture, the client (web app) would send a request with the user ...
0
votes
0answers
42 views

How should I wrap an asynchronous operation as a coroutine?

Suppose we have an asynchronous IO operation int asyncIO(char* buf, int n, void (*callback)(void*), void* ctx); which fills buf and calls callback(ctx) on completion. Presumably, if I wrapped the ...
-1
votes
1answer
97 views

Java: Splitting a large unit test class

The project (Java/Spring) I currently work on has a rather large unit-test class for one of its services : more than 1000 lines, several Nested class (one per big functionality), some tests without a ...
1
vote
4answers
167 views

When are Description classes useful

A book called 'Applying uml and patterns by craig larm' emphasized the use of Description classes in software designing. For example, the book pointed out why putting attributes such as description, ...
5
votes
4answers
4k views

Which is preferred: subclass double or create extension methods to test (relative) equality due to floating point differences?

I am writing numerical calculation software using .NET C#, which needs to be blazingly fast. There is a lot of fractional math. So using decimal type is pretty much out of the question, given its poor ...
0
votes
1answer
55 views

How to inform the controller why the object creation has failed so an appropriate response can be returned?

In my MVC web application the controller calls a service layer which takes any relevant request parameters and builds the model for the view e.g. Controller var model = _modelService.Build(id); return ...
1
vote
0answers
46 views

Building a Microservices App — Can you give feedback on architecture?

I did some googling, and I was directed to Software Engineering to ask architecture questions. If you know of a different forum that could help me, please direct me to it I recently started learning ...
0
votes
1answer
121 views

A desktop app which incorporates a REST API?

I am planning to build an adapter between a PC and devices which have the same function but which have different interfaces. The adapter will probably be based on a Raspberry Pi and will have a touch ...
-2
votes
1answer
124 views

To return or not - redundant data from method arguments

Which code should I prefere and why? Is there some general rule? Code 1: var apiLicenseInfo = GetLicenseFromApi(string userId, string deviceId); var localLicenseInfo = MapToLocalLicense(apiLicenseInfo)...
-1
votes
3answers
87 views

Should methods with business logic be made private? [duplicate]

So I am writing a project using Spring Boot. All of my logic resides in @Service classes. I have separated each service class based on entity. For example - If I have two independent entities A and B, ...
-1
votes
1answer
63 views

Setter dependency injection or locator pattern

Let's say that I have the following class. class Application { protected $dependency; public function setDependency($type) { $this->dependency = ServiceLocator->...
-3
votes
2answers
81 views

What Design Patterns for encouraging component reuse?

One of the major issues that I am facing as a Website and App developer, is that certain components / features have to be redeveloped over and over again with a new project. For instance login, signup,...
2
votes
3answers
141 views

Entities vs. Services in domain driven design (DDD)

I wanted to get some feedback on the design of a chat application I recently developed. The application is written in PHP, but the language probably isn't important here. The main components are User, ...
-1
votes
0answers
64 views

design pattern to simplify nested if statements

I'm implementing a search functionality and based on the query parameter i use a different class to search. I will only illustrate one SearchStrategy which is the SearchThreads, just to make the ...
-4
votes
0answers
26 views

Developing with an application using oauth (bypass in dev environment)

I guess the answer to this is more of a personal opinion than anything but I am using Azure active directory to validate users in my web application. This obviously can be a pain as I have to log in ...
0
votes
4answers
161 views

Prevent developer errors / debugging help

How much should I factor in potential future developer error when writing code? This works better with a few examples: switch(something) case 1: return good; case 2: return fine; case 3: return ...
3
votes
3answers
223 views

Is my understanding of SOLID principles correct regarding my concrete implementation?

I read everything and its opposite about how to organize its code. Of course, I try to follow the SOLID principles, but since I consider myself quite a beginner, I would need some outside advice on ...
-4
votes
1answer
58 views

How to combine a web application with a desktop application to make a single one? [duplicate]

I need to seek opinionated suggestions from the experts. I have a very large application which provides a wide range of functionalities. I have another desktop application which runs in the system and ...
-2
votes
1answer
66 views

Handling Legacy Database with Spring Boot Java

We are given a task to create an Web Service API for a mobile application. The problem is we have to use a legacy database that is not normalized and its very tedious to work with. We are accustomed ...
0
votes
0answers
51 views

Is gRPC a good choice for my scenario?

Im starting to develop a visually-simple but infrastructural-ly robust real time multiplayer game to show off my backend skills and hopefully get a job at Blizzard or something like that. The game is ...
0
votes
0answers
22 views

Offline app with syncing features with React Native

I am currently building an ordering application where users can send orders for available items. It must have the functionality to work offline as well. After user is online, the user has the sync ...
-3
votes
0answers
49 views

How do Large Technology Companies Automatically Generate ID Tag Locators For Selenium Testing?

We are planning to write data-qa Or Id attributes across all our HTML Application Pages for Selenium Automation testing. This means all Webpages will requires hundreds of tag locators. Looking at ...
-1
votes
1answer
107 views

Doing work when passing constructor arguments

This is very closely linked to the question Legitimate "real work" in a constructor? but not quite the same. I am interested in having feedback on whether this is acceptable or has any risks....
0
votes
3answers
60 views

“Assign” Role Association between two classes

If there is Class A and Class B and there is an association that B can be assigned to A.And the multiplicity is 1:M or M:1 from A to B.Example: 1.Room has Collection of Keys, and Key can can assigned ...
0
votes
1answer
74 views

How to design a social media follower/followed relation with UML?

I am working on a UML diagram for social media website like Facebook: The main class of this system is User, which has members as userid, email, phone, address, Friends, etc. A user may follow a set ...
-1
votes
1answer
55 views

Best way to create a modal setup

I'm making an online food ordering platform similar to something like Uber Eats. I have the menu items stored in the database which are then sent to the front end where I use a templating language to ...
0
votes
1answer
59 views

How to determine ideal chunk size for file writing?

I have a class that is responsible for writing formatted binary objects to a file on a network drive with a 100Mbps bandwidth. Each time an object is created (via lets call it w.addObj()) it formats ...
-2
votes
0answers
28 views

What is a good pattern for passing a list of constant strings to front-end via GraphQL

This is using Python and the Graphene library. I want to provide a list of constants to my front-end via GraphQL. I went down the route of using inspection, but it will only output the keys of the ...
-1
votes
0answers
31 views

Validity of using Event Sourcing only on Invoicing system

To set some context, we have a telco system that contains multiple parts. Lets say we have Subscription, SMS Messaging, Voice Messaging, Charging, User, and Invoicing. Each of this have their own data ...
1
vote
0answers
49 views

How to efficiently map unknown vector fields

I've got a problem I've been wrestling with, and I'm really truly stuck: I have a bounded, continuous vector field and my goal is to map it using discrete measurements at specific points. I can only ...
2
votes
1answer
81 views

Are there any C++ command pattern implementations which make it easy to add additional functions and their parameters

For my situation I have a device receiving string commands such as turn_on, pump, etc. Some of these commands also have arguments attached to them such as an int. I have methods like this void turn_on(...
0
votes
3answers
138 views

Enums or Multiple Inherited Classes

I am reading about OOD and came across Parking lot design problem.Parking lot has parking floors which has parking spots.The parking spot class looks as follow: public enum ParkingSpotType { ...
0
votes
3answers
140 views

Use the type returned by a function as information

Over time I become used to use the type of the returned value of a function as a piece of additional information. For example: A function that is supposed to return or an array if the arguments are ...
-1
votes
3answers
98 views

Difference between update a property and fire an event

It seems to me that update a property is always an 'event' and that all you can do with an event handler can be done in the property let/set routine. And, in my limited experience, I never needed to ...
2
votes
0answers
33 views

Designing a filtering function

This question is not so much about how to implement a solution as I've already implemented a working solution, but more about how to improve how I implemented it. The implementation process of the ...
0
votes
3answers
146 views

System Design: Efficient way to import hundreds of different CSV formats

OVERVIEW We have multiple data providers who provide us information from a large set of data sources. These end data sources provide data in CSV format. Since, the CSV formats are not consistent ...
-2
votes
5answers
273 views

Why does today's companies follow old RFC's?

Let me start by saying that of course conventions are important, there should be a rule of thumb for some cases that is representing the best action to follow by, in order to prevent mistakes and make ...
1
vote
0answers
44 views

Notification System Design for Multi User Application

I have a requirement to design a notification system for multi-user(~1000 users) application, here are the high level requirements. System event gets triggered on specific operations. On event ...
-4
votes
3answers
135 views

Methods that receive buffer objects AND return another Object - is that bad design?

The Argument Some say that if you write a method that receives a buffer, iT MUST RETURN VOID -> the buffer is your exit point. Do not abuse the methods by receiving buffers AND returning a another ...
0
votes
1answer
47 views

Pubsub model - publisher broadcast to remote subscribers

With a single publisher(go-routine) and multiple subscribers(go-routine) on same machine, below message hub help create pubsub model: type PublisherHub struct { subscribers map[*subscribmediator....
0
votes
1answer
97 views

How does a database update trigger a notification to application layer?

Application component 1(ap1) record/insert/update a new state in graph database(neo4j) For every new state change in the database, application component 2(ap2) needs to be informed/notified that a new ...
-1
votes
1answer
71 views

How should I document a higher-order Python function?

I'm interested in designing a high level function in Python, (I.E. a function that takes other functions as arguments) but I don't know of any good conventions for documenting such a function. For ...
0
votes
1answer
49 views

Multiple sources of truth - Optimistic concurrency & Eventual consistency

I have a couple of web applications that write to their own databases. They also share a few entities, for example, the customer entity. My business case is such that the same field for the same ...
1
vote
1answer
143 views

When should an argument be set to None in Python?

The focus of my question is on design. If I have an argument that can be None and it is passed between several functions until finally being used, which function should treat it as a default argument? ...
1
vote
1answer
66 views

Multi threading a database driven service

First some background on the problem, we have a windows service (C Sharp) that receives new messages and processes them.It is database driven so it checks a table for unprocessed records, processes ...
4
votes
1answer
202 views

Temporary features - Good practices

I work in a company where we do administrative tasks for other companies. With covid-19, there are many temporary laws to take into account. My company did as it did before : simply creating the new ...

1
2 3 4 5
91