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
24 views

Separate server for Flask-SocketIO chat functionality?

I currently have a Flask application which acts as the backend for my website. I intend to add live private chat functionality to my website using Flask-SocketIO. I was wondering, is it better to ...
-1
votes
1answer
90 views

Downcastings refactored using generics

I am willing to refactor some code that acts like a controller class executing work embedded in other classes. On one side it looks good as the controller is generic and what changes has been well ...
1
vote
2answers
50 views

Thin Controller: Make a Controller Service wrap other Services?

Say you have a HomepageController that' suppose to show all the blogs, users, gallery, and some members-only info (for logged-in users) Normally, it looks like this: <?php class ...
2
votes
1answer
32 views

Restrict domain model if service not being used

Logically how can I prevent a client from making changes to a domain model entity if a service is not used? For example: Let's say I have an Account class that contains Transactions to compute a ...
-4
votes
1answer
79 views

Why does this Android app validate email field on every character change and not just when the Save button is pressed?

There's this sample repository, which showcases different Android testing practices. One of the apps is android-testing/unit/BasicSample, which is very simple and, among other things, checks the email ...
1
vote
1answer
46 views

Adding Security Layer for multiple services

My web application at the moment accepts REST requests and handled via some controllers, which calls corresponding services to perform the logic. Now I want to add in some security logic before ...
2
votes
1answer
76 views

What are the points of apps like Sketch and Photosbhop when it comes to Web Development?

This may be an obvious question but I really don't understand this so if someone can help me that'd be great. Basically, I am in the middle of developing an e-commerce app for my database management ...
2
votes
0answers
71 views

Designing classes with information hiding [closed]

John Ousterhout (the inventor of Tcl/Tk among other things) has this interesting list of software design advice, from which I'll quote the first one: Design classes around information, not ...
-3
votes
2answers
104 views

Develop desktop apps with communication between

My boss asked me to develop for him a price quotes desktop software (he doesn't want a website), he wants to give the price list and the users of this software would write the prices according to the ...
1
vote
0answers
33 views

Single users database for many apps

I'm designing a database that holds the information for users of three diferentes apps that share the access to the data trough an API. For every user i'm storing credentials, profile and roles. What ...
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: ...
2
votes
1answer
183 views

How do I use polymorphism instead of instanceof?

I'm trying to make an abstract board game. In the game, a player can choose to make multiple actions within one turn such as placing, moving, or rotating a piece. I'm not sure if whether or not my ...
3
votes
2answers
133 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 ...
1
vote
3answers
180 views

How can I represent something like “latest news” in REST api?

Can't figure out how. 1) Resource identification. How do I identify the resource? Something like this? /latest_news/<id> That doesn't seem right. 2) Now suppose you have a URL for the ...
-1
votes
1answer
164 views

Creating a CMD like program (Command Line Parser)

I am creating a CMD like program where the user manage his "drive" with commands. I would like to know if there is a way of doing this type of application in a easier/better way. Actually I'm doing ...
3
votes
1answer
110 views

Regulations about collecting data from software running at clients hardware (apps 'phoning home') [closed]

We develop an application which has now been installed on a few thousand customers sites. Unfortunately, we have no customer data collection built into the software. This is something we want to ...
6
votes
4answers
344 views

Software design meeting procedures

Elements of my team and myself are experiencing some difficulty performing design meetings. The symptoms are: We get off track easily, a combination of low understanding of the content of the system ...
0
votes
1answer
86 views

How to Redesign and scale legacy MVC application

I’m working with legacy web app for managing an animal shelter which need to be rearchitected/redesign, so it can scale and be possible to deploy in a central location. Currently it's physically ...
0
votes
1answer
50 views

Data Structure to join points by similarity measure

I have a series of points (x,y) and each point has a colour (in the LAB colour space). I need to associate points by similar colour and then spatially. So the end result is each point becomes part of ...
0
votes
1answer
32 views

Should worker processes accept() or should they get data from the master process?

I'm trying to write an application server in python. I have a master process and multiple worker processes created from the master using fork(). I have two approaches in mind about how the workers ...
-5
votes
1answer
57 views

App vendor vs Plugin vendor - who's responsible for fix?

An app generates a PDF based on user entered data in text fields. Copying and pasting users can inadvertently end up pasting "tags" in the field. Eg - <foo@bar.com> The PDF generator plugin ...
0
votes
0answers
38 views

Aggregate root circular dependency when data needed for calculation

My original design has a domain service that did a lot of work which resulted in an Anemic Domain Model (concepts like BalanceCalculators, AccountServices, etc.). I refactored my design which resulted ...
4
votes
0answers
133 views

Implementing new project to communicate with old ones. The correct way

I'm not sure if this is the right place to post this (I'm fairly new, but Stackoverflow and Superuser suggested this site for my question), but here goes. I currently have the following: A frontend -...
1
vote
1answer
87 views

Design scalable solution with queue

Assuming the following scenario: A web application that receives inputs from the user and process the inputs through an algorithm which takes between 5 to 25 minutes (depending on the inputs) and ...
1
vote
3answers
109 views

Usage of both is-a and has-a relationship?

So if I have a class called Object, a class, bench, that derives from Object, and finally a class called Park that derives from Object that has-a bench - is this bad "practice", to have two objects ...
0
votes
1answer
118 views

What's the benefit of separating specialised data from behaviour in an algorithm?

