All Questions

0
votes
3answers
91 views

Can I make other developers aware that they can define certain functions for extra-functionality even if they're not required?

The language is PHP. I have the certain, in my opinion, code smell, it doesn't feel right: In my controller class that ingests objects of the same type (interface, it's ViewBlockInterface), I check if ...
0
votes
2answers
137 views

How to implement a combination of behaviours for my objects

I need to create a program to manage an association. Members of this association have different roles and each role has specific characteristics. My problem is that I'm not able to abstract this ...
4
votes
3answers
329 views

What to do when interfaces force me into violating the single-responsibility principle?

(The code I'd have to post is huge, I'll resume to just function names) I'm currently faced with the following issue on my project: I have a "each module from this framework can have a small view ...
2
votes
1answer
126 views

How can I optimize an alert system that processes 1000 requests / hour?

I am building a solution where IoT-devices send in measurement-data to an API that's hosted on AWS. For each measurement-type the user can set a threshold value; that when reached will trigger an ...
2
votes
1answer
97 views

How are primitives stored in memory

In my searching although this question seems to get answered a lot, the answers don't really cover what I want to ask. I'm learning assembly and my question is, in higher level languages e.g C data ...
1
vote
2answers
91 views

Why is it considered bad that Guava introduced direct, internal dependencies?

