All Questions
62,872
questions
0
votes
0
answers
52
views
Array structure for nested grouping (JavaScript)
I am currently struggling with how to solve nested grouping of data.
The initial structure is given and my grouped structure below as well as my approach can be adjusted.
My idea was to have the array ...
1
vote
1
answer
59
views
Access Token Or Alternative for Microservices For Resource Level Granular Checks
Hi I have following structure :
Client App (layer 1)
Business logic Services ( Layer 2)
Business Logic layer consists of many microservices . Access token can be created and passed from APP layer to ...
1
vote
1
answer
63
views
Throw generic exception vs front end friendly exception from util methods?
The below code sample given is for Salesforce but it is close to Java and you should be able to understand easily what I am trying to ask here.
AccountController.getAccountsThatMeetSpecificCrtieria is ...
0
votes
1
answer
72
views
HTTP redirect vs JS redirect
I have a Svelte web app exclusively for internal use, so there is no main landing page or registration, as accounts need to be created by the admin. Since the main page has no function as an ...
1
vote
2
answers
291
views
Do we need APIs to just access databases?
At work, we have a Web application, which makes queries to databases, and I’m asked to determine if using Web APIs could be an added value.
Personally, I’m not convinced it is.
I know Web APIs are ...
1
vote
1
answer
436
views
Should I use private field or static variable in my method?
There is a variable that must persist between calls but otherwise only one method uses it.
As it is a method of the object, the value can be persisted as a private field of the object, or otherwise it ...
2
votes
1
answer
208
views
In poltergeist, whats wrong with "solely to trigger or initialize several other objects"? Isn't it is a good use of encapsulation and reuse?
After reading What differentiates function objects from poltergeists?, according to the definition of poltergeist, I still don't understand why would "poltergeist" be a bad pattern:
A ...
23
votes
7
answers
7k
views
Code review from domain non expert
My team has a mixture of specialties, there's some overlap however. When some commits are done from person A (who is expert in some domain) and person B (who is not expert in that domain) I wonder if ...
-2
votes
0
answers
21
views
how can I find a UK Master's Degree that offers Scholarships? [closed]
I'm a Software Developer with one year of experience in C++ development. I've developed a strong interest in cybersecurity, and I want to pursue a master's degree in this field in the UK. The UK is ...
0
votes
2
answers
117
views
Clean Architecture with Microservices
I'm fairly new at system architecting and I'm looking for some advice. My company is revamping its order management system. Currently is a monolith system that scales very poorly and is difficult for ...
-1
votes
0
answers
83
views
Proper abstraction for third-party API?
I'm writing a library in C# that is meant to abstract calls from a third-party API, such that it can accept inputs from multiple potential applications. Currently, I have three broad classes:
Base ...
0
votes
1
answer
39
views
Where to store a props type declaration on a DDD project?
I am trying to apply DDD to a Vue project (so it's DDD on the frontend) and I have a doubt as to where store a props type. A Vue component can have props, which is basically named data passed to the ...
2
votes
1
answer
102
views
web-dev: how to restrict access to costly backend API to authenticated clients only
I've created a small prototype browser plugin and am now thinking about making it accessible to the public. This brings up an important question about gatekeeping API access and the right way to ...
-5
votes
0
answers
44
views
Validation of a startup at the university [closed]
I am studying to become a software engineer and I need validation for a future project.
I would be grateful if you complete the form.
-3
votes
0
answers
26
views
How do you set up a Go repo to use a private repo in the most convenient way? [closed]
We wish to decrease the amount of duplicate code in our organization, and part of that is to move functionality into separate private repos on github.
We onboard new people, and use a number of ...
0
votes
1
answer
59
views
Designing Clean Architecture(Hexagonal) for a Spring Boot Application : Project Layout and Class Organization
I'm currently in the process of integrating Clean Architecture into my Spring Boot project and I'm seeking advice on the ideal project structure and the types of classes and projects that should be ...
-4
votes
0
answers
25
views
Front-end frameworks with SSR [closed]
Our company are currently using Yii for our website. The codebase is 12 years old. Nearly everything we do is on PHP, JS, and CSS.
Of course things are getting more complicated now, and we are ...
1
vote
1
answer
49
views
UI or Application layer responsibility - retrieving additional data for display
I have an application service that retrieves Order data. The service is consumed in UI, where it can be edited by users.
Additionally, the users wants to see related data such as ordered products' ...
-4
votes
0
answers
20
views
EtherCAT protocol frame structure/format? [closed]
I am developing my own EtherCAT Master Device(CNC Motion Controller) on a custom ARM controller. I have bought EtherCAT servo drives and want to control them. (For reference, the controller is TI's SK-...
1
vote
1
answer
38
views
Safe Plugin Architecture for Python Web API
I am making a web application for parameterized procedural world generation. Given the computational resources involved, this application involves a server backend for generating the world with an API ...
0
votes
0
answers
40
views
Single-threaded request-response type server architecture
I'm writing an internet service in Rust that works more or less like an HTTP-server, just without the HTTP part, and strictly over UDP. I also have a requirement to build it like an old-school game of ...
0
votes
0
answers
58
views
Why std::visit with multiple variants create n-dimensional array instead of nested visit calls?
variant<int, char, double> vr1 = 56, vr2 = 0.4674, vr3 = '4';
visit([&](auto v1) {
visit([&](auto v2) {
visit([&](auto v3) {
// access vr1, vr2, vr3 values
...
0
votes
1
answer
79
views
Clean architecture for file upload in a flutter app
I have started a flutter app and want to apply clean architecture to it. The first use case i have is the following:
A user provides file(s)via "open file" dialogue. The provided files ...
0
votes
0
answers
24
views
Handing skewed processing time of events in a streaming application
I have a streaming application (written over spark/storm/whatever does not matter). Kafka is used as a source of stream events. Now there are some events that take significantly larger resource (time, ...
2
votes
2
answers
158
views
Can chatty microservices be okay to use if there is a specific use case for them?
Introduction
Hi everyone,
in my company we are using microservice approach and of course are trying to do it as correct as possible. There is a new requirement coming up where I have laid out a ...
0
votes
2
answers
116
views
Build an API for a graph app with + 30 millions data points
I am quite new to design software and especially graphs. So I am working on a full-stack app with a back-end built on FastAPI (python) et front-end on React.
I need to create 4 graphs on a single page ...
0
votes
3
answers
125
views
Is there a distinct optional type semantically representing a value that *needs to be calculated later*?
Semantically, C++ std::optional, Rust Option<T>, and other optional/nullable types represent a value that can be present or absent: you have to handle both cases, or you can opt-in to crash.
Is ...
0
votes
2
answers
82
views
Where to put factories that depend on the application layer?
I am a frontend developer (currently working with Vue and TS), and I have been searching for better organization of the frontend code and recently I got to know DDD a bit. I know DDD is mostly used ...
-1
votes
0
answers
32
views
SQL: Using one shared Join table for multiple many-to-many relationships [closed]
I have these sql models: Albums, Collections, and Photos. Both Albums and Collections have many-to-many and one-to-many relationships with Photos and serve different application purposes. What are the ...
0
votes
2
answers
67
views
How to structure a cart with cart products object
I am new to DDD and I am having trouble structuring an object. I have a cart, where I can add products to it. Each product has some properties like image, title, price, etc. Whenever a product is ...
0
votes
1
answer
73
views
How to organize "master" data VS "working" data in MS SQL
I have this survey software that I'm writing and I'm wondering what would be the best design for my requirement.
I'm going to simplify it as best as I can.
I have these entities:
class Survey {
...
0
votes
1
answer
113
views
Is interleaving local variable declarations with assertions and function calls a bad practice?
In my experience, it is customary to place local variable declarations at the beginning of their scope. Several questions in this forum ask whether this needs to be so, and their answers tend to agree ...
7
votes
2
answers
2k
views
How can I make code that is both DRY and fast where intermediate values in a calculation may or may not be needed?
How can I make DRY (lacks repetitive patterns) code that also avoids inefficiencies from using intermediate values in a calculation that might not need to be used?
Here is an example:
In this code, I ...
0
votes
1
answer
77
views
How could I apply the strategy pattern to a react component? [closed]
For the following component, how would I extract the unit logic to allow for composition? In my actual app I am trying to reduce the amount of logic encoded in the component and I have decided that ...
0
votes
1
answer
65
views
REST - Adding a new field
I have an object with fields like ID, CODE, NAME, etc., and it has its own database table with each field. And I am working on implementing the REST API for this object. I want to expose all these ...
65
votes
8
answers
12k
views
When to *not* use SOLID principles
Coming from a math background, counterexamples are equally, if not more, helpful to me for understanding concepts than examples. I've seen many, many examples of when and how to use the SOLID ...
1
vote
2
answers
177
views
Best practices for unit testing when breaking down functions into smaller ones
Say we have a function of the form
def func(num: int) -> int:
num = num + 1
num = 2 * num
num = num**3
return num
and let us act like each line is a long computation so that we ...
0
votes
1
answer
69
views
C++ creating a class with self referencing custom comparator [closed]
This is the node for a tree
class Node {
public:
string name;
map<string, string> attribute;
Node* parent;
set<Node*, customComparison> children;
};
Where customComparison in ...
2
votes
2
answers
201
views
hexagonal architecture vs clean architecutre
I am trying to improve the architecture for my React app project that has grown in size lately.
I'm looking at Hexagonal architecture and Clean architecture, and I couldn't really see the difference ...
2
votes
3
answers
125
views
Please help with this maze of fencepost problems ( vector across window )
I'm trying to implement LOGO with a physical turtle. I got all the basics done, but I got completely sunk when implementing the "Window" mode.
Original LOGO had 3 modes: "Border" - ...
2
votes
9
answers
2k
views
Is it an anti-pattern to use interface for entity?
I read an article about that using an interface for an entity is an anti-pattern for these reasons:
Your interface signature is identical to your class.
There’s only one implementation of your ...
1
vote
0
answers
40
views
Why must a safe configuration be reached in `n^2 + n` rounds in Dijkstra's Self-stabilizing mutual exclusion algorithm? [migrated]
In the book Self-Stabilization (Dolev, 2000) the author provides a proof (p.19) of Dijkstra's self-stabilizing mutual exclusion algorithm. An excerpt of the book showing the proof is found below.
At ...
-2
votes
3
answers
137
views
How is exception handling implemented in software architecture? [closed]
I am currently learning about software architecture and I have some questions about exceptions processing as it is an important part of the software.
In which document and how should I describe how ...
0
votes
1
answer
81
views
What C# Object Composition strategy would you apply for CoreObjects with a governing 'ObjectType' property
In a C# ASP.Net Core Web Application I have a Domain Model CentralDesignObject made up of many component objects & properties, producing a significant amount of derived/calculated values.
This ...
0
votes
1
answer
88
views
Options for designing a generic library
During development of libraries (mainly for use in internal projects) I have come across the "problem" of how to design them in a generic way. I am going to demonstrate with an example ...
0
votes
1
answer
86
views
Looking for the name of the meeting that anticipates system failure during feature design
In my organization, we often have meetings to discuss potential points of system failure, prior to implementing much / any of the actual code. This helps us to identify points of architecture, and ...
-1
votes
0
answers
28
views
Spring Reactive Restful APIs - Is it really a non-blocking model?
I know that is possible to build my entire Spring boot application in reactive way.
So if my application uses R2DBC, I can do something like:
@Repository
public interface PersonRepository extends ...
2
votes
3
answers
232
views
Should Acceptance Criteria be mapped to unit tests?
My organisation is adapting a new SDLC process, and a part of this is to force engineers to map acceptance criteria (AC) to unit tests written for each user story in the pull request (PR).
To satisfy ...
1
vote
1
answer
117
views
How large and thorough should the domain layer be?
TL;DR: Should the domain layer span the entire breadth of the app such that everything can be simulated, from point A to point Z, or may the application layer be used as the orchestrator and serve as ...
-2
votes
0
answers
58
views
Approach to storing variations in schema in SQL database?
I am working on a simple dictionary app built on PostgreSQL. I have the idea of "lexemes" or what I'm calling "flows", which are basically any word, word fragment (prefix/suffix), ...