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.

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
98 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, ...
1
vote
2answers
79 views

Appropriate design for restoration of previous states

This is a very common feature in software, and I am sure there is a whole deal written about it, but I really don't know what the technical term is, so here I am: I am talking about giving your ...
-1
votes
1answer
64 views

Passing messages through a chain of containers in python

When I write python code for simulations, I often end up with the following situation: I have a class describing the general environment which contains a list of instances of a class that describes ...
2
votes
0answers
107 views

Is this an example of cyclic dependency?

I'm an undergraduate student and I have this assignment on a Discrete Event simulator. Currently I have completed to the end of v1.2 here. Attached also, is an algorithmic overview. I have wrote my ...
2
votes
2answers
76 views

Separate variable value from error code using struct

Let's say I have a function that calculates a sensor output, all values are >=0, but also I have to detect some error situations like "NO_POWER" which I encoded with value "-65500". On my application ...
-2
votes
2answers
88 views

Same interface in constructor class but reference to concrete class

during my work my collegue push one class that have an costructor with two parameter of the same interface but he has used the reference to the concrete class. I wanted a comment on this scenario ...
0
votes
0answers
38 views

Start a timer based on a different event firing

So I have a design issue I cannot seem to figure out how to do, my situation is as follows: I have multiple array of timers, one of which should be reset when the corresponding key, and then a ...
-2
votes
1answer
78 views

what is the real use of JS/Jquery in Asp.NET MVC application?

I am planning to design a new web application using ASP.NET MVC 5. I used to write a lot of JS/Jquery code on UI when I was a beginner with Web forms applications. After reading/learning a lot of ...
3
votes
2answers
148 views

What's the best way to design batch job type processing

I'm working on a portion of an ERP system where I need to process data in a way that's similar to a series of batch jobs, and I'm struggling with deciding the best program architecture to use. I'm ...
1
vote
0answers
67 views

Hierarchy of models while designing a client for a RESTful service

I am trying to write a client for a restful service. I am confused in designing the models. Below are the details: I have a Model named UnicastMessageRequest, it's definition is like this: ...
9
votes
6answers
2k views

Did Dijkstra intend for code modularization, when he wrote about separation of concerns?

First, I read an excerpt Edsger W. Dijkstra's 1974 paper "On the role of scientific thought": Let me try to explain to you, what to my taste is characteristic for all intelligent thinking. It is, ...
-2
votes
1answer
70 views

How to start designing a complex information system?

Recently I've been assigned to a new project to start with designing and visualizing business processes. Unfortunately I just can't wrap my head around this one, I understand what the client wants but ...
3
votes
6answers
601 views

Is it better to write an efficient algorithm or code that is easier to understand?

So I was recently given a coding assignment from a large financial firm, and I thought of two ways to solve the problem. One of the ways involved 1 outer for loop and 1 inner for loop. In this case, ...
1
vote
3answers
230 views

Why using methods for database queries instead of raw queries?

What's the reason behind making methods for database queries instead of allowing raw queries? for example get(...)->where(...). Guess1_ We're repeating ourselves otherwise(DRY) ---> I don't think ...
-1
votes
1answer
47 views

How would you design the abstraction/class(es)/component(s) of a third-party service/api used in your application?

Lets say you were designing a Twitter client for people with people could see tweets and post tweets? How would you design the twitter api abstraction? Many of the api wrappers I've seen feature an ...
1
vote
1answer
71 views

Data Integration Design Using Microsoft SSIS

I am working on a data integration project, where I need to extract data from oracle source and load it to XML file. The requirement is to get the list of customers and foreach customer create an xml ...
0
votes
1answer
87 views

how can a web server know all the tabs served by it (for the same session) in the same browser?

This is in the context of my bismon program (GPLv3+, on github, still unreleased, alpha-stage), which is mostly a single-page web application (with a garbage collected DSL in it) which uses the ...
1
vote
1answer
106 views

How should we approach layered-architectures that need large amounts of continuous, real-time, communication?

Background In much of the literature I've read online with respect to multi-layered architectures, many people describe how to create the simple application where: UI presents static model objects ...
0
votes
2answers
107 views

Design Pattern to extract arbitrary field from arbitrary file format

Lets say I have multiple file types: .json, .csv ... etc These file types come in different formats: Second json structure Extra column added to csv etc. I need to extract fields from these files;...
3
votes
1answer
103 views

Is good or bad practice to share reporting modules between systems/apps?

At my new work, a few people want to share modules between systems/apps, and I'm a bit skeptical about it. Context: we have a lot of little apps living in different servers, some of them are ...
2
votes
2answers
250 views

Hiding raw pointers from public API but need to pass them internally - design review

I am designing and prototyping an ncurses C++ wrapper. It's a hobby project, nothing too serious. I will omit include guards and stdlib includes etc. Consider the following files: application.hpp #...
2
votes
1answer
32 views

Server-client CLI messaging design

I'm prototyping some single machine, single user software with a client-server model; the first client for which will be a CLI, but I expect a (local) webapp/GUI to come later. For the CLI, I'd like ...
6
votes
4answers
258 views

Passing around large value objects vs converting to smaller value objects

Let's say I have a project that needs to do the following: Multiple calls to read from the database where each call is a different query and returns back a value object (just has getters/setters). ...
2
votes
3answers
221 views

Should a class constructor ever create objects of other classes? [duplicate]

Is it ever good or bad to have a constructor create new instances of classes that it needs versus passing in a reference that you want the new class to have ? So basically it's the difference between:...
3
votes
2answers
189 views

