Stack Exchange Network

Stack Exchange network consists of 174 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
15 views

Passing a list of base class objects to a method and using instanceof to filter them

I'm working on a Java reverse engineering project, where I am analyzing bytecode and trying to identify classes, methods and fields using the ASM framework. After identifying these I transform some ...
-1
votes
0answers
8 views

implanting my csv file in tensorflow Playground Webapp [on hold]

I am here to discuss the Tensorflow Playground Webapp. I want to visualize my data inside the tensorflow playground webapp. The webapp uses 2 inputs and one output. I want to use 7 inputs and 1 ...
3
votes
2answers
168 views

On a once a day user action: 24 Hours Reset vs. Midnight Reset

When a user is able to perform an action only once a day, for example getting a free ticket for a competition, there are two possibilities I came across in my experience. 1) 24 Hours Reset If he ...
0
votes
2answers
703 views

Best design pattern for two specific scenarios, the first one fits neatly into a Unit of Work(UoW) pattern

I have a question about what the best design pattern to use would be. I have 2 specific scenarios, the first one fits neatly into a Unit of Work(UoW) pattern. The second is a little bit more fiddly. ...
5
votes
3answers
483 views

Is it reasonable for an interface to specify that its implementations should be immutable?

Let's say I have an interface A. Instances of classes implementing this interface will be passed on to an algorithm that relies on these instances being immutable. For instance, it'll be invoking A....
2
votes
2answers
238 views

Implementing paging with multiple data sources

I have multiple data sources that I need to search across and return back to the client (web app). For example the sources are: an elastic search index a sql database Is there an efficient way to ...
-5
votes
1answer
51 views

how to isolate the application layer? [on hold]

I am trying to build a chess game with c++,but I don't know how to design the software. I know that we should program to an interface,so the application should be a set of interfaces (ex: GUI,Input/...
0
votes
2answers
258 views

How to make method calls more generic when dealing with multiple class types?

I have a loader class that executes data loading functions at boot-time for my application to give me test data. The idea is pretty simple, I'm reading in XML data, using JaxB to turn it into a POJO ...
1
vote
3answers
65 views

Class methods that are never called and everything handled by the internals of the class itself

I have a class in my code and I'm not sure if the design I've implemented is correct or if there is a better way to do it. The class I have created have important useful methods that is used by each ...
1
vote
1answer
71 views

Data Integration Design Using Microsoft SSIS

I am working on a data integration project, where I need to extract data from oracle source and load it to XML file. The requirement is to get the list of customers and foreach customer create an xml ...
28
votes
10answers
4k views

Simple vs Complex (but performance efficient) solution - which one to choose and when?

I have been programming for a couple of years and have often found myself at a dilemma. There are two solutions - one is simple one i.e. simple approach, easier to understand and maintain. It ...
31
votes
10answers
11k views

Should a view and a model communicate or not?

According to the wikipedia page for the MVC architecture, the view is free to be notified by the model, and is also free to query the model about its current state. However, according to Paul Hegarty'...
0
votes
2answers
68 views

Instantiate a class with two parents

Suppose I have TypeA and TypeB classes, which are totally different, but both hold an list of TypeC objects. Class TypeA { List<TypeC> cs; } Class TypeB { List<TypeC> cs; } Throuth all ...
1
vote
0answers
16 views

Multiple apk's on Play Store for multiple feature testing

We have different teams working on multiple features. The feature release dates for each team are simultaneous. I want to create a mechanism so that each team is able to push an APK to the Play Store ...
1
vote
2answers
139 views

Can I use the memento pattern with multiple relationships and persistence?

I need to implement a rollback system and the memento pattern gets mentioned regularly as a solution to this requirement, but in all cases a single object is used and it works in memory, persistence ...
66
votes
7answers
149k views

Designing a REST api by URI vs query string

Let's say I have three resources that are related like so: Grandparent (collection) -> Parent (collection) -> and Child (collection) The above depicts the relationship among these resources ...
3
votes
1answer
181 views

How can I appropriately model relationships that have a cyclical dependency?

