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

learn more… | top users | synonyms (1)

0
votes
0answers
14 views

Use redundant data in database design when have multiple relation

In my web application users can submit their advertises and buy package for advertise (packages are used for priority of showing advertises) Database schema is like this: **Package: id, title, ...
0
votes
0answers
17 views

What layer should contain interactions with external or remote resources which are not strictly data operations?

Assume an application with a layered architecture, i.e. presentation, business/domain/logic, data access: it makes sense to plug access to external APIs in at the data layer if what they do resembles ...
2
votes
0answers
54 views

How to keep IDs in sync when using Factory?

abstract class Product { public abstract Product createProduct(); ... } class OneProduct extends Product { ... static { ProductFactory.instance().registerProduct("ID1", new OneProduct(...
1
vote
1answer
40 views

Specialized API endpoints or multiple calls to generic resources?

This problem came up while designing the API for a SPA web application, which communicates with the server via AJAX. On one page the user, who is creating a list of people to invite to an event, has ...
2
votes
2answers
59 views

How to create an efficient implementation of a dictionary of synonyms?

How do I create a dictionary of synonyms that is efficient in terms of retrieving synonyms of a word? Basically, I want to use some sorts of data storage to store groups of words, and enable an end-...
2
votes
6answers
240 views

Should I be doing checks on data that I'm supposed to be able to trust?

I am working on the frontend of a product, and it is now broken due to bad data from the backend. This can be caught internally before it gets anywhere close to production, but we end up fiddling ...
0
votes
0answers
27 views

Design from API documentation to code

I have a full API documentation made of uris, request and response bodies ready to use. Uris are all externals, and I have to first visit an entry point that'll give me a token, and then use that ...
0
votes
2answers
108 views

Where/how to store program data?

This may be more of a software design question - but I've been working on my first "real, non-academic" Java project and have recently learned about good code practices (such as breaking down methods ...
2
votes
2answers
92 views

Idempotency and concurrency in a REST web service

Is concurrency and idempotency mutually exclusive for a REST web service or can it be done so a service can be both concurrent and idempotent? Using a optimistic lock methodology like using Version ...
1
vote
2answers
52 views

Separating save logic from WinForm to make it reusable

I have a Windows Form for creating configs. It has around 50 fields of data, which represent a group of entities, that I need to capture when the user presses the save button. Currently, on the press ...
29
votes
9answers
5k views

How to cope with different development styles (top-down vs. bottom-up) in a team?

Say you've just started working in a very small team on a {currently relatively small, though hopefully bigger later} project. Note that this is an actual project intended to be used by other ...
4
votes
2answers
165 views

Distinguish different type of Comments

I would like to provide design decisions in the comments as well. I want design decision comments to be distinguishable from function contract comments, on cursory examination of source code. How to ...
1
vote
1answer
75 views

Inner and outer class relationship: should outer class be friend of inner's?

Is this design bad? Does it break encapsulation? The structure class B is a component of class A. Therefore, class A needs access to class B's members. Let a house be class A. Let a housekeeper be a ...
2
votes
2answers
58 views

AMQP broker and happen-before guarantees

I am trying to figure out how an AMQP broker, such as RabbitMQ, can be integrated in our architecture. This should allow to easily scale horizontally in the future. For the sake of simplicity, let me ...
0
votes
1answer
27 views

Design question to best option for storing data in file or DB

I am working on a feature where I need to store some data and I am not sure what should be my best option to store this data. I am sending data to some third party and want to show some part of that ...
-3
votes
0answers
66 views

How to design property files

I always wonder what is the best way to design your property files. I have few questions that I didn't find an answer to them Do we place all our labels / error messages in one file? Do we split the ...
1
vote
1answer
67 views

Should written use cases be consistent with use case diagram?

I'm developing a video web system like YouTube where users can upload, view, update and delete their own videos (CRUD operation). Original I drawn the use case diagram like this: But I learned ...
0
votes
2answers
132 views

Is an empty class in some cases correct

I know it's generally a design flaw to have an empty class, yet I'm wondering whether there are some cases where it isn't to have an empty (abstract) class to group objects. Especially when ...
2
votes
4answers
177 views

Are factories that only return one type of object bad?

Someone in a Stackoverflow post (I didn't bookmark the question unfortunately) commented, that Factories that only return one type of object are a code smell. I find myself writing these kinds of ...
1
vote
2answers
77 views

How do you represent an object when you need to know which subtype you're working with?

I have some data that I need to represent in a form. As an example, it might look like this (in psuedo-json): [ { "value1" : "int" "value2" : "{1, 2, 3, 4, 5}" "value3" : "...
1
vote
1answer
49 views

Decoupling the loading of data, sorting and usage

I have the following requirements: Load data from a variety of sources and fill a list with it Use a batch of data to perform some computation Some additional information: The algorithm for ...
10
votes
4answers
501 views

Is it bad practice to reuse method parameters?

There are times when I will need to modify a value passed into a method from within the method itself. An example would be sanitizing a string such as this method here: void SanitizeName(string Name)...
0
votes
1answer
66 views

GitFlow, should my release branch include minor version number?

I've found it difficult to find a definitive answer to this question. Using Semantic Versioning and GitFlow should my release branch include the minor version number? I'm not referring to tags. My ...
16
votes
6answers
4k views

A language based on limiting amount of arguments passed to functions

The idea is inspired by the fact operators such as +, -,%, etc. can be seen as functions with either one or two arguments passed, and no side-effects. Assuming I, or someone else, writes a language ...
-1
votes
1answer
78 views

Controllers and Separation of Concerns: discussing possible strategies

I've been working on a project based off of this tutorial. Unfortunately, the controller classes in this are quite dense and have terrible separation of concerns. I should have realized this ...
0
votes
0answers
49 views

Making DAO's independent on each other

I have these two classes (Getter/Setter/Constructor omitted): public class Company { private String name; private String adress; private List<Employee> employees; private Uuid ...
1
vote
4answers
52 views

Handling missing values in response

Suppose a web application relies heavily on the third party APIs and I am expecting a response from it but somehow I don't get any, maybe because of the API exception or missing value on the API side ...
1
vote
1answer
52 views

When to have a generic method for multiple tasks when some differ?

I process a lot of tweets in real time using python and for each tweet I need to assign it in to a specific bucket. I have about 50 buckets, each with their own rules. The majority of them are simple ...
1
vote
1answer
159 views

is this a good design

For example, I have a clan and a character. There's a character that is the leader. To give the clan a specific feature, some money from the character is required. I don't want to have too much tight ...
55
votes
8answers
6k views

Should a developer do UI mockups if there are no designers in the project?

I'm working with a small team that creates a proprietary web application and UX isn't much of a priority since our own people will be the ones operating it, but we do try to make their jobs easier. ...
0
votes
0answers
50 views

How does maven internally manages package dependency?

Can some let me know how does maven internally manages package dependency? Is there any architecture diagram available on the net for the same? I also asked this in Quora and maven user mailing list ...
0
votes
0answers
73 views

Can I keep my code loosely coupled with public-facing enums?

I have some enums in a concrete API/library that will be publicly used by application projects. My problem here, is that I cannot write an interface to these enums (that I know of). I should have ...
2
votes
2answers
115 views

Ubiquitous language and resource based REST API?

I have posted a question regarding Ubiquitous language and maturity level in REST API. Ubiquitous language and maturity level in REST API? After some extensive coding I realized that further ...
0
votes
1answer
44 views

How to check foreign key dependency in ddd aggregate root

When I want to call a constructor on aggregate root class Task, I am interested how can I check if a passed taskType exists in TaskType repository (enforced later in DB on ORM level). I want to ...
0
votes
2answers
59 views

Is it a different object or the same object with an altered property (mutable or not)?

When I design the architecture of an application, I usually think about the nature of the objects and the interactions between them. The way I currently think about mutability is to ask myself if ...
-3
votes
0answers
23 views

logging another device using exscript PYTHON from already logged into device

I am using Python's Exscript module to log onto network device (Juniper/Cisco), once in I fetch vrf details and use same to log onto another device which is basically a SWITCH. I am stuck how to I ...
2
votes
1answer
112 views

Where do you print IO error messages from in a console app?

I'm writing a simple console app to rename a bunch of files/folders, and I want to design this console app to be as modular as possible. The console app is as simple as it gets: Ask the user what ...
3
votes
2answers
94 views

How should I refer to data bound columns?

I work often with data-bound applications with WinForms; records are pulled from a database and updated in a client application that I write. Stored procedures are used for all database transactions ...
1
vote
4answers
167 views

Where should “conversion” functions be placed?

I have a type Bound as a sort of "alias" for an array of three numbers (working in TypeScript with: type Bound = [number, number, number]). I did this basically to help readability by specifying in ...
2
votes
2answers
108 views

How To Design Time Slot Based App

I have got a responsibility of designing an app which allocates time slots for doctors booking. The scenario is like, there'll be entry for doctors and their time slot for each days. For E.g. ...
1
vote
1answer
49 views

Design question (use the same instance or copy?)

We are developing an e-learning website where you can practice LearnItems (typically words of a foreign language). The concept is very similar to Memrise. When a user practices a LearnItem, a Result ...
0
votes
0answers
20 views

Schema design (SQL) for incorporating an alerts system tied to users

I've been working on an app to hone my skills while building something that will be useful to me. It's being built using Ruby on Rails, but this question is mostly language agnostic. I'm currently ...
3
votes
2answers
115 views

How to represent object references in JSON?

I am trying to figure out what's the best approach when dealing with object references in a JSON to be sent to my server for deserialization. To clarify, what I mean is how to refer to data contained ...
1
vote
1answer
122 views

Design decision: class hierarchy or Java 8 Optional

I am really reconsidering my current class hierarchy for timeslots (in a schedule). I wanted to make them as flexible as possible so it would cover many possibilities of what we could understand as a ...
1
vote
2answers
169 views

How can you enforce a “do you really want to do this” confirmation in a publically exposed API?

Is there a commonly (or rarely) used pattern for a "confirming you want to do this" message when calling a function from a library? I have a API that exposes some operations that are potentially ...
3
votes
2answers
131 views

How to check if app is offline

I am developing internal Android apps for the company I work for. In various places in the apps I need to connect to an internal server. This server is shutdown for maintenance for a period of time ...
5
votes
1answer
274 views

Small classes and methods, but code still difficult to maintain and follow

Did I do something wrong in my code organization ? I still find my own program difficult to follow. I tried to decompose my program on small, easy to understand classes and functions, still I find ...
40
votes
15answers
8k views

Is it inadvisable to make a function that essentially renames a built-in function?

I get confused over min and max functions, in certain contexts. In one context, when you're using the functions to take the greater or lesser of two values, there is no issue. For example, //how ...
2
votes
1answer
90 views

Is it anti-pattern to alter domain model on front end?

We are making a quiz application, I'm trying to integrate my Angular 2 UI with the REST api. Our Quiz domain model consist of the following (simplified) hierarchy: -Quiz -Category -Question -Choice ...
-1
votes
2answers
78 views

Connecting an HTML form to a Java program

I would like to create a front-end interface in HTML that interacts with a Java program via an HTML form. I would like to be able to publish this project on the Internet. In other words, the text ...