Are there any problems with using class variables in Java that can be accessed by any method?

So I've been coding in Java for a decent amount of time, but recently, I've started a class that cares about my coding design. In the past, if I had two methods inside a class that needed to edit the ...
1
vote
1answer
86 views

Where to put intermediary business logic in a backend

Consider you have a GravityLogic and a WeakForceLogic class. In themselves both provides tons of business logic. Now you want to create interactions between those which produce a complete different ...
-1
votes
1answer
121 views

Separating common logic into an interface

I order to achieve the DRY principle I want a functionality that logs processing time of some other functionality for example for each group of classes with a Base class. So the most logical way is ...
0
votes
1answer
72 views

Evaluation of (a)synchronous design of ledger interface

I'm currently designing a ledger API, that should work with different implementations (e.g. based on Blockchain, traditional databases, or files). Its purpose is to add/get messages to/from a ...
0
votes
1answer
83 views

Implementing dynamic Model properties by country

I'm having a dilemma where I would need to implement a better way for our Project Model with dynamic property depending on the country. So what happen in our application we have dynamic fields for a ...
0
votes
2answers
95 views

If a business's workflow steps can reside solely in a database, is there a reason to use a workflow engine to accomplish those steps?

I found various libraries in C#, PHP, Python, etc. for workflows. By workflow I mean something like an employee wants personal time and that request starts with the employee and finishes in some ...
1
vote
3answers
166 views

Is the Factory pattern good for this situation?

Im developping for my company a software where clients can requests app deployements and upgrades. Each request has 3 status (Validated, Started and closed). For every type of request (deployment ...
1
vote
1answer
91 views

DDD Relations between child entities / value objects

I'm new to DDD and trying to wrap my head around it by writing a prototype for an application (Core-Logic-Layer). My domain model looks like this atm. (I leaved out parts, that weren't necessary for ...
4
votes
1answer
155 views

Alternative to Reflection

I will directly come to our current working flow so that you can understand the problem in a clear picture. I am attached in Laboratory Automation System in which Analyzer (a machine that performs ...
2
votes
1answer
152 views

What terminology is associated with uneven maintainability?

A developer is tasked with writing a service that will iterate through a number of records and send notifications for each one. The type of notification might be different per record, so you can ...
1
vote
1answer
41 views

Board support driver for custom board - API design - MCU resource configuration

I have got to implement a board support package for a custom board, and I would like to know your opinion about the different approaches of designing board support drivers. My custom board pupulates ...
1
vote
2answers
143 views

How can I avoid redundant object properties when using a database?

I am writing applications in C++ using an sqlite database. Suppose I have a simple user system with a user database. User Class class User { private: void LoadFromDatabase(uint32_t id); ...
2
votes
4answers
299 views

Command handling fail feedback with CQRS

We are developing some context using CQRS approach. We have ended up with command handlers emitting events. It seems to be not a good idea to us. However we can't find any alternative approach. We ...
-3
votes
1answer
85 views

Database design for online applications

I am developing an Online Application portal. But I am stuck in designing my database tables, and am unsure about the best approach to take. Background: how the portal is supposed to work Let me ...
-3
votes
1answer
108 views

Shopping Cart Concurrency Question [closed]

I have a problem with my e-commerce site. There can be multiple simultaneous requests to add items in the shopping cart, I was moving towards the design where when an item is added to the shopping ...
1
vote
3answers
98 views

POLA, Constructor and Getters

As a followup to this question and one I asked a while ago, suppose if I had an Author class structured like this: class Book { private String title; private Set<Author> authorsSet; ...
-3
votes
3answers
381 views

Shouldn't cost be good reason to migrate to .Net from Java

I have a RESTful services developed using Java Spring framework. It's not a huge application, around 12K lines of Java code. Front end is in Angular and DB is No-SQL world. Recently I came to know ...
2
votes
1answer
96 views

How to reduce the chances of getting merge conflicts occurring in two projects of same cloned codebase

I have two applications A and B. Application A was written before application B, actually B was initially the same fork of A thus, each of the application had the same modules and same code in it. ...
5
votes
3answers
114 views

How to untangle a data class where annotations from different frameworks mix?

The framework mix problem I'm using two frameworks -- PingIdentity's SCIM 2 SDK and Spring LDAP -- to deserialise a SCIM resource (i.e. JSON) to a Java object then write it to an LDAP directory, and ...
1
vote
3answers
134 views

Is it ever a good idea to have classes intermixed/reliant on helper classes? C#

I have a simple class that has a private field and a public property. The property also calls a static helper method which it is kinda dependant on and i feel this might not be a good thing. This is ...
1
vote
3answers
175 views

Is there any risk to having row IDs visible to users?

In this article, blrfl makes a good case (How to design a good receipt number) for keeping things simple. Don't encode information into numbers - any information needed can be looked up. I am very ...
0
votes
1answer
117 views

How fuzzy search is implemented for file paths

Say I have file paths like this: my/long/directory/structure/index.js my/long/directory/structure2/index.js my/long/directory/structure3/index.js my/long/directory/structure.../index.js my/long/...
-1
votes
1answer
37 views

With a Web API, list of objects or dictionary with list?

Sorry if the question is worded badly, I couldn't think of a short way of explaining it without examples. My question is if you are hosting a JSON API, which is better: [ { "name": "Foo", "...
2
votes
0answers
64 views

Is there a recommended design/architecture when developing a JavaScript module?

Practicing some of the ES7 features, I started developing a class to perform some actions on the DOM and use the new features. I used Babel to make it work on the browser, and the code looks something ...