Let's take two simple Rails models, Post and PostRevision. class Post < ApplicationRecord # Attribute: Status (ex: draft, public, private, deleted) # Attribute: Views # An owner, likely a ...
1
vote
2answers
51 views

Building a plugins-based code in Python

I have a program which perform different actions depending on the plugins that are passed. For example, python main.py -m foo -m bar will perform the actions of foo and bar. The structure of the ...
1
vote
1answer
82 views

Private/Hiding dependencies between Maven modules

Given three project modules X, Y and Z on a Maven based project, and Y depends of Z and X of Y and X should not know that Y depends of Z, being this: X -> Y Y -> Z X -X> Z What is the best way to ...
-5
votes
0answers
55 views

Should businesses invest money in documenting product knowledge and system architecture? [closed]

When product or system documentation is poor, is this typically a conscious business choice by companies? Is documentation usually not as valuable to organizations as hiring more developers to ...
-1
votes
0answers
46 views

Token-based registration

I'm trying to create a system where only users with a valid token can register. You may think of the token as a String which allows the user to register in my system. The token should cover: Status: ...
5
votes
3answers
114 views

How to untangle a data class where annotations from different frameworks mix?

The framework mix problem I'm using two frameworks -- PingIdentity's SCIM 2 SDK and Spring LDAP -- to deserialise a SCIM resource (i.e. JSON) to a Java object then write it to an LDAP directory, and ...
1
vote
0answers
37 views

Functionality design: Multiple sources, multiple consumers with configuration

