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.

-2
votes
1answer
121 views

What is the best way of implement a virtual world like a garden? [closed]

I want to develop a virtual garden with a lot of kind of insects like ants, bees, etc... For example, if I want to create an area of 10x10m². I can implement this with ArrayList<ArrayList<...
3
votes
4answers
235 views

Does the Open and Close Principle relate to renaming a class [duplicate]

My coworker and I have having an argument. The Open and closed principle is defined as: A module will be said to be open if it is still available for extension. For example, it should be possible ...
2
votes
1answer
106 views

How to (or should I) refactor RxJS nested subscriptions with intermediate return value?

I hope this fits more here than SO because it is mostly about code design than making it work. Also, this is not tied to RxJs, but more to the reactive paradigm. (TypeScript tag is only added to make ...
2
votes
1answer
44 views

Architecture design for Linux administrative interface

I've developed an IoT device utilising OpenWrt so my design needs run a on a shoe-string budget of resources. I need to be able to push small amounts of data, up to 300bytes to my app on a very ...
1
vote
0answers
56 views

Third-party API wrapper in Java: how to design

Suppose, there's a site that provides an API, such as this: Users post questions, answers on that site You can make GET and POST calls There are two types of authentication: weak (only gives read ...
49
votes
10answers
11k views

Does splitting a potentially monolithic application into several smaller ones help prevent bugs? [closed]

Another way of asking this is; why do programs tend to be monolithic? I am thinking of something like an animation package like Maya, which people use for various different workflows. If the ...
2
votes
1answer
65 views

Angular class design dilemma

I'm trying to set up a good class diagram for my Angular application, however I have a problem figuring out how to solve the following situation: I created a base Link class that can be used anywhere ...
3
votes
4answers
215 views

How to get a decoupled design without injecting repositories inside entities

I am facing the following situation: I have to develop a system that has to calculate the price of a car so i need to calculate the prices of all the Pieces that make up the car and then total them. ...
0
votes
2answers
173 views

Java Constructor Syntax and Design [closed]

With regards to object-oriented Java constructor syntax and design, specifically parameterized or specific constructors, it is the accepted process, as describe in books, to build a parameterized ...
0
votes
1answer
86 views

Any solid reason to have getters/setters in entities? ORM, Doctrine

I've been trying to decide if I should include getters/setters in business entities. A few reason I have been through to include getters/setters but those are accompanied by an anti-reason as well. ...
0
votes
0answers
25 views

Ranking / Generating score card based on scoresheet details

I am busy with a score keeping app. And would appreciate suggestions/ help. I will try to be brief and hopefully have explained the main gist of the app below The app basically maintains some scores. ...
8
votes
5answers
482 views

Consequences of not doing a REST API the “right” way?

I'll ask this question this way - what are the software engineering concerns for not implementing my REST API the "right" way? What do you mean the "right" way? Well, allow me to explain my ...
1
vote
2answers
84 views

Transforming one collection of objects into a separate unrelated collection?

Say I have a customer class class Customer(name, age) somewhere in my code, I have a list of customers List[Customers] at some point, I need to transform this list of customers into a Map with ...
0
votes
3answers
164 views

Designing a class whose dependancies require “starting”/initializing step

I have Facade class which requires an Endpoint instance to function (it uses it in most of the functions). Endpoint is attached to Platform that is passed in Endpoint's constructor and has to be ...
0
votes
1answer
100 views

Multiple DLLs vs Multiple EXE's in a project that needs to be modular (web browsing automation)

First of all, C# solutions are needed. So in my team I am responsible for creating a program that will receive a "task" in json format from an API, from this json it needs to figure out what website ...
0
votes
7answers
310 views

Good object oriented practice to use an object to build itself?

Do you think its a good OO practice to use parts of an object to build itself? Here is an example. var car = new Car { Make = BuildMake(), Model = BuildModel(), Vin = ...
0
votes
0answers
55 views

Realizing input & output signals from C++ code

I am dealing with C++ code that I want to model it as component diagram (UML2.0). So, a main step is to realize which parameters are input & output signals. One problem with that is: Not every ...
0
votes
2answers
97 views

Can there be too much logging? (Front End & Back End)

In a bit of a dilemma. At work we are having issues with an API service that communicates with the client side through a WebSocket. The problem so far is that the WebSocket seems to be unreliable. We ...
0
votes
1answer
96 views

Is a “concrete function” over “generic function” a good implementation?

I want to know others opinion about this approach that I use in a lot of projects, for example, I can show the last time that I use it: public class DataStorageService { private enum Keys { ...
0
votes
1answer
108 views

Class holding collection of other class

I have a class Item. Then another class ItemCollection holds std::map<int,Item> item_collection_. The reason to create the class ItemCollection is if I want to do something with collection of ...
-2
votes
1answer
65 views

Design patterns for migrating a legacy database model [closed]

I have a product which has a un-normalized legacy data model which contain millions of records. This has cause problems when adding new features and with performance. Also this contributes to high ...
3
votes
2answers
127 views

How to improve code quality in database driven applications

I'm working for a company with a big ass legacy codebase. Changing existing code is like a guarantee to break things. Most functions are a few thousand lines, using some global flags, having different ...
7
votes
4answers
391 views

What part of development should a software designer do?

My manager recently promoted me to "software designer". I am not aware that this title exists. As far as I know SAs creates high level code design and do diagrams. I have a hard time understanding ...
0
votes
1answer
57 views

Pattern for Organizing Shared code/API for Multiple applications/services

I have a single web server running multiple web applications and websites. For simplicity we'll just say I have App A,B,C and websites D and E. All use a shared database and some tables are used in ...
-1
votes
5answers
247 views

How can I efficiently write a complex if or switch condition that depends on a combination of two (or more) variables? [duplicate]

In my current case, I've got two variables. Let's call them action and status for ease of use. They can have any value between 1 and 9. Depending on business logic, I've to either call subActionA() or ...
3
votes
2answers
120 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 ...
9
votes
4answers
921 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
54 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 ...
9
votes
4answers
471 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
105 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
25 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
61 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
102 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
0answers
35 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
51 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
86 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
129 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
156 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
367 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 ...
0
votes
3answers
155 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
5answers
132 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
54 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
121 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
30 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
86 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
1answer
178 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
121 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
79 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
85 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. ...