Functional programming strongly suggests to separate data from behaviours (functions). However, I can't see the benefit of this for an algorithm's implementation intrinsically tied with particular ...
0
votes
3answers
230 views

Calculating the total price of items in a shopping cart

I am making a shopping cart. A shopping cart will have a total amount of money you've got to pay for the products you've selected. I'd like to approach the problem using both OOP (encapsulating it) ...
0
votes
0answers
50 views

Challenges in Consuming Slow API's

We need to integrate a chatting software in our web application (and mobile app). The chat software could be accessed by our users from outside of our application too. The integration goal is to let ...
7
votes
5answers
332 views

Information Hiding v.s. Static Type Safety

I'm working on a project with others and we have a discussion about information hiding and static type safety. Our scenario is described below. Language: C++11 Scenario: We want to create a tree-...
0
votes
1answer
73 views

Design a 1D parking lot that could park a two wheeler (1 slot), a car (2 slots) or a bus (4 slots)

This question is an extension to this question. I am also brainstorming on this problem statement wherein a 1-dimensional parking lot having N slots will be having varying size parkings to do. A two-...
1
vote
0answers
26 views

User level customised activity feed design

I am working creating api for activity feed of user. Feed contains different type of entities. Before that let me give you bit overview about the app. Its a video app where Users can ask questions ...
0
votes
0answers
36 views

Should a new access control mechanism use a precedence-based or an order-based permission system?

Let's say I have users, groups (or "roles") and resources, and I want to manage various permissions on those resources. As far as I can see, there are two main "philosophies" when it comes to ...
0
votes
0answers
25 views

Aggregate inheritance in DDD [duplicate]

So one thing you do not hear much about is inheritance with DDD. Currently I have an Account aggregate that handles details regarding a financial account and its subaccounts. Then a Transaction ...
0
votes
1answer
33 views

Watchlist polling API NoSql vs Sql Frequent Updates

I am making a watchlist type application that will get all items being watched and then poll an api every ten minutes or so to check on its status. I am trying to design the database portion of this ...
1
vote
1answer
63 views

Build an object from two data sources - Which design pattern would be suitable?

Problem statement - I have to construct an invoice (having line-items, legal details, payment details etc) using booking and payment information of a hotel booking. There are two sources for these two ...
0
votes
2answers
59 views

How to allow arbitrary database connections based on users selections?

I'm writing an application which would allow users to access the databases over the network. Currently the user enters database details in a form which are later used to establish a JDBC connection. ...
1
vote
1answer
83 views

How to set nullable/optional property of database object to NULL in backend?

We are building API which mainly passes database objects back and forth between user and database, so the main flow of information is quite basic: Table (view) <-- ORM --> C#/Java/etc. Objects &...
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 ...
-1
votes
1answer
180 views

Is there a design for C# that removes the need for dynamic?

I have a web service that implements Repository Pattern and I was wondering if there is a design in C# that can remove the need for 'dynamic' when injecting it in my method. public interface ...
-1
votes
1answer
50 views

Calculating time an object stays in a state

I use Python sqlalchemy to store my model in a MySql database. One of my objects has a 'state' field (for simplicity let's assume there are two states: AVAILABLE and UNAVAILABLE). There are ...
2
votes
1answer
56 views

What to choose, ioctl-like interface or a set of distinct methods?

I am implementing a messaging protocol between nodes on a network and i am wondering how to expose the messaging system interface to the programmers. The messaging protocol supports a set of commands ...
0
votes
1answer
49 views

Domain events or services to achieve domain model consistency?

Recently began implementing domain events in my domain layer which really allows me to decouple the application from the domain. Eventually, I would like to get a full-scale CQRS w/Event Sourcing ...
0
votes
2answers
95 views

In which layer should a microservice should send a message to another microservice

In our monolith application, the piece of code that used to handle sending SMSes and emails was written in our business layer. Now the responsibility of sending emails and SMSes is handled by a ...
0
votes
1answer
47 views

Fastest way to return a list of records depending on many many-to-many relationships

I'm developing an API in Rails and the following requirement is established (it's really more complicated, but I want put a simple example): There are users and messages. users have a gender (...
1
vote
0answers
58 views

Where to put business calculation logic in CQRS read/write models?

I have a personal finance 3-layer application setup as: UI, BLL, and DAL. My domain looks like: // Write Model public class Account { public Account(AccountId id) { _id = id; } ...
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 ...
1
vote
1answer
56 views

Repository pattern, call another API that updates a SOR's from service or repository class?

We are working on API's that call other API's that will inevitably retrieves/update a system of record like an SQL, MySQL or other database. Sometimes we'll have 3/4 layers of API's before the SOR is ...
1
vote
2answers
161 views

Best practice on how can I change the structure of a live database without losing data inside

Suppose I have a live website running on a live database and I have a dev website that is a duplicate of the live website. The live database is where customer transactions are stored. Suppose I do ...
1
vote
4answers
113 views

High class cohesion violates ubiquitous domain language

Originally posted at CodeReview, but it was brought up that this would be better posted here. The other question has been deleted. Creating some personal finance software, but running into an ...
1
vote
1answer
96 views

How to white label my website in php

I have a website that follows the following structure: www.example.com/city1 www.example.com/city2 ... Programmatically we change the logo which is hard-coded in a specific config file for city 1, ...