It is a Design Problem which I am listing out here. I have multiple event sources in my app, each one produces events with the different set of data (but each source is producing only one type of ...
3
votes
2answers
148 views

What's the best way to design batch job type processing

I'm working on a portion of an ERP system where I need to process data in a way that's similar to a series of batch jobs, and I'm struggling with deciding the best program architecture to use. I'm ...
0
votes
1answer
43 views

Accessing an object accross different view functions in Flask

I am experimenting with an web app for searching and buying bus tickets. I came up with a few objects like RequestedRoute, Passenger, and Ticket: I have some Flask view functions as well. The home ...
-3
votes
1answer
72 views

When designing a web application with Vue.js and ASP.NET Core, is ASP.NET solely for the API?

When creating a web application from scratch with ASP.NET MVC Core (using Visual Studio 2017) and using Vue.js, is the MVC Core part of the application solely for the API? What other function would ...
2
votes
2answers
250 views

Hiding raw pointers from public API but need to pass them internally - design review

I am designing and prototyping an ncurses C++ wrapper. It's a hobby project, nothing too serious. I will omit include guards and stdlib includes etc. Consider the following files: application.hpp #...
1
vote
1answer
81 views

Which scenario is the best for service worker architecture?

We know about using service workers in modern web sites. Consider a scenario back-end as node.js and SQL Server. Data is loaded from central database to local customer web app (DB is about 700 MB) ...
2
votes
3answers
77 views

Is a setter with the composed object as a parameter better or separate setters for each parameter within the composed object?

I have two ideas on how to proceed with an availability class but I'm not sure which one is better. public class TimeRange { private Timestamp startTime; private Timestamp endTime; public TimeRange()...
0
votes
1answer
28 views

Processing data in a cluster with multiple tasks

The goal is to provide a scaleable system implementing multiple data processing tasks which can be seen as a graph. Data objects will travel that graph. Most object will visit the same nodes in the ...
2
votes
2answers
60 views

How thoroughly should you document business flows for a product or system you are learning?

I work on applications that have user documentation but it is not organized or updated to the current release. Is it worth my time to create my own documentation with screenshots and notes on all the ...
2
votes
2answers
76 views

Combining composite, decorator and visitor patterns

I am currently working on a project where I need to manipulate a tree-like data structure, which I implemented with a composite pattern. I want to be able to do different actions on this data ...
0
votes
1answer
29 views

(Fuzzy) Data duplication detection - scoring systems strategy

Many systems that store data in a structured manner (although this is marked language agnostic, the origin of this question is an MS SQL database) struggle with duplicates. Taking a physical person/...
3
votes
3answers
807 views

Designing a Feed and Notification system in MongoDB

I'm developing a NodeJS API that will be consumed, for now, by an Android app. I need 2 important things here: a News Feed and a Notification system. And I need it to be scalable. I'm using ...
0
votes
1answer
59 views

Too strong of coupling between aggregate roots?

In an effort to save this question, I have re-written it. The original question was regarding how to associate aggregate roots. I have re-factored the code slightly but believe this may couple the ...
4
votes
2answers
230 views

Abstraction of VAOs, VBOs and Models

I have gone down the rabbit hole that is abstracting away a working game engine in OpenGL and C++. Before reaching the other side I'd like to ask about my current design, which is - the more I look at ...
3
votes
2answers
134 views

OpenGL and global state

It is generally understood in software engineering that global state is bad. However, OpenGL has been designed very much embracing the concept of global state. many of the things you modify will ...
5
votes
4answers
192 views

Improved design for a turn-based multiplayer game using AI?

I'm trying to decide which is the best architecture for a turn-based multiplayer game where the players can be either humans or AI and the UI is optional, for instance because the game can just be ...
19
votes
10answers
1k views

When is it better to optimize a software for better performance, at the beginning or at the end of the development?

I'm a junior software developer and I was wondering when would be the best time to optimize a software for better performance (speed). Assuming the software is not extremely large and complex to ...
0
votes
1answer
91 views

Querying MongoDb after scheme change

The database schema of an application is rarely fixed, due to new development the schema has to change. This also applies to a schema-less solution like MongoDB. There is documentation on how to ...
3
votes
1answer
199 views

Should I provide partialed functions based on API call in Clojure?

I am designing a library to wrap an API with Clojure. The API requires user credentials to authenticate user related calls. My first approach was to have functions that do each task the API can do: (...
0
votes
1answer
49 views

Is it better to initialize semaphores in shared memory or give them as command line arguments? (C++)

I am on a project for which I have to spawn many different processes, all in different executables, and there will be some shared memory segments and some semaphores to synchronize them. I use an "...
0
votes
1answer
174 views

Consuming messages directly from a queue which belongs to a third party system

We are working on a project which interacts with multiple third party systems and they need each other's data to function. Now, for some data which needs to be in sync in multiple systems, we are ...
2
votes
1answer
676 views

Displaying complex objects in AngularJS

What in your opinion is the best way to display complex objects in AngularJS? You have some sort of return from a service used in multiple places in a app and you might have to display multiple ...
3
votes
6answers
601 views

Is it better to write an efficient algorithm or code that is easier to understand?

So I was recently given a coding assignment from a large financial firm, and I thought of two ways to solve the problem. One of the ways involved 1 outer for loop and 1 inner for loop. In this case, ...
54
votes
6answers
12k views

Is an event loop just a for/while loop with optimized polling?

I'm trying to understand what an event loop is. Often the explanation is that in an event loop, you do something until you're notified that an event has occurred. You then handle the event and ...
0
votes
5answers
221 views

Is using overly specific names for variable/class/component names a good or bad practice?

Let assume that we have a system in which the users can chat with each other and we are working on the backend. We can name the service which fetches the chats in one of the following ways: ...
-1
votes
1answer
78 views

Would I need a web framework if the app is running locally and not in the net?

I need to make an Employee Payroll application and the client specifically stated that the application will run on their computer locally and will not be hosted anywhere in the internet. I can code ...
0
votes
0answers
9 views

Running a local instance of ElasticSearch on a REST API - is this feasible?

So, I'm looking at elastic search api, and the way you interact with it is, you excecute the ES binaries and make http requests on localhost (to insert, delete, whatever). Eg: curl -XPOST https://...
131
votes
17answers
12k views

How do I know how reusable my methods should be? [closed]

I am minding my own business at home and my wife comes to me and says Honey.. Can you print all the Day Light Savings around the world for 2018 in the console? I need to check something. And I am ...