For a few months, there's a heated discussion ongoing in Guava's issues (#3302, #3320) about having introduced several internal dependencies, namely "failureaccess" and "listenablefuture". Some of ...
1
vote
1answer
81 views

Data entities in Onion Architecture

I'm trying to build a project using onion architecture (just a "Northwind"ish type app to get more up to speed with .NET Core). I also want to get a better grasp on Onion Architecture principals. I ...
0
votes
1answer
52 views

Should we do data migration from Oracle via the microservices, or should we do direct data migration from Oracle to Azure SQL DBs?

We are replacing a legacy application that runs on a single Oracle DB, and the decision has been made to replace it with a microservices-based application running on Azure SQL. Do we do data ...
4
votes
1answer
119 views

Internationalization in .net core

I am currently in the process of developing an ASP.NET Core application which requires internationalization to Russian. I have been reading over the documentation that Microsoft provide for .NET Core ...
0
votes
1answer
71 views

Name of data structure where a string determines its value

A few times in my career I've found myself writing decoders for responses from IoT products or weird apis that insted of using JSON or XML as a response, they reply with something like ...
-1
votes
3answers
279 views

Why those famous open source tools don't make them also a good-designed library? [closed]

There are a lot of famous open source tools, for example: gcc, git, mercurial and etc. However, they don't provide a nice API for developer. Someone will say, they are command-line tools instead of ...
1
vote
0answers
96 views

are magic strings as event names okay

I am about to create my own event-driven API in JavaScript. Most JavaScript that currently exists, e.g. in-browser JS for controlling the DOM, lets you register event handlers like this: object.on('...
0
votes
1answer
33 views

Place Logic In Client Side or Server Side

I'm building a small personal website. Basically, they are 20 short sound files. Clicking a button will play one of those files randomly. Once played, that file will no longer be played. So in total, ...
0
votes
1answer
26 views

bpmn v2: how to show that a set of tasks need to be completed within a stipulated time period

I need to model a set of tasks in BPMN v2: 1.0 a report is sent out following which two paths emanate: 2.0.1 report is further formatted, followed by 2.0.2 additional information is added to the ...
0
votes
0answers
7 views

How to safely store JWT using React App [migrated]

Currently I'm working on a React-Laravel stack application. Having already built an SPA using React and a backend in Laravel, the plan is to use the backend as a REST API to make requests from the ...
6
votes
5answers
353 views

Is there a reason to define an interface for a pure data class?

I am reviewing a colleague's code and as part of the changes, this person introduced a few new pure data classes like so (C#): public class Result : IResult { public bool Succeeded { get; set; } ...
0
votes
1answer
53 views

Data structure to group unique objects and support moving between groups maintaining uniqueness

I'm looking for a data structure that supports this use case - there must be one out there! A set of objects of type T can be stored in a Group, parameterised by the type T. A grouping has a ...
0
votes
1answer
22 views

Form validation or model based verification on client side

I'm actually wondering what are the pros and cons of these two ways to handle client side validations / verifications. Let's imagine an application where there is a contact form that needs these ...
0
votes
1answer
45 views

Updating sub-properties via Entity Framework

I was wondering how to updated nested objects/sub-properties when using Entity Framework. But to make things clear, let's start with an example. I have an object, which can own a number of other ...
-2
votes
1answer
112 views

Mock db out or not during testing?

I am writing an app that mainly consists of just creating, editing and reading records in database. I was persuaded that any app has to be covered with tests. I was told that it's a good practice to ...
0
votes
1answer
60 views

How to implement multi-layer stream processing in Java?

I need to implement a back-end service which conceptually is built in layers. One typical example could be as in the picture below: So you can see we have an input of type A which is sent to three ...
2
votes
2answers
106 views

Dependency inversion vs repository pattern (app layer dependency on ORM)

Let's say we have an application layer with some command handler and we use an Entity Framework database context/ORM context in that handler. I would invert dependencies from the Entity Framework/...
2
votes
1answer
105 views

Why are cloud services needed for push notifications?

We currently have a customer that wants us to implement push notifications to our app. The problem is that for this customer, security is really, really important... I am not able to find any official ...
2
votes
1answer
29 views

What is the purpose of adding a schema validation in responses?

Many of the server scripting packages/tools out there have the option to have a schema validation before the response is sent out to the clients. E.g. the fastify package for a Node.js has a pretty ...
2
votes
2answers
81 views

How to generate an access token using OAuth 2.0 for another app that never expires

I'm using OAuth 2.0 with Laravel (Passport) in order to grant access to my frontend app to the API. Access tokens generated this expires after a while. Now, I have a second app that has to consume ...
0
votes
1answer
18 views

Set per-process open file limit in code or in system configuration?

I am working on an internal application that is maintained by the same people that operate the servers the application runs on. We have noticed, while transitioning from Windows to Linux, that some ...
0
votes
0answers
21 views

Can MVC be utilized via foreign function interface?

As far as I understood, MVC has the biggest advantage in creating a separation of concern and making three components decoupled as much as possible. All of the examples I saw were in a single ...
0
votes
0answers
53 views

EventSourcing / CQRS Implementation with ASP.NET Core WebApi and Azure Cosmos DB

I was looking for an easy implementation of the Event Sourcing and CQRS Pattern in ASP.NET Core using Azure Cosmos DB as Event Store. As I couldn't find anything appropriate I decided to write a ...
1
vote
2answers
50 views

Branching SQL relationship to C# object model

I'm developing a C# WPF desktop application where I need to read/write to an SQL database regularly. Now I want to map the data from the database to objects in C#. I can't use Entity Framework so I'm ...
0
votes
0answers
31 views

How to obtain reference data in a Microservices architecture?

We are migrating a monolithic application to a microservice architecture and are aiming to go on a serverless path. We have developed independent services on AWS lambda and the UI is written with ...
0
votes
1answer
110 views

How can I vary the distance function in my code?

I have a simple design question. I have a tree based C++ class. It needs to use a distance function in order to calculate nearest neighbors. But the distance function is available from an external ...
2
votes
1answer
91 views

Changing static method that now requires a runtime dependency

I had a simple static method which would take a value and a unit type (pounds, gallons, dollars) and would just format a string. A simplified example: public static string Format(decimal value, ...
1
vote
2answers
52 views

Association in Use Case diagram have arrow?

I research about [association] in use case diagram : It is a line has not arrow as image: https://www.uml-diagrams.org/use-case-actor-association.html But i using Rational Rose: If i draw a [...
0
votes
3answers
136 views

What is the definition of implementation in programing languages? What is CPython?

I came across this word "implementation". CPython is one of the most common implementations of Python. What exactly is an implementation? I researched a bit on how a Python code runs. First, it is ...
1
vote
2answers
122 views

What does the colon before the name mean in this JSON like string?

I encountered this string that looks like JSON syntax but I've never seen a property with a colon before it and not with a backwards greater than or equals sign: Badge { :id=>36, :name=&...
-2
votes
0answers
19 views

Integration between components using commands

I have an app that contain 2 modules. Each module is in separate zone. Communication between those components is done using service bus. Let's say that I have a command: Create Product. It is sent ...
2
votes
1answer
45 views

How to version control a fragmented codebase until it is properly merged?

My team has a mix of software developers and scientists, and version control has been messy in the past. We're trying to do better, which leads me to ask this question. We have a central codebase for ...
2
votes
4answers
232 views

Decoupling User Stories in Agile Development

Based on what I've read, user stories are often cast in a "who", "what", and "why" format, i.e. "[Who] wants the system to do [What], so that [Why]". The "who" and "what" seem easy to grasp. For the ...
2
votes
1answer
104 views

Is it possible to create once loadable files?

I know very little about encryption, so I figured I'd ask the internet if it's possible to do the following (and if so, what kind of algorithm should I be looking at): Write some code that saves data ...
3
votes
3answers
136 views

How to model User behaviour that can be shared between microservices in Event Driven architecture?

I have an Event Sourced system that has 3 micro services (simplified): User management - Registering a user, change password etc User account - manages debiting/crediting of the user account balance ...
41
votes
7answers
7k views

Is domain driven design an anti-SQL pattern?

I am diving in the domain driven design (DDD) and while I go more deeply in it there are some things that I don't get. As I understand it, a main point is to split the Domain Logic (Business Logic) ...
2
votes
1answer
92 views

How to manage same source code for different country in SVN?

as per my current requirement. I would like to maintain common source code for different country releases. Below are the cases which are required to be covered in the new process of code manage. ...
52
votes
6answers
12k views

How to deal with fear of taking dependencies

The team I'm in creates components that can be used by the company's partners to integrate with our platform. As such, I agree we should take extreme care when introducing (third-party) dependencies. ...
1
vote
0answers
87 views

How to support anonymous user in web application?

I work for a publishing company that also provides content distribution to their users. In order to access a piece of content the user must be entitled to do so. Traditionally this authorization check ...
1
vote
1answer
56 views

Need help with naming substate

I'm designing an application which accepts a command, processes it and produces a result. Application will maintain the status of the input command as 'new', 'processing' and 'completed' as it ...
1
vote
2answers
61 views

CQRS and Transactional Event Sourcing, problem while recreating Read DB

I'll first explain the context of my problem. The backend of my current project is using DDD, CQRS and Event Sourcing as a stack (the read DB being a MongoDB, my write DB being an event store). At ...
0
votes
0answers
42 views

Data integrity across multiple services

I am trying to explore the patterns around data integrity when applying multiple services with access to the same storage. Let's say I have Service1, which runs in 3 instances. Whenever an instance ...
2
votes
1answer
85 views

Generic way to describe data synchronization between systems?

Is there a generic way (useful formalisms) to think about data synchronization between two systems, especially in the case of slightly asymmetric roles (eg, one system contain master data, another one ...
-2
votes
4answers
99 views

Mocking dbContext vs Repository

I use entity framework with Repository Pattern. while searching for means of writing unit test cases that run isolated from the database I found some people mocking the database context and others ...
1
vote
0answers
38 views

What is a message in relation to javascript's message queue in its event loop?

I'm learning about javascript's event loop, however I'm not understanding what a message is? The resources I find mention how the callback associated with events get added to the message queue, but ...

15 30 50 per page