Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [design]

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

0
votes
0answers
33 views

How to create a tree-hierarchical structure with unique behavior for every type combination?

Assume: There is some module whose interface is IA. There is some module B, that takes in a parameter an instance of IA, and whose behavior depends upon the type of that IA, meaning (pseudo code, no ...
6
votes
4answers
550 views

is this way of calling a function a bad practice?

I have the following code: public void moveCameraTo(Location location){ moveCameraTo(location.getLatitude(), location.getLongitude()); } public void moveCameraTo(double latitude, double ...
0
votes
1answer
45 views

Defining object definition scope based on domain

I had an architecture question about how to manage objects with different properties based on the services they are in. Is it okay to have an object defined in to different places with similar ...
7
votes
4answers
295 views

What is the best definition for Dependency Injection?

Every time someone reaches me and asks me to define the Dependency Injection in a conceptual way and explain the real pros and cons of using DI in software design. I confess that I have some ...
1
vote
2answers
101 views

Designing a big data web app

How do you design a website that allows users to query a large amount of user data, more specifically: there are ~100 million users with ~100TB of data, data is stored in HDFS (not a database) number ...
0
votes
0answers
15 views

Messaging engine architecture with front-end and ORM layer (spring)

I'm looking to push my first QuickFixJ messaging engine into production, and I would like to know the best way to do so. Bear with me. The gist of the responsibilities is as follows: Through ...
0
votes
2answers
51 views

Most efficient way to get unique customer count

I'm working on a system that stores details of customer purchases for several stores. One statistic that they would like is to know how many unique customers they have had over a specified day range, ...
1
vote
1answer
22 views

Best practice to confirm unique username for user creation in JSP and JDBC?

First let me state the asynchronous approaches:- The user enters a character into the username form field. I create a connection to the database, use a prepared statement to confirm whether the ...
2
votes
3answers
101 views

Design: Where should methods specific to a model, but not an instance go?

Let's say I have a User model defined. It makes sense that methods for retrieving certain fields of this model lives in the model file. My question is where something that generates a unique UUID, or ...
0
votes
1answer
40 views

How to build a custom intermediate operation pipeline in Java for a series of API calls?

I am working on a project which provides a list of operations to be done on an entity, and each operation is an API call to the backend. Let's say the entity is a file, and operations are convert, ...
0
votes
0answers
33 views

AMQP integration

I’m trying to make a AMQP integration layer for my app. This layer would only consume messages from my customer’s queues and the result would be a specific action in my application. My application is ...
1
vote
0answers
42 views

How to solve circular dependency scenario while executing http calls which require authentication?

I am working on a project which requires me to execute standard HTTP calls with session tokens. I am building a custom HTTP client, with a custom authenticator, something like this: Client client = ...
0
votes
0answers
80 views

Base class with bool flag to imitate virtual constructor

I am using bool flag to call base class function when needed to imitate virtual constructor. I am using this way for inheritance purpose. I have a Base class constructor with int and bool. The bool ...
2
votes
1answer
56 views

In a multi-tenant micro-service architecture, who stores the account IDs for each tenant?

I've been doing some research on multi-tenant systems and micro-services and I'm a bit confused by this. If each micro-service has it's own database, and implements the support of multi-tenancy in it'...
2
votes
1answer
104 views

Long running server process. How to update client

What I'm looking for is a pattern for the client triggering a server process, then the server process signalling the client when its finished. preferably with examples available in .NET or dotnetcore ...
2
votes
4answers
260 views

How to adapt Clean Architecture to a rich desktop application

I'm just learning about clean architecture and I'm trying to design a proof of concept for an application I want to build soon. In the Clean Architecture the Presentation layer and the Domain Model ...
-1
votes
0answers
16 views

Design of a service to manage and expose product definitions

I’m trying to come up with a high-level design for a service that manages and exposes definitions of a relatively small set of products. Context: An online tool allows a user to design their own ...
-2
votes
0answers
32 views

How to design the iOS App that runs only one REST API responses?

I have to develop an app which has nearly 50 plus API calls to the server. And iOS app is just a UI layer for the API responses. Also based on these responses, application UI states gets updated in ...
0
votes
3answers
152 views

How to best design a software feature when work shifts are considered

I am making a program that tracks whether an employee has checked in on a software app that day. The employee can check in at any time, so long as they check in before their shift ends. If they don't ...
0
votes
4answers
104 views

Does a server send a client a ServerMessage, or a ClientMessage

Suppose I have a server and a client. When I send a message to the client, would I be sending a ServerMessage, or a ClientMessage? The other way to think about it - when I receive a message, it is a ...
0
votes
2answers
51 views

Architecture/design for reading incoming data and distributing it across program

This may be a broad question but I have not been able to find an answer. In my program I am communicating to a device over serial communication. The data coming through is binary, and formatted with ...
1
vote
0answers
81 views

What are some examples of generality?

The cover of the book The Practice of Programming lists programming principles: Simplicity Clarity Generality Intuitively I understand generality as preferring to solve the general problem rather ...
0
votes
0answers
29 views

Does separating chunks of “similar” code into separate functions really improve maintainability? [duplicate]

I was working on a relatively large function recently (about 500 LOC) and I noticed that a lot of the code could be relatively well summarized into a few different chunks of code: void MyFunction() { ...
0
votes
1answer
66 views

What approaches are there to making apps homoiconic from users' perspectives; which are good, which bad, and why?

In terms of an application that's about affording its end-uses the ability to add, view, and manipulate their own data (like Podio, Trello, Redbooth, Asana, et cetera), I'm wondering how it can be ...
0
votes
0answers
82 views

The Frontend-Backend Vs. Backend-Backend

I've seen this pattern pop up in a couple of different teams. They have a server with a REST API and a frontend web project. What commonly happens is the frontend developer finds their requests are ...
-1
votes
1answer
119 views

Start frontend development with incomplete analysis, delayed backend and no API

To give a bit of context first, I have been tasked to mentor an internship on creating a UI for a certain business need: Already 4 months were spend on analyzing, creating the business use cases ...
1
vote
1answer
61 views

How to balance code duplication with being able to prevent unnecessary service calls

Apologies in advance if this is considered opinion based, but I wasn't sure where to ask it and was interested in learning if there were any definitive best practices. Say an application calls a ...
0
votes
3answers
73 views

How can I do a step based design form my applicaiton?

I want to create an application that has some optional steps. But I could not decide how to do step plans. It looks like a workflow. I have a Work entity. This work includes specific business steps. ...
1
vote
0answers
43 views

Strategies for dealing with Stale data and Fetching

I'm working with firestore and have encountered several situations where a document will contain stale data which is a duplicate of the source of truth located elsewhere in the database. For ...
0
votes
1answer
74 views

Moving from a Coded Approach to a Stateless Approach

Our project is in its early stages and we are currently using Uncle Bob's Clean Architecture (also known as the Onion Architecture). An overview of our project is as follows: domain package ...
61
votes
12answers
9k views

Having a flag to indicate if we should throw errors

I recently started working at a place with some much older developers (around 50+ years old). They have worked on critical applications dealing with aviation where the system could not go down. As a ...
0
votes
0answers
78 views

How to handle shared data across microservices?

At my work we have a typical microservice architecture, but one of the issues we are running into is sharing data across multiple services. We have certain data that is used by multiple services and ...
2
votes
1answer
213 views

How to handle a software design project when I am the only member of the team with any design experience

Some background I am the newest member of a small team of 3 developers. For the past two years I have been working with them on an application the two of them made roughly 5-6 years ago. This ...
0
votes
1answer
61 views

Avoid numerous dynamic_cast_ptr in the API design of polymorphic types

I am trying to design a geometric intersection API. Below is the code to represent geometric elements. #include <iostream> #include <memory> // Since I did not write the Shape class I ...
0
votes
2answers
93 views

Is it possible to represent an if statement in a system sequence diagram?

I'd like to highlight that this questions is about a System Sequence Diagram (SSD) and not a simple Sequence Diagram and of course any help would be appreciated! I'm reading Graig Larman's book ...
7
votes
4answers
651 views

What is “premature abstraction”?

I've heard the phrase being thrown arround and to me the arguments sound completely insane (sorry if I'm strawmaning here, Its not my intention), generally it goes something along the lines of: You ...
1
vote
2answers
54 views

Should data be pre-processed before being handled by an ETL framework?

So I was discussing coding with an associate of mine at work, and was mentioning how I was working on a project where I'd need to transform the data that was provided into a standardized format before ...
0
votes
2answers
77 views

How to design an API wrapper with bulky operations on domain object? (Need guidance)

I need some guidance in designing an API wrapper for my backend APIs. I have tried to keep it as specific as possible. Context: We have a project which supports certain file operations like edit, ...
1
vote
3answers
261 views

At what stage should the (G)UI be designed?

I'll take out the ellipsis to make this easier/quicker to read: Large group project in school, stakeholders gave a fuzzy explanation as to what they want. I suggested that we: sketch the GUIs so we ...
1
vote
4answers
85 views

Passing Information to a method using primitives vs and object instance

I have trouble understanding if I should pass an argument to a method as a primitive value or as an already-obtained object. Consider this simple example interface Channel{ String getId(); ...
1
vote
1answer
32 views

Serving tasks for multiple users from one queue in parallel way

I'm designing a solution in which users perform tasks based on task queue. The point is to create system, where user goes on specific URL and server serves him listing with for example: items to asses ...
2
votes
2answers
116 views

How to prevent overlap booking on a calendar booking system

As an exercise, I am trying to design a simple calendar booking system for multiple meeting rooms. I kind of got my head around some requirements such as find available rooms for a given time range, ...
1
vote
3answers
152 views

Design - What is the best way to separate functionalities?

I recently worked on a file explorer within a console window (like Midnight Commander). I want to use ncurses as library. I have encountered some fundamental problems with my design and searched on ...
0
votes
1answer
44 views

Using Spring Boot's @ConfigurationProperties without violating Law of Demeter

My apps commonly have one or more prop holders. These holders contain config data used in the app such as: @Component @ConfigurationProperties(prefix="app.orders") @Data //lombok public class ...
1
vote
2answers
49 views

DDD aggregates, entities, REST and how they all fit together

I'm trying to apply DDD principles to an application that has a REST API in front and is backed by an SQL storage. Here's the entity structure I have come up with so far: Client: 1 ---- * Contract: ...
1
vote
0answers
19 views

How to Implement Certain timeout session on multiple pages of a website - REACTJS

Suppose there 5 pages to a website. User flow will be 1->2->3->4->5->FINISH. I want to implement is that whenever a user enters page 3 a timer starts and if he doesn't finish a task ...
2
votes
0answers
79 views

How should a non-React component subscribe and respond to Redux state changes?

I’m new to React/Redux tools and still figuring out some idiomatic design patterns. Here's a scenario: A user adding a place marker 📍 (that has some associated metadata) to an interactive map (...
1
vote
1answer
224 views

Creating a control flow graph for a given function

Given is a short Java function and I like to create a control flow graph for it but I'm not sure if it's fine like that? Because I left some things away such as variables that have already been ...
0
votes
0answers
25 views

Approach for a timed events in a framework-like library - a matter of life(cycle) and death

I am working on a helper library that is supposed to send some data to a server on a specified interval, e.g. 1 minute. The idea is that the user of this library should not have to bother with ...
1
vote
1answer
66 views

How to access a file stored locally on server?

I am working on a web application which allows users to review pdf documents. These documents are submitted from another public facing website. A typical workflow involves: A document is uploaded on ...