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

learn more… | top users | synonyms (1)

3
votes
4answers
238 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; }...
1
vote
1answer
63 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
5answers
388 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 ...
0
votes
0answers
18 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 ...
1
vote
1answer
163 views

What could be the better c# design for following requirement? [closed]

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 ...
5
votes
3answers
143 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 : ...
2
votes
2answers
130 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
vote
1answer
77 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 ...
0
votes
2answers
174 views

Good design pattern to enable/disable certain functionality based on condition

I am working on a paint type application in android. I got toolbar on left contains tools like undoCut, redoCut, box, frame, cutting, coloring, next, previous etc. I wanted to know what is the best ...
1
vote
1answer
135 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 ...
2
votes
1answer
84 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
vote
2answers
122 views

swift typealias vs empty inherited class

I am working on JSON model classes in a swift project. Examples of the sample JSON and classes are below. In the JSON response, there can be many different unique statistics returned, but they all ...
1
vote
1answer
89 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> GetEnumerable<T>(...
1
vote
3answers
114 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 ...
2
votes
0answers
94 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 ...
0
votes
1answer
61 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, ...
-2
votes
2answers
121 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
70 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
190 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 each?...
3
votes
3answers
208 views

Multi-screen MVVM architecture/design - Should my “screen” ViewModels contain sub-ViewModels?

I'm getting beyond a simple MVVM program now, and I'd just like to sense check my current architecture and makes sure I'm going down the right path here. Everything is structured around screens, and ...
5
votes
3answers
223 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(); }...
1
vote
2answers
52 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 ...
53
votes
12answers
3k views

How to take a step back and look at code with fresh eyes? [closed]

I've spent the last year as a one-man team developing a rich-client application (35,000+ LoC, for what it's worth). It's currently stable and in production. However, I know that my skills were rusty ...
-1
votes
1answer
133 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 ...
2
votes
0answers
65 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
108 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 ...
2
votes
0answers
65 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 ...
2
votes
1answer
57 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 ...
7
votes
2answers
257 views

Object reading from file, violation of SRP?

I am writing a physics simulation program in C++. I am a novice in OOP and C++. In my program, several objects need to be initialized based on data from an input file. For example, an imaginary ...
1
vote
3answers
251 views

CMS Design: Is multi-site a good idea?

I'm building a new CMS with Node.js, and I have a question. Would adding WordPress-like multi-site support to the system be a good idea? Or should I let the user handle it via a reverse proxy like ...
-4
votes
2answers
201 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
1answer
99 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 ...
5
votes
4answers
463 views

Considerations when designing a file type

I'm about to start writing a process for saving some data structure from code in to a file of some proprietary, as-yet-undefined type. However, I've never designed a file type or structure before. ...
2
votes
3answers
72 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 can'...
2
votes
1answer
125 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: <...
0
votes
2answers
159 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 ...
1
vote
1answer
71 views

Custom Outlook Web App Shared Mailbox

We currently have a large amount of custom mailboxes hosted on Lotus Notes/Domino and have been tasked to migrate these over to our Outlook/Exchange environment. The mailboxes are basic Lotus Notes ...
2
votes
1answer
177 views

Creating multiple instances of an implementing class

I currently have an abstract class and multiple classes extending it. My problem is, that there has to be a way to create a variable number of instances of an extending class. The number of instances ...
0
votes
0answers
75 views

Class design of keyboard interpreter to execute commands

I'm designing a keyboard interpreter that will map typed characters to a (or many) command(s) via a hierarchical menu-style structure, taking into consideration testability (ideally TDD). However I'm ...
0
votes
1answer
104 views

Best practice for settings for PHP class for code generation [closed]

I would like to have a class creating any code from given options and output it in a chosen way. I have written class for generation of simple JavaScript code for such cases where is needed to ...
0
votes
0answers
71 views

What benefits does React bring over Partial Views

Beside the performance optimizations that React brings to the table with the Virtual DOM : conceptually, in terms of end-software design, what does React brings to the table that partial views did not ...
0
votes
0answers
59 views

Test Utility in Spring: Singleton or Static

I'm working on Test Utility in a spring project, this utility contains a methods to convert an object to JSON object and vice versa..etc and I'm confused if it's better to make the methods as ...
0
votes
0answers
48 views

Merging waitable objects

Lets say you have two (or more) objects from which both allow a thread to wait for an event to occur. Foo.Wait(timeout); Bar.Wait(timeout); The main thread wants to wake up when either of these ...
1
vote
0answers
58 views

Creating duplicate instances of objects for timeline functionality

I am working on a Spring-MVC based project, in which I would like to add Timeline functionality. The most important object in our project is the Note, there are objects associated with it like ...
4
votes
3answers
217 views

How to use a strong type system to model business constraints?

Following up on my ambiguous question, here's a question that is probably more focused. Consider the following code snippet form a Haskell program: data NightWatchCommand = InvalidCommand | ...
29
votes
5answers
2k views

What is an effective way to record rationales behind product design decisions?

At our company, we do not use any product design documents. We have three employees total so all product design discussion happens in person, or on Slack. (We are also on the basic Slack package that ...
3
votes
2answers
356 views

Only use a dependency injection container at the root of an application?

normally, I'll use a dependency injection container (unity) in c# like this example: class SomeClass { private readonly ILogger _logger; public SomeClass() { _logger = ...
1
vote
1answer
72 views

How to determine what type of derived-class object to lazy-load from an associated object

I'm modelling a system that is a combination of two distinct yet similar data repositories**: one containing patent data and one containing trademark data. There is a very large overlap in the ...
0
votes
0answers
55 views

Publish / Subscribe via HTTP Callbacks?

My team is tasked with creating a publish/subscribe system for incoming REST messages. 99% of the time, this system will be used for notifications between different processes on the same cpu, but we ...
8
votes
3answers
418 views

REST API design for web pages with wizards

I have a web page with wizard format. The submission button to the API will be in the 4th step of wizard. However I want the data entered to be stored in database before moving to the next step in the ...