All Questions

Filter by
Sorted by
Tagged with
0 votes
0 answers
15 views

CQS principle and validation

I was sarching the way how you validate if a method can be execute or not, if it is valid. I have see this article: https://enterprisecraftsmanship.com/posts/validation-and-ddd/ from Vladimir Khorikov....
0 votes
1 answer
44 views

Is the combination of state machine and pure function a programming style?

As a university student who just have been learning programming for a year. After I learned about the concept of state machine and the pure function in functional programming, I suddenly got an idea ...
0 votes
0 answers
13 views

API Gateway- how internal services should communicate with external system

we have a microservice architecture. There is an API Gateway that acts as entry point for a External System (SAP) It is clear that SAP should connect with our system using the API Gateway. But, in ...
  • 592
-1 votes
0 answers
28 views

Best practices to link, associate, or abstract similar but different entities together

What are the best practices that I can follow that can simplify or help abstract out entity modeling when there are many similar but different entities? I have a large game system with different types ...
-4 votes
0 answers
22 views

Roundabout way of making a table or record of attendance in a larger company (2000) [closed]

As a lower ranking user in the company, I do not personally have access to the "master" database that logs attendance through a clock in system because of privacy and sensitive information, ...
0 votes
0 answers
16 views

Best practices to integration test a CLI app that makes REST calls to a downstream service

I'm writing some integration tests for a spring application that makes REST calls to another app that controls access to a database. The flow for this CLI app is: CLI app is kicked off by a cron job -...
  • 151
0 votes
1 answer
66 views

How to handle a new method in the interface that is not applicable for all classes?

I am faced with an interesting OOD problem: I have an interface with 3 methods: interface TestInterface { String action1(); String action2(); String action3(); } and 3 classes that ...
  • 109
0 votes
2 answers
76 views

Reassign parameter to local variable

