Questions tagged [design]

Questions about problem solving and planning for a solution through software design.

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

How to Properly Design an API Prefetch System

I'm creating an API for a web service. There are a couple of endpoints in this API that require some time (lets say +5min) to compute, so I'm creating a prefetch system that will call in the ...
0
votes
2answers
54 views

Explicit Modeling Aggregate Root to avoid State Pattern

In the book Patterns, Principles, and Practices of Domain-Driven Design, chapter 16, entities, Avoid the State Pattern; Use Explicit Modeling has brought the great idea of domain modeling to my life. ...
0
votes
1answer
48 views

How to integrate Third-party Service in Domain Driven Design?

I will use the typical e-commerce system as an example of my problem here. The e-commerce system has bounded contexts like Sales, Shipping, Identity and Access. The Sales could be a core bounded ...
0
votes
1answer
33 views

Where should the user access bounded context stands in DDD and Clean Architecture?

I have seen some Bounded Context examples to learn DDD. In those examples, the User Access bounded context (register, login, authorization...) is considered a generic bounded context and could be a ...
0
votes
1answer
45 views

How should you structure the front-end/client to interact with a web app microservice?

I've been grappling with this for a while and figured I would post here to get input. I am a full stack engineer. I work on both front end and back end apps, where sometimes I have to create new ...
-2
votes
3answers
72 views

Design consideration-To add or not to add a related variable in a class

I need something clarified. I have been having a discussion with someone and we have conflicting arguments. Hence, I came here to ask looking for your insights. Say we have to implement our own stack ...
-1
votes
0answers
48 views

How does WhatsApp android App Rings if the App is closed? [closed]

I was wondering how WhatsApp android app manages to ring even after the app is closed. I thought they do it with push notification. But I found that some devices like Oppo does not deliver push ...
0
votes
1answer
34 views

Design approach where to persist autocompletion suggestions

I am currently planning a movie recommendation application. Within this context, the user can fill out a form including different information (e.g. title, description, etc.). The new entry gets then ...
-3
votes
1answer
83 views

Best way of organizing and storing this data in an explicit way? [closed]

I'm developing a free app to help people know how long to wait for their next bus in a specific itinerary of my country. I'm inclined to use Python and Kivy to deploy the app on multiple platforms. I ...
2
votes
1answer
69 views

Design for deduplicating concurrent tasks in flight simultaneously

I have 1-20 agents that issue requests over time with roughly ~50 in total in flight at any given time. Many of these requests are identical. The tasks are idempotent, but if two identical requests ...
0
votes
1answer
59 views

Handling/queueing a Windows-Service restart to apply new changes

I'm working on a project that has the purpose to execute tasks in intervals. The tasks and it's properties can be configured through the Configuration Website. The data is being stored in the ...
3
votes
2answers
153 views

How to manage data consistency between Bounded Contexts?

The typical example, the e-commerce system. Let's say the Order is in the Sales bounded context. Every Order contains many OrderLine, which stores the ProductId. The Product is in the Product Catalog ...
0
votes
1answer
55 views

Mastering the usage of [PublicAPI] attributes?

