Tagged Questions
Questions about problem solving and planning for a solution through software design.
0
votes
1answer
21 views
Boolean endpoint within a RESTful API
I am currently designing a JSON RESTful API which should have a boolean endpoint such as /item/vote which can either be false meaning that a user has not voted for a specific item or true meaning that ...
2
votes
2answers
79 views
Reversible Functions
Currently writing a JSON Importer and creating some POJOs based on the data. I also have a requirement to write an JSON Exporter which take the information in the POJOs and exports a JSON doc.
To me ...
2
votes
1answer
44 views
Is it possible for a weak entity, already related to a strong entity, to get related to another weak entity in an ER diagram?
I have a problem statement (briefed),
Database for a Fitness Club -
Client's Attributes: Name, Address, Ph. No.
Membership Plan's Attributes: Beg. date, Sub. Fee, Monthly Fee, Duration
...
4
votes
1answer
104 views
Am I using the factory method design pattern correctly, or which creational pattern should I use?
I've been studying creational design patterns for the past week or so because I have a common use case that keeps coming up, and I can't figure out which pattern fits the bill.
Here is a simplified ...
1
vote
0answers
49 views
Downloading information, but just when needed
I'm struggling with thinking of how to implement the following (in java):
I try to create a program, that displays information about lots of tv series. For this i use the website "Burning Series" ...
4
votes
0answers
74 views
Code Design: Delegation of arbitrary functions
On PPCG, we frequently have King of the Hill challenges, which pit different code bots against each other. We don't like limiting these challenges to a single language, so we do cross-platform ...
-3
votes
0answers
49 views
Music sequencer and metronome software [on hold]
First off, I play the drums and teach, I am also a hobby software developer. I thought of an app I would like to create to help me practice and teach. There are a lot of good applications out there ...
2
votes
4answers
97 views
Are names like OrderCreation and UserRegistration suitable names for business logic / domain classes
We have moved to a more SRP model and found coming up with class names challenging. Previously we had a Order class that looked something like this:
public class Order
{
public void Create()
...
3
votes
4answers
206 views
Is Template Pattern a good way to implement DRY?
Here is my problem:
I have and class structure like this:
class Base
{
private:
SomeType something;
bool isSomeValue;
public:
virtual void myMethod() = 0;
...
0
votes
0answers
63 views
Should we add an extra class to this code sample
I have a shopping website which allows users to place orders. In my web application when the users click 'Create Order' i call an OrderService class which looks like the below:
public class ...
1
vote
1answer
52 views
«Heavy» object initialization: within each thread or outside and then pass it to the threads as parameter?
Let say there is an array of strings, I have to process. I'm using a «heavy» third-part object which gets the string and performs its analysis. In order to optimize a performance, I create a number of ...
0
votes
0answers
14 views
Rightness of reducing dependencies by grouping them for an application
This question is not technology specific althought a technology specific answer is welcome. Furthermore i'm asking about a design problem for an application which have (in my opinion) not the same ...
5
votes
3answers
133 views
What is a better design for exposing information in a bug tracking system?
We're working on a BugTracking system and are still in the learning process.
A BugReport has a title, description, (...) and also a tag. A tag represents the progess of the BugReport, e.g.
New : ...
4
votes
3answers
225 views
+50
How to save a list of strings which might grow too large but old data is not useful
I am developing an application which sends certain notifications to the user as read from a read-only external service. The user might dismiss notifications, and those should not appear again.
I ...
0
votes
5answers
375 views
How is it possible to log a user into a system with billions of similar data without delay?
Taking for instance Google mail and Facebook, they both have a huge database of users. It would be easy to search through a database of 100 similar logins and find a match in a second, but not in the ...
1
vote
1answer
156 views
What could be the better c# design for following requirement?
I am working on creating a c# design for following requirement. I am creating this for a fitness website.
I have an article (as Text) and a exercise (as Image or Videos) as the base entity. Now i ...
1
vote
1answer
59 views
Architecting a middle-tier enterprise system
I am a software developer with limited exposure to designing larger systems.
I am interested in determining some common techniques, maybe even common diagrams, to help me complete the design of a ...
-3
votes
0answers
49 views
Wanting advice for a C++ project I have in mind [closed]
I am looking for some advice for a very large scale C++ project me and my friend came up with for our current software design course. Now I have had experience with Python, R, C#, and Java, but the ...
2
votes
1answer
81 views
How do I model similar types that have different data?
We're working on a bugtracking system.
Our design has a BugReport class that represents the filing of a bug of some Project in the system. BugReports have tags, representing the state/progress of the ...
-1
votes
0answers
114 views
Programming an editor software in C++ [closed]
Emacs and Vim have been there for a long time and have prevailed over the new editors. I have read that the prime reason is for this is the flexibility these software provide, in terms of customizing ...
1
vote
3answers
59 views
Data Flow Diagrams _ context diagrams
how to show delete operation in dfd context diagram?
I want to show the following action.
"Administrator remove and add users to the system"
Since context diagram contains just inputs and ...
1
vote
1answer
79 views
.NET Implementation Question (repository access)
I am trying to write a generic method which goes a particular DB table depending on the entity which is passed (all valid entities implement IStaticData) :
IEnumerable<T> ...
2
votes
0answers
88 views
How should I represent to-be binary data?
I'm writing some serialization code, and I'm wondering how to deal with binary data. As I'm doing it in Python, my goal is to make it very simple, not require a lot of programmer overhead, etc.
Three ...
-3
votes
0answers
100 views
Re-Design without if statements/ minimal if statements? [closed]
I've been stewing on this for a while. To start, I have a class that acts as a builder for XML.
public class MyBuilder(){
private MyModel model;
private XMLService xml = new XMLService();
...
1
vote
1answer
72 views
How to implement application that will connect to server allowing the server to request data
I'm not sure what to title this question or if this is the right place to ask it. After Googling and continually coming up empty, I'm turning here as a last resort.
I've developed a SAAS web ...
0
votes
1answer
55 views
Change stock calculation depending on warehouse
I have a currently-existing stock management dashboard. The user selects a warehouse, and it displays the current stock in this warehouse. The stock management teams wants to display a date, ...
4
votes
3answers
137 views
Transitioning from C++ multithreading to Java multithreading
In C++, I've been accustomed to using threads in the following way:
#include <iostream>
#include <thread>
#include <mutex>
std::mutex m;
int i = 0;
void ...
-2
votes
2answers
75 views
Where can I find software project deliverables/ documents to help me professionally document my projects? [closed]
Hie guys. I have never been employed in the software development industry and when I do projects I usually just draw non-standard diagrams or used use case diagrams and class diagrams. This time a ...
4
votes
3answers
65 views
Using Multiple 'Sub-types' vs a larger single type?
I have a user model in an application that I'm working on, which currently uses sub-types to encapsulate properties depending on what type of user you are - I just can't help but think that this is ...
7
votes
1answer
181 views
Should I use a Status field or rely on calculations?
A bit long, but the overall the question is:
Should I have a status field in the table, or should I calculate the status in-memory from other information in the record?
What are the pro/cons of ...
-1
votes
0answers
41 views
What kind of architecture or design can be made for communication within an ecosystem of apps?
Say one concentrates on developing apps each focused on a specific purposes to simplistic perfection instead of writing one monolithic app.
These apps might share some features which could themselves ...
1
vote
1answer
34 views
Getting instances without using the Spring context
I'm writing a small game of life implementation with Spring, but trying to avoid referencing the Spring context within my code. I have two interfaces, Board and Cell. In each implementation of Board ...
0
votes
0answers
52 views
Modeling a multi-channel communication device in C#
Background
We (my coworkers and I) are architecting a high level C# API to interact with a hardware device's native Windows DLL.
First I will discuss the hardware-architecture, then get to the ...
1
vote
1answer
131 views
Is it sensible to write a wrapper to use an OO library in this procedural project?
I am writing a program using a procedural style.
At most I have some modules where the logic is present (one to retrieve data from, one to display the info, one with the saving logic, etc.), but my ...
1
vote
2answers
46 views
Why can't the Synchronizer Token Pattern be circumvented?
The synchronizer token pattern is the most effective protection against CSRF attacks. I understand the theory and implementation, but I do not understand why it can't be circumvented.
Generally, the ...
5
votes
3answers
203 views
Design: How to avoid breaking backward compatibility because of database changes
This is my scenario, I have this interface:
public interface hitTheDataBase
{
public void insertMe(String [] values);
public void modifyMe(String [] values);
public DataTable selectMe();
...
2
votes
2answers
118 views
Design for autocompleting words in search engine?
I'm trying to implement an autocomplete feature for a search engine. I have a database of words(stemmed) that occur in the documents that I have for users to search.
What I am thinking of doing is:
...
-1
votes
1answer
129 views
Does this pattern have a name?
I have a large XML file that I extract information from.
I am extracting the information using a list of classes with a main method of the type ParsedValue[] GetValue(BigXmlFile).
This is a bit like ...
4
votes
3answers
182 views
Does the visitor pattern violate the Liskov Substitution Principle
When using the Visitor pattern, I have observed the following:
The visitor has weak dependencies to concrete types (each visit method has the concrete element as a parameter or is a method that ...
2
votes
0answers
48 views
Data pipeline with fallbacks and callbacks
I'm refactoring our current design for how we download static data. It's a mess of deep class hierarchy and callback hell and I want to convert it to a more elegant straightforward design.
Here are ...
7
votes
1answer
101 views
Less strict separation of design and implementation phases for our domain
I work for a company that has a very large government contract. As part of the realities of a government project, we are bound to process requirements that come down to us from the Department of ...
1
vote
0answers
43 views
How do I design concurrent scalable system with guaranteed ordering? How about Akka?
I have designed a simple PoC system that processes a feed of prices that tick. It consumes a stream of "Ticker, Price" objects off JMS and updates a map, so that the map simply contains the latest ...
1
vote
2answers
102 views
How to match users with common interest but are different words
I'm trying to create an app where a user can enter in their interests and the app will show other users who have entered the same thing. The problem with that is that similar but different words ...
2
votes
1answer
50 views
Inferring system configuration using the existence of a file? any good?
This is a generic question about the idea of inferring some of the system configurations from the existence of a file or the lacking of it.
For example, we have a module of the system which is ...
0
votes
1answer
54 views
Fault tolerant software design of application running as distributed cluster
Mission-critical software system (such as systems-control software in spacecrafts) often employ multiple redundant software modules developed by different teams (sometimes using different programming ...
0
votes
1answer
62 views
Generate id in application or use database generated one?
I am writing a small app that manages a couple of recipes. I have a MySQL database that is used by my data persistance layer. I need some kind of id in my business objects representing the recipes to ...
2
votes
3answers
69 views
Calculating a score and a breakdown of the score in different places - should I use the same methods?
I am creating a plugin that uses a metric to determine a score on one page and allows the user to click through to see a more detailed breakdown of the score on a separate page.
The trouble is: I ...
-4
votes
2answers
109 views
Automatically creating .pdf files from CSV [closed]
Ok, so I already have a small console program written (full code can be seen here) for this task. Basically, what it does, is the user grabs a CSV that is full of filenames, then chooses where to save ...
0
votes
2answers
147 views
Should I create a new class?
Let's say I have a Car class. Objects of this class will be stored in a collection, and every object should know about other elements in the collection, because for each car there's a value to be ...
2
votes
1answer
121 views
Lower class count vs explicitness
To help with an application that manipulates and works from an XML structure to produce other information, I've created a class structure that closely follows the XML structure.
So, the XML is:
...