On Stack Overflow I frequently see questions with code in the following style: function funcName(parameter) { let variable = parameter; // rest of function uses variable rather than parameter } ...
  • 252
-1 votes
0 answers
19 views

How to get dynamic insights into large codebases

I'm a junior SWE, and I find that my bottleneck is gaining enough context in a large codebase to solve an issue that is assigned to me. In particular, if I know a module X which is involved in the ...
  • 139
0 votes
0 answers
14 views

On Clean Architecture, how to draw borders on methods for an entity, and should entity have conditional logic?

part 1: if I have an two entities User Post Should User entity only encompass methods that pertain to User Obj? createUser, deleteUser, getUser, listUsers, updateUser, ...updateSpeificOnUser? What ...
-1 votes
0 answers
24 views

I need to join multiple databases and synchronize them periodically

I'm a software engineer at my company and we're planning to remake a product we have from the ground up. As it currently stands, we have a ton of clients and each client has their own instance of the ...
0 votes
1 answer
36 views

When an entity has state, all the behavior depends on the state?

I was thinking in the common example orders, that can be in different statates. From create to pending to accept, accepted, sent... and so on. But the order has data too, for example the client, the ...
0 votes
0 answers
21 views

Microservice Granularity: Should a service ever be broken into smaller services with a shared database?

I'm trying to understand the size of a micro service. Fake situation: Data is read 1,000,000 times for every write. So when you scale out you generally only care about scaling out for the 'GET' ...
  • 289
2 votes
2 answers
65 views

Relaxing layering rules for queries?

In a typical DDD layered architecture (application, domain & infrastructure layers) you'd generally declare interfaces in the domain/application layers and implement infrastructure-dependent (e.g. ...
  • 369
0 votes
0 answers
21 views

How to post domain events with aggregate root Id before the root is persited?

This seems pretty newby question but I still can't find a answer I'm ok with. I'm doing a microservice and decided to have a Message as an aggregate root. This Message represents a kind of ...
  • 101
1 vote
1 answer
53 views

Self-Selecting Variant of the Strategy Pattern?

I've found this pattern useful, and am trying to classify or name it. Basically, that: A task should be performed by different strategies, depending on the context. Each concrete strategy implements ...
  • 113
1 vote
1 answer
124 views

Should I stop using jQuery and create custom abstractions?

I'm a junior web developer. My current work is on a form-based server side web application. It was set up using jQuery. I'm now the primary person working on it. In a previous job, which was more ...
  • 19
0 votes
1 answer
38 views

How to properly initialize a React functional component

I'm writing a React functional component inside a React-Redux project. Here's a stripped-down version of it: let _instance = null const Parent = (props) => { const [show, setShow] = useState(...
3 votes
4 answers
180 views

Should I implement one interface with two methods or two interfaces?

NOTE: This question is reposted from SO because it violates community guidelines for being opinion-based. I have two classes that are similar in nature but they have different functional signatures. I ...
  • 155
0 votes
2 answers
92 views

Is this a good alternative to state pattern?

I was trying to use the state pattern in a DDD aggregate, but I was thinking in the following alternative. In sumary, the state pattern controls what actions can be done in each state. This makes to ...
-1 votes
0 answers
78 views

What would prevent the JVM itself from becoming a stand-alone web browser? [closed]

I thought of this question when I heard the news about the deprecation of SecurityManager. Many years ago, desktop apps were more common than web apps. Now, almost everything is a web app, even word ...
  • 99
0 votes
1 answer
90 views

DDD: Where to put safety checks? Where to put the check if the user is allowed to do this?

I have a pretty simple domain model. Basically users, companies and groups. A user can add members to a group and remove them. But the user can only do that for his own company. Where do I put the ...
-2 votes
0 answers
26 views

How does Nodejs utilise 1vCPU on ECS Fargate? [closed]

I work in small early stage startup. We use AWS ECS Fargate to host worker processes. The codebase is in Typescript, which is compiled to javascript during the deployment, and containerised. The ECS ...
0 votes
0 answers
22 views

React Application to run a Digital Signage loop [closed]

I have a locally hosted React application (in a factory) where there's a need for Digital Signage showing select pages in a looping rotation - typically 2 or 3 screens with customizable durations. So ...
  • 109
1 vote
0 answers
58 views

Efficient way to implement hierarchical inheritance in SQL?

I am working in a database that has a hierarchy of Companies (From location-level all the way up to Top-level parent company). I am designing a system within that to provide a "subscription" ...
0 votes
0 answers
37 views

Design a push events service at code level

In a large monorepo containing multiple micro-services, I need to build a service to push various events to several of them. The event interface differs from service to service(one will have filed_5 ...
  • 101
-3 votes
0 answers
31 views

Send messages from a bot to my Android phone, what are my options? [closed]

Sorry if this question does not fit this forum, but not sure where else to ask about this. I have some services running on my private server. On occasion (about daily) my software fires some events. I ...
2 votes
2 answers
176 views

Operating systems - whose responsibility is it to coordinate process I/O requests?

I am reading Tanenbaum's Modern Operating Systems. I want to understand a particular concept regarding processes and blocking system calls, specifically with regards to I/O. I assume threads might ...
2 votes
3 answers
162 views

Eliminating combinations based on user input

I am stuck with this particular problem. To give context to the problem, I am developing a mobile app which helps with loading dangerous goods onto a truck. Ignore the size and weight of the dangerous ...
0 votes
2 answers
84 views

Architecture for worker pool with different task complexities and sizes of boxes

I'm sorry if I'm using any wrong terminology here. I'm trying to design an architecture where there can be big and small tasks (e.g. processing big or small images). Big tasks can only be handled by ...
  • 289
1 vote
1 answer
78 views

Using the decorator pattern to populate entity properties

I have products saved in my database that my system fetches with the following structure: public class OriginalProduct { public string Id { get; set; } public string Name { get;set; } } I need ...
  • 127
0 votes
0 answers
34 views

From the ECB & DAL perspectives, is this design acceptable?

I've been recently trying to go slightly further in arch. patterns (specifically layered arch.). I decided to go though an old project of mine (a CLI-based cinema reservation system) and evaluate my ...
34 votes
9 answers
8k views

Why do heavily object-oriented languages avoid having functions as a primitive type?

As has been covered to the point of parody, heavily object-oriented languages, such as C# or Java, tend to lack the feature of having functions as a primitive type. You can argue about whether or not ...
  • 713
0 votes
0 answers
10 views

BigQuery accelerator to serve BI reports accessed concurrently by multiple users [closed]

We are deploying google data studio report embedded in web application. This data studio report is connected to 1 tables in BigQuery with 75 million rows and about 250 GB table size. The report will ...
-2 votes
1 answer
63 views

organization of a Java project - Java project structure - package names, recommendation - best practices? [closed]

I'm having hard times with deciding how to name the packages to organize the project (Package by Layer, Package by Feature...), also I've heard of some design patterns, not sure how it works or which ...
  • 11
-3 votes
0 answers
47 views

How do find the number of digits between two integers [closed]

I am writing a program and I need to find the number of digits between two integers, I have figured how to find the digits between integer with the same length i.e 1234 and 5678 but I can't figure out ...
  • 1
0 votes
3 answers
119 views

Tests of 1-Dependency VS Tests of 0-Dependency

How many dependencies does a unit test have (that are not mocked)? My understanding is that a true "unit test" has zero dependencies, with all of them mocked (or none in the first place; ...
-1 votes
1 answer
45 views

Is there a way to discover nearby devices in proximity, but without exposing your actual location to the server?

I'm working on an app that will focus on P2P communication via WebRTC. Part of the app's functionality is discovering other devices in an x mile radius and then being able to initiate communication ...
  • 25
0 votes
0 answers
33 views

How to handle maintenance to your queuing server (e.g. rabbitMQ)

I'm new to queuing and looking into options that could be done operationally. I'm sorry if I have any conceptual misunderstandings related to queuing. I watched this video where the presenter made a ...
  • 289
3 votes
2 answers
147 views

In the OO DDD , does the domain object access the repository directly?

I'm reading OO DDD slides from Robert Brautigam, who is quite active here so I hope he can personally answer as I quite agree with his personal understanding of DDD, and approach of having a more ...
  • 277
1 vote
3 answers
100 views

Why is the product of the order item a reference to the ID of the product and not a value object?

I am seeing this example in the Microsoft documentation: Here we can see how OrderItem has a reference to the ID of the product, it is the first option that sure people uses to think, me too. But I ...
0 votes
1 answer
35 views

Where to save entity metadata in a Ports-And-Adapters Architecture

I’m using a hexagonal/clean/ports-and-adapter architecture. For the sake of simplicity, I’ll only talk about domain and infrastructure here, where the infrastructure has dependencies on the domain but ...
  • 611
2 votes
1 answer
78 views

Test coverage for various code logic permutations... Metadata/Artifacts in algorithm results to describe which case?

I'm sorry if the title is confusing, I don't know if what I am describing has a proper name so let me describe... I have an algorithm which contains quite a bit of nested if/else if/else logic for ...
  • 163
0 votes
4 answers
178 views

Code for interface and the type erasure problem

As a design priciple I was taught: Programe para una interfaz, no para una implementación. Es decir, no se deben declarar las variables con el tipo de los herederos sino con el tipo de los supertipos....
0 votes
0 answers
31 views

Updating controls in an electron app from a c# dll, is this even viable? [migrated]

I've been digging and digging and coming up rather empty handed. I've tried ffi but doesn't seem to be buildable currently. Currently I'm using electron edge and seems to be the right direction, but I ...
-1 votes
3 answers
143 views

Refactoring multiple non-nested if statements [C#]

I have a number of non-nested if statements that look like this: if (!bytes[nameof(PropertyVersion.Price)].SequenceEqual(dbBytes[nameof(PropertyVersion.Price)])) changes += $"Price {TextHelper....
  • 115
0 votes
0 answers
36 views

How to create an order if depends of anohter root entity?

If I have and order and a client. Both are aggregate root and they are different bounded contexts. Supose that I only can create and order if the client is not allowed (supose it has a bool property ...
0 votes
1 answer
71 views

Reducing contention/locking in a job system involving read/write dependencies?

I have a job system that has two different types of dependencies per-job: Jobs can rely on other jobs to be completed first, but this is optional Jobs have read/write dependencies (shared/exclusive) ...
1 vote
3 answers
325 views

Still confused why a monolithic operating system is faster than a layered operating system

In the book Operating System Concepts, In the summary it states: A monolithic operating system has no structure; all functionality is provided in a single, static binary file that runs in a single ...
-4 votes
1 answer
96 views

if I write 16 bit floating point number representation of 2044 and 2045.5 it's seems like the same, which is 0 1001001 11111111 why is that?

floating point representations## exponent == 7 bits ,mantissa == 8 bits 2044    = 0 1001001 11111111 2045.5 = 0 1001001 11111111 why is this happening?? what is the error? Is anything wrong with the ...

15 30 50 per page
1
2 3 4 5
1232