Take the following class, without [PublicAPI] attribute, ReSharper says that all public members can be made private. using System; using JetBrains.Annotations; namespace ObjMtl { // [PublicAPI] ...
-3
votes
1answer
85 views

How would a stateless server handle events when the user disconnects?

I want to build a chat application with a stateless server as backend. Users have an online and offline status. When a user connects to the server, the server marks that user as online. Now imagine a ...
1
vote
4answers
175 views

Should we directly read environment variables when/where we need them?

Why most frameworks (at least in PHP. I suppose in other languages, too) use the environment variables to set a corresponding configuration parameter and then access the value through a config object/...
-2
votes
0answers
39 views

React: how to set the state of a component from an external function using logic based on the CURRENT, UPDATED state of that component?

If you want to set the state of a component A from within A using logic based on the current, updated (!) state of that component, you can use the updater function which passes the current, updated ...
0
votes
1answer
53 views

ViewModel as Observable, Views as Observers of it

Considering i have a Presenter that updates a ViewModel, and potentially multiple Views updatable from this ViewModel. What would you think about this way to proceed : Somewhere we register the Views ...
0
votes
1answer
89 views

Stable abstraction principle

I'm studying design principles, and I have a doubt in package coupling principles. I know that the 'Stable Abstraction Principle' says that a package should be as abstract as stable, and it says that ...
-1
votes
0answers
60 views

Clean Architecture - is it the front-end Controller responsibility to pass te Presenter in parameter to the Use Case Input port?

In a use cases–oriented architecture, such as Uncle Bob's Clean Architecture, if we do use a Presenter, should the front-end Controller (that already transmits the RequestModel to the IMyUseCase (via ...
2
votes
0answers
87 views

Cohesion and coupling possible combination in software

I know what we mean by cohesion and coupling in software. And generally the best practice is to achieve high cohesion with low coupling. It seems to me though that they are inter-related. I.e. you ...
1
vote
1answer
64 views

Do State diagrams Only Represent Individual Objects states?

On website uml-diagrams.org it is mentioned that state machine diagram is a behavior diagram which shows discrete behavior of a part of designed system through finite state transitions. To the best of ...
2
votes
0answers
38 views

Software design for an Angular highlight&comment tool

We're building a new feature for an online editor that the user will not edit the document, but will be able to highlight & propose edits on the document. Very similar to google documents' ...
0
votes
1answer
58 views

Interface design for container that holds different instances derived from a common type

I'm currently designing an interface for a container that is supposed to store references of different instances that derived from a common supertype. An analogy of it would be as following: Suppose ...
4
votes
1answer
92 views

Using Choice Node in State Machine Diagrams

In State Machine diagrams, in some online resources, the condition is merely drawn on the arrow (the left figure below) and in others similar to right figure, where a choice node is specifically used. ...
2
votes
1answer
46 views

SQL: Analytics event value that can be string or number

I'm using a PostgreSQL database and I want to create an analytics table that has a many-to-one relationship with an analytics_type table where analytics_type_id is the foreign key. The table also has ...
-1
votes
0answers
43 views

Multi Tenant Application - Same user in 2 tenants with separate databases and app code

What is a good design for allowing users to access multiple tenants in a multi tenant application? I currently have a hybrid system. Some tenants are in a shared database and other tenants have their ...
2
votes
2answers
107 views

User stories - Different formats for different purposes?

To the best of my knowledge, user stories follow a format such as As a [role], I want to [do] such that [benefit] - (This takes 8 days to develop) Recently in the book Software Engineering by Ian ...
3
votes
1answer
123 views

API Design for Error Handling

I'm working on a semi-complex web API, the high level design so far looks like this: |--------| |------------| |------------| | |--| | | | | core | | | | ...
0
votes
1answer
32 views

Integration with stripe, have a single source of truth or have info of the user status in our DB

So We're integrating our application with stripe and we have different products There are 2 options : Have stripe as a single source of truth, anytime we need to check the permissions of a user we ...
2
votes
2answers
135 views

Is nesting try-except sequence in try-else block bad form?

Ive got a boot sequence that needs to check some registry values, they may or may not be present, so each check needs to be wrapped in its own try-except. I try to avoid nesting as I think it can lead ...
1
vote
1answer
169 views

Avoiding coupling through code sharing

I have been working on an application which consists of several cohesive services, Customer, Invoice, PurchaseOrder, Highlight, the application is deployed within a mono repo and each service is ...
0
votes
0answers
82 views

Trade-off between usability and clean design

I have designed our in-house hardware testing framework. My goal is to ultimately release the framework into the public domain. Early on, my foremost design criterion was to provide a powerful yet ...
1
vote
4answers
86 views

Class Diagram - Aggregating over a class that has physical presence or logical presence?

In the below figure, a CD shop has CD cupboards, and inside it has shelves. CDs could be rented, and class CD Copy represents the actual CDs that are rented. My question is, should I represent Shelves ...
0
votes
1answer
53 views

Ranking results from a Question and Answer game

I have a question and answer trivia game app which randomly picks questions from a database and prompts the user to answer the question correctly. The total number of correct answers, the total number ...
-1
votes
1answer
74 views

CQRS Domain Driven Design and single save button

This may be a dumb question, but I don't know how to solve this. I am moving from CRUD to Domain-Driven Design with CQRS. I have seen many DDD examples like this. You could find many more on Github. ...
1
vote
1answer
64 views

What to improve/change and how to move forward with my Event Storming session?

I'm doing alone session with Event Storming for my application that I plan to build with DDD approach later on. Event Storming session is for learning purposes. My application domain logic is rather ...
4
votes
3answers
162 views

Non Functional Requirements and Use Case Diagrams

My software provides two functional requirements, and I represent them as Do A and Do B in the figure 1 below. At the same time, my software has a non-functional requirement to provide the interface ...
2
votes
1answer
69 views

How could Vulkan pNext design be implemented in a "safer" way?

Vulkan introduces a member .pNext of type void* in all its core structs allowing to create handles. This member purpose is to allow to extend the structure by passing a pointer another one. This is ...
0
votes
0answers
52 views

Dealing with third party api rate limit when using multiple services

I have 1 api key that has a rate limit 1000req/1min. I would like to somehow use 50% of that limit in service 1 and 50% of that limit in service 2. Let's say they're just 2 separate processes using ...
1
vote
2answers
79 views

Naming for a Class that performs one or more set operations

I'm designing a class that takes: 1 - An initial set of items (a simple collection/list) 2 - 1 or more Filter objects, that take the initial set of items and return a new set. Each Filter object may ...
2
votes
2answers
53 views

Actors and their representation in the system

I am trying to understand the relationship between actors and their representation in the system. Please see the below figure In the figure on left, I have an abstract representation of my system. In ...
0
votes
2answers
145 views

How best to deal with growing polymorphic interfaces?

Consider the following scenario in an object-oriented environment. Sample code is in C++, but it could be any OO language. A software must control an external device, say a TV. From the start you know ...
1
vote
1answer
50 views

DDD - Many-to-many between aggregates

I have 2 aggregates: Occupation and WorkActivity. An Occupation can have multiple WorkActivity. A WorkActivity can also belong to many Occupation. The aggregate is a basic element of transfer of data ...
0
votes
1answer
76 views

Bank actors in Use case diagrams

In a use-case diagram, use cases (bubbles) provide a functionality to an actor. For example, ecommerce site, actor "shopper" could use bubble "browse catalog" or "make payment&...
3
votes
4answers
335 views

Is it a bad practice to have an interface method to tell whether it can handle an object?

interface Resolver { boolean canResolve(SomeInput input); SomeOutput resolve(SomeInput input); } public static void main(String[] args) { List<Resolver> resolvers = ...; ...
1
vote
2answers
69 views

Use case scenario based on a use case using "uses" or "extends"

In a use case diagram, use case A "uses" use case B. I need to write the scenario based on steps of use case A. Since A "uses" B, I just wanted to confirm that I need to include ...
1
vote
5answers
74 views

Actors participating in use case diagram

Suppose a customer needs to approach a staff member to register her. To model this, I have drawn the image below. However, I am not sure if what I have drawn, actually means both of them can register ...
1
vote
4answers
116 views

Are static classes/methods good for pure business logic?

I have a service class that performs some operations. One of the operations is a piece of code long enough to warrant extracting to a new class and unit test it in isolation: @Service public class ...
0
votes
0answers
72 views

Load balancing the load balancers

Currently I have a system where I have installed HAProxy on one machine and my other 3 machines serves the webapps and the fourth machine for the database. Now I need to add another load balancer in ...
1
vote
1answer
59 views

Difference between Sequence Diagrams at Conceptual and Design

Recently I learned that sequence diagrams can be used at both requirements specification and design level. My search so far shows the boxes on top of the sequence diagrams used for design consist of ...

1
2 